Skip to content

Commit b03ff95

Browse files
committed
Fix logic and Update doc
1 parent fb19c66 commit b03ff95

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS
1515

1616
if(YSTDLIB_CPP_IS_TOP_LEVEL)
1717
include(CTest)
18-
option(YSTDLIB_CPP_BUILD_TESTING "Build the testing tree for ystdlib-cpp." ON)
1918
endif()
2019

20+
option(YSTDLIB_CPP_BUILD_TESTING "Build the testing tree for ystdlib-cpp." ON)
2121
cmake_dependent_option(
2222
YSTDLIB_CPP_ENABLE_TESTS
2323
"Enable unit tests."

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ ystdlib-cpp
33
An open-source C++ library developed and used at YScope.
44

55
# Usage
6+
7+
## Via CMake's add_subdirectory()
68
Clone `ystdlib-cpp` into your project. Then, in your project's `CMakeLists.txt`, add the following:
79
```cmake
8-
set(YSTDLIB_CPP_BUILD_TESTING OFF)
10+
# 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)
912
add_subdirectory(/path/to/ystdlib-cpp EXCLUDE_FROM_ALL)
1013
target_link_libraries(<target_name> <link_options>
1114
ystdlib::<lib_1> ystdlib::<lib_2> ... ystdlib::<lib_N>

0 commit comments

Comments
 (0)