-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
47 lines (43 loc) · 1.43 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
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.16)
project(tslgen)
if (DEFINED USE_EXISTING_TSL_PATH)
file(COPY ${USE_EXISTING_TSL_PATH} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
set(TSL_INCLUDE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${USE_EXISTING_TSL_PATH}/include")
add_subdirectory("${CMAKE_CURRENT_BINARY_DIR}/${USE_EXISTING_TSL_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${USE_EXISTING_TSL_PATH}/build")
else()
include(tsl.cmake)
if (NOT DEFINED CREATE_TESTS)
set(CREATE_TESTS TRUE)
endif()
if (DEFINED WORKAROUND_WARNINGS AND WORKAROUND_WARNINGS)
set(WAW "WORKAROUND_WARNINGS")
endif()
if (DEFINED USE_CONCEPTS AND USE_CONCEPTS)
set(UC "USE_CONCEPTS")
endif()
if (DEFINED CREATE_TESTS) # tests are created by default and must explicitily be disabled
if (CREATE_TESTS)
set(CT "CREATE_TESTS")
endif()
else()
set(CT "CREATE_TESTS")
endif()
if (DEFINED DRAW_TEST_DEPENDENCIES AND DRAW_TEST_DEPENDENCIES)
set(DTD "DRAW_TEST_DEPENDENCIES")
endif()
create_tsl(
${WAW}
${UC}
${CT}
${DTD}
TSLGENERATOR_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DESTINATION ${DESTINATION}
TARGETS_FLAGS ${TARGETS_FLAGS}
APPEND_TARGETS_FLAGS ${APPEND_TARGETS_FLAGS}
PRIMITIVES_FILTER ${PRIMITIVES_FILTER}
DATATYPES_FILTER ${DATATYPES_FILTER}
LINK_OPTIONS ${LINK_OPTIONS}
GENERATOR_OPTIONS ${GENERATOR_OPTIONS}
)
endif()
message(STATUS "TSL Include Directory: ${TSL_INCLUDE_DIRECTORY}")