cmake/Tests/RunCMake/CMP0163/CMP0118-NEW/CMP0163-WARN-Test1b.cmake
2024-07-09 14:46:46 +02:00

7 lines
388 B
CMake

cmake_policy(SET CMP0118 NEW)
# Extract from the current file the name of the test-case and value for CMP0163 and call the test-case.
cmake_path(GET CMAKE_CURRENT_LIST_FILE STEM testcase)
string(REGEX MATCH "NEW|OLD|WARN" value_for_CMP0163 "${testcase}")
string(REGEX REPLACE "${value_for_CMP0163}" "Common" testcase "${testcase}")
include(${CMAKE_CURRENT_LIST_DIR}/../${testcase}.cmake)