-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (30 loc) · 937 Bytes
/
CMakeLists.txt
File metadata and controls
37 lines (30 loc) · 937 Bytes
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
31
32
33
34
35
36
37
cmake_minimum_required (VERSION 3.14.0)
project(CppUtils)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_subdirectory(src)
option(CPPUTILS_ENABLE_TESTING ON)
get_property(BUILDING_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(BUILDING_MULTI_CONFIG)
if(NOT CMAKE_BUILD_TYPE)
message(TRACE "Setting up multi-config build types")
set(CMAKE_CONFIGURATION_TYPES
Debug
Release
RelWithDebInfo
MinSizeRel
CACHE STRING "Enabled build types" FORCE)
else()
message(TRACE "User chose a specific build type, so we are using that")
set(CMAKE_CONFIGURATION_TYPES
${CMAKE_BUILD_TYPE}
CACHE STRING "Enabled build types" FORCE)
endif()
endif()
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
if (CPPUTILS_ENABLE_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
endif()