Skip to content

Commit 27ee0b1

Browse files
default to_tuple.h
1 parent 8c9e002 commit 27ee0b1

File tree

3 files changed

+431
-9
lines changed

3 files changed

+431
-9
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
/.vs
66
/CMakeSettings.json
77
*.bin
8-
/include/cista/reflection/to_tuple.h

CMakeLists.txt

+11-8
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
2626
endif()
2727

2828
option(CISTA_COVERAGE "generate coverage report" OFF)
29-
30-
add_subdirectory(tools/to_tuple_generator EXCLUDE_FROM_ALL)
31-
add_custom_target(generate_to_tuple
32-
COMMAND to_tuple_generator
33-
64 # max number of supported member fields
34-
> ${CMAKE_CURRENT_SOURCE_DIR}/include/cista/reflection/to_tuple.h
35-
)
29+
option(CISTA_GENERATE_TO_TUPLE "generate include/cista/reflection/to_tuple.h" OFF)
3630

3731
add_library(cista INTERFACE)
3832
target_include_directories(cista INTERFACE include)
3933
target_compile_features(cista INTERFACE cxx_std_17)
40-
add_dependencies(cista generate_to_tuple)
34+
35+
if (${CISTA_GENERATE_TO_TUPLE})
36+
add_subdirectory(tools/to_tuple_generator EXCLUDE_FROM_ALL)
37+
add_custom_target(generate_to_tuple
38+
COMMAND to_tuple_generator
39+
64 # max number of supported member fields
40+
> ${CMAKE_CURRENT_SOURCE_DIR}/include/cista/reflection/to_tuple.h
41+
)
42+
add_dependencies(cista generate_to_tuple)
43+
endif()
4144

4245
add_subdirectory(tools/doctest EXCLUDE_FROM_ALL)
4346

0 commit comments

Comments
 (0)