File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ include(cmake/ada-flags.cmake)
16
16
add_subdirectory (src )
17
17
18
18
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /scripts/cmake )
19
-
19
+ option (ADA_TESTING "Whether to build tests." OFF )
20
+ option (ADA_BENCHMARKS "Whether to build benchmarks." OFF )
21
+ option (ADA_TOOLS "Whether to build tools." OFF )
22
+ option (ADA_BUILD_SINGLE_HEADER_LIB "Whether to build the lib from the single-header files" OFF )
20
23
# There are cases where when embedding ada as a dependency for other CMake
21
24
# projects as submodules or subdirectories (via FetchContent) can lead to
22
25
# errors due to CPM, so this is here to support disabling all the testing
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ if (Python3_Interpreter_FOUND)
49
49
add_library (ada-singleheader-source INTERFACE )
50
50
target_sources (ada-singleheader-source INTERFACE $< BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /ada.cpp> )
51
51
target_link_libraries (ada-singleheader-source INTERFACE ada-singleheader-include-source )
52
- add_library (ada-singleheader-lib STATIC $< BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /ada.cpp> )
52
+ if (ADA_TESTING OR ADA_BUILD_SINGLE_HEADER_LIB )
53
+ add_library (ada-singleheader-lib STATIC $< BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /ada.cpp> )
54
+ endif (ADA_TESTING OR ADA_BUILD_SINGLE_HEADER_LIB )
53
55
54
56
if (ADA_TESTING )
55
57
add_executable (demo $< BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /demo.cpp> )
You can’t perform that action at this time.
0 commit comments