File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ project(YSTDLIB_CPP LANGUAGES CXX)
33
44set (YSTDLIB_CPP_VERSION "0.0.1" CACHE STRING "Project version." )
55
6- include (CMakeDependentOption)
7-
86# Enable exporting compile commands
97set (CMAKE_EXPORT_COMPILE_COMMANDS
108 ON
@@ -18,13 +16,9 @@ if(YSTDLIB_CPP_IS_TOP_LEVEL)
1816endif ()
1917
2018option (YSTDLIB_CPP_BUILD_TESTING "Build the testing tree for ystdlib-cpp." ON )
21- cmake_dependent_option(
22- YSTDLIB_CPP_ENABLE_TESTS
23- "Enable unit tests."
24- ON
25- "BUILD_TESTING;YSTDLIB_CPP_BUILD_TESTING"
26- OFF
27- )
19+ if (BUILD_TESTING AND YSTDLIB_CPP_BUILD_TESTING)
20+ set (YSTDLIB_CPP_ENABLE_TESTS ON )
21+ endif ()
2822
2923# Import CMake helper functions
3024list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /CMake)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ An open-source C++ library developed and used at YScope.
88Clone ` ystdlib-cpp ` into your project. Then, in your project's ` CMakeLists.txt ` , add the following:
99``` cmake
1010# Uncomment the next line if you do not want to build ystdlib-cpp's unit tests.
11- # option (YSTDLIB_CPP_BUILD_TESTING "Build the testing tree for ystdlib-cpp." OFF)
11+ # set (YSTDLIB_CPP_BUILD_TESTING OFF)
1212add_subdirectory(/path/to/ystdlib-cpp EXCLUDE_FROM_ALL)
1313target_link_libraries(<target_name> <link_options>
1414 ystdlib::<lib_1> ystdlib::<lib_2> ... ystdlib::<lib_N>
You can’t perform that action at this time.
0 commit comments