Skip to content

Commit 7528043

Browse files
mwoehlke-kitwarejbeder
authored andcommitted
Separate tests and tools
Don't build tests if the confusingly named YAML_CPP_BUILD_TOOLS is ON. Instead, add a new option that controls only if the tests are built. (Also, default tests to OFF.)
1 parent 3f33f33 commit 7528043

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ enable_testing()
3838
### Project options
3939
###
4040
## Project stuff
41-
option(YAML_CPP_BUILD_TOOLS "Enable testing and parse tools" ON)
41+
option(YAML_CPP_BUILD_TESTS "Enable testing" ON)
42+
option(YAML_CPP_BUILD_TOOLS "Enable parse tools" ON)
4243
option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON)
4344

4445
## Build options
@@ -349,8 +350,10 @@ endif()
349350
###
350351
### Extras
351352
###
352-
if(YAML_CPP_BUILD_TOOLS)
353+
if(YAML_CPP_BUILD_TESTS)
353354
add_subdirectory(test)
355+
endif()
356+
if(YAML_CPP_BUILD_TOOLS)
354357
add_subdirectory(util)
355358
endif()
356359

0 commit comments

Comments
 (0)