-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (26 loc) · 1.23 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.5)
project(Lists)
SET(DEFAULT_BUILD_TYPE "Debug")
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
ENDIF()
SET(EXPECTED_BUILD_TYPES Debug Release RelWithDebInfo MinSizeRel)
IF("${CMAKE_BUILD_TYPE}" IN_LIST EXPECTED_BUILD_TYPES)
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
ELSE()
MESSAGE(WARNING "Unexcpected build type: ${CMAKE_BUILD_TYPE}")
ENDIF()
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_STANDARD 11)
ADD_COMPILE_OPTIONS(-Wall -Wextra -Wpedantic -Werror)
include_directories(.)
add_executable(RingUnit.test Ring.hpp RingUnitTest.cpp)
add_executable(RingPerf.test Ring.hpp RingPerfTest.cpp)
add_executable(AutoListUnit.test AutoList.hpp AutoListUnitTest.cpp)
add_executable(AutoListPerf.test AutoList.hpp AutoListPerfTest.cpp)
add_executable(SlightlyOrderedListUnit.test SlightlyOrderedList.hpp SlightlyOrderedListUnitTest.cpp)
add_executable(SlightlyOrderedListPerf.test SlightlyOrderedList.hpp SlightlyOrderedListPerfTest.cpp)
enable_testing()
add_test(NAME RingUnit.test COMMAND RingUnit.test)
add_test(NAME AutoListUnit.test COMMAND AutoListUnit.test)
add_test(NAME SlightlyOrderedListUnit.test COMMAND SlightlyOrderedListUnit.test)