1
- cmake_minimum_required (VERSION 3.11 )
2
-
3
- project (tl-function_ref VERSION 1.0.0 LANGUAGES CXX )
4
-
5
- option (FUNCTION_REF_ENABLE_TESTS "Enable tests." ON )
6
-
7
- include (FetchContent )
1
+ cmake_minimum_required (VERSION 3.11 )
2
+
3
+ project (tl-function_ref VERSION 1.0.0 LANGUAGES CXX )
4
+
5
+ option (FUNCTION_REF_ENABLE_TESTS "Enable tests." ON )
6
+
7
+ include (FetchContent )
8
8
FetchContent_Declare (
9
9
tl_cmake
10
- GIT_REPOSITORY https://github.com/TartanLlama/tl-cmake.git
11
- )
10
+ GIT_REPOSITORY https://github.com/burnpanck/tl-cmake.git
11
+ GIT_TAG b6fe9104d205cf04c4aac3824c2d310959b66120
12
+ )
12
13
FetchContent_GetProperties (tl_cmake )
13
14
if (NOT tl_cmake_POPULATED )
14
15
FetchContent_Populate (tl_cmake )
15
16
set (CMAKE_MODULE_PATH ${tl_cmake_SOURCE_DIR} ${CMAKE_MODULE_PATH} )
16
- endif ()
17
- include (add-tl )
18
-
19
- tl_add_library (function-ref SOURCES
20
- include /tl/function_ref.hpp )
21
-
22
- # Prepare "Catch" library for other executables
23
- set (CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /test )
24
- add_library (Catch INTERFACE )
25
- target_include_directories (Catch INTERFACE ${CATCH_INCLUDE_DIR} )
26
-
27
- if (FUNCTION_REF_ENABLE_TESTS )
28
- # Make test executable
29
- set (TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /tests/main.cpp
30
- ${CMAKE_CURRENT_SOURCE_DIR} /tests/constructors.cpp
31
- ${CMAKE_CURRENT_SOURCE_DIR} /tests/call.cpp
32
- ${CMAKE_CURRENT_SOURCE_DIR} /tests/issues.cpp
33
- ${CMAKE_CURRENT_SOURCE_DIR} /tests/assignment.cpp )
34
-
35
- add_executable (tests ${TEST_SOURCES} )
36
-
37
- target_link_libraries (tests Catch function-ref )
38
-
39
- set_property (TARGET tests PROPERTY CXX_STANDARD 14 )
40
- endif ()
17
+ endif ()
18
+ include (add-tl )
19
+
20
+ tl_add_library (function-ref ARCH_INDEPENDENT SOURCES
21
+ include /tl/function_ref.hpp )
22
+
23
+ # Prepare "Catch" library for other executables
24
+ set (CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /test )
25
+ add_library (Catch INTERFACE )
26
+ target_include_directories (Catch INTERFACE ${CATCH_INCLUDE_DIR} )
27
+
28
+ if (FUNCTION_REF_ENABLE_TESTS )
29
+ # Make test executable
30
+ set (TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /tests/main.cpp
31
+ ${CMAKE_CURRENT_SOURCE_DIR} /tests/constructors.cpp
32
+ ${CMAKE_CURRENT_SOURCE_DIR} /tests/call.cpp
33
+ ${CMAKE_CURRENT_SOURCE_DIR} /tests/issues.cpp
34
+ ${CMAKE_CURRENT_SOURCE_DIR} /tests/assignment.cpp )
35
+
36
+ add_executable (tests ${TEST_SOURCES} )
37
+
38
+ target_link_libraries (tests Catch function-ref )
39
+
40
+ set_property (TARGET tests PROPERTY CXX_STANDARD 14 )
41
+ endif ()
0 commit comments