cmake/Tests/RunCMake/CMakeDependentOption/Regex-CMP0127-NEW.cmake

8 lines
199 B
CMake
Raw Normal View History

2021-11-20 13:41:27 +01:00
include(CMakeDependentOption)
cmake_policy(SET CMP0127 NEW)
set(FOO "lower")
cmake_dependent_option(USE_FOO "Use Foo" ON "FOO MATCHES \"(UPPER|lower)\"" OFF)
message(STATUS "USE_FOO='${USE_FOO}'")