Skip to content

Commit

Permalink
build: Properly escape option dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningEnlightenment committed Feb 2, 2023
1 parent d73ac62 commit ce1d640
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
# http://creativecommons.org/publicdomain/zero/1.0/
#
########################################################################
cmake_minimum_required(VERSION 3.20)
cmake_minimum_required(VERSION 3.20...3.25.2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake/")

if (POLICY CMP0127)
cmake_policy(SET CMP0127 NEW)
endif()

########################################################################
# configure vcpkg from environment vars if possible
include(VcpkgDefaults)
Expand All @@ -36,7 +40,9 @@ include(GNUInstallDirs)
include(SourceHelpers)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
enable_testing()
if (BUILD_TESTING)
enable_testing()
endif()


########################################################################
Expand Down Expand Up @@ -72,7 +78,7 @@ set_package_properties(Catch2 PROPERTIES
TYPE OPTIONAL
PURPOSE "Allows to build the test suite"
)
cmake_dependent_option(BUILD_TESTING "Build the test suite" ON Catch2_FOUND;yaml-cpp_FOUND OFF)
cmake_dependent_option(BUILD_TESTING "Build the test suite" ON "Catch2_FOUND;yaml-cpp_FOUND" OFF)

find_package(Sphinx)
cmake_dependent_option(BUILD_DOCS "Build the documentation using sphinx" ON Sphinx_FOUND OFF)
Expand Down

0 comments on commit ce1d640

Please sign in to comment.