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)
1616add_subdirectory (src)
1717
1818set (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 )
2023# There are cases where when embedding ada as a dependency for other CMake
2124# projects as submodules or subdirectories (via FetchContent) can lead to
2225# 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)
4949 add_library (ada-singleheader-source INTERFACE )
5050 target_sources (ada-singleheader-source INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /ada.cpp>)
5151 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)
5355
5456 if (ADA_TESTING)
5557 add_executable (demo $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /demo.cpp>)
You can’t perform that action at this time.
0 commit comments