cmake: Make EVMC_TOOLS a dependant option of EVMC_TESTING

When EVMC_TESTING is ON, the EVMC_TOOLS is forced to be ON as well (user can control the value).
This commit is contained in:
Paweł Bylica 2019-11-27 11:24:41 +01:00
parent 23b634f300
commit d43d827d88
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 11 additions and 11 deletions

View File

@ -9,25 +9,25 @@ if(TARGET evmc)
return()
endif()
option(EVMC_INSTALL "Enable EVMC installation (e.g. make install)" ON)
option(EVMC_TESTING "Build everything (libraries, tools, examples, internal tests)" OFF)
option(EVMC_TOOLS "Build EVMC tools" ${EVMC_TESTING})
if(EVMC_TESTING OR EVMC_TOOLS)
set(hunter_and_examples_required TRUE)
endif()
option(EVMC_EXAMPLES "Build EVMC examples" ${hunter_and_examples_required})
option(HUNTER_ENABLED "Enable Hunter package manager support" ${hunter_and_examples_required})
include(cmake/cable/bootstrap.cmake)
include(CableBuildType)
include(CableCompilerSettings)
include(CMakeDependentOption)
include(CablePackage)
include(CableToolchains)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
option(EVMC_INSTALL "Enable EVMC installation (e.g. make install)" ON)
option(EVMC_TESTING "Build everything (libraries, tools, examples, internal tests)" OFF)
cmake_dependent_option(EVMC_TOOLS "Build EVMC tools" OFF
"NOT EVMC_TESTING" ON)
option(EVMC_EXAMPLES "Build EVMC examples" ${EVMC_TOOLS})
option(HUNTER_ENABLED "Enable Hunter package manager support" ${EVMC_TOOLS})
if(HUNTER_ENABLED)
set(HUNTER_CONFIGURATION_TYPES Release CACHE STRING "Build type of Hunter packages")
include(HunterGate)