Skip to content

Commit

Permalink
Merge pull request #1 from afishbeck/master
Browse files Browse the repository at this point in the history
Default to building a shared library with no test applications
  • Loading branch information
richardkchapman authored Feb 24, 2020
2 parents 94ecadc + 56bd367 commit b728b50
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ set (YAML_VERSION_MINOR 2)
set (YAML_VERSION_PATCH 2)
set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}")

option(BUILD_SHARED_LIBS "Build libyaml as a shared library" OFF)
option(BUILD_SHARED_LIBS "Build libyaml as a shared library" ON)
option(YAML_STATIC_LIB_NAME "base name of static library output" yaml)
option(YAML_BUILD_TESTING "Build libyaml CTest tests" OFF)

#
# Output directories for a build tree
Expand Down Expand Up @@ -98,9 +99,11 @@ install(
#
# Add tests
#
include(CTest) # This module defines BUILD_TESTING option
if(BUILD_TESTING)
add_subdirectory(tests)
if(YAML_BUILD_TESTING)
include(CTest) # This module defines BUILD_TESTING option
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
endif()

#
Expand Down

0 comments on commit b728b50

Please sign in to comment.