-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (30 loc) · 1.19 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
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.21)
project(conceptstl VERSION 0.0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(PROJECT_IS_TOP_LEVEL)
add_compile_options("-stdlib=libc++" "-fexperimental-library")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fexperimental-library") # required for override compile mode of ut add_compile_options doesn't override it'
include(cmake/CPM.cmake)
CPMAddPackage(
ut
GITHUB_REPOSITORY arturbac/ut-ext
GIT_TAG master
)
find_package(ut-ext REQUIRED)
add_library(Boost_ut_system INTERFACE)
get_target_property(BOOST_UT_INCLUDE_DIR Boost::ut INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(Boost_ut_system INTERFACE SYSTEM ${BOOST_UT_INCLUDE_DIR})
add_library(boost::ut ALIAS Boost_ut_system)
endif()
# Header-only library target
add_library(conceptstl INTERFACE)
add_library(conceptstl::header_only ALIAS conceptstl)
target_include_directories(conceptstl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
if(PROJECT_IS_TOP_LEVEL)
include(cmake/building_config.cmake)
include(cmake/unit_test_integration.cmake)
enable_testing()
include(CTest)
add_subdirectory(tests)
endif()