cmake/Tests/RunCMake/project/ProjectCMP0126.cmake
2024-08-30 13:50:19 +02:00

12 lines
414 B
CMake

cmake_policy(SET CMP0126 NEW)
set(example_SOURCE_DIR "bad/path")
set(example_BINARY_DIR "bad/path")
project(example LANGUAGES)
if(NOT "${example_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
message(FATAL_ERROR "example_SOURCE_DIR not set to expected value")
endif()
if(NOT "${example_BINARY_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "example_BINARY_DIR not set to expected value")
endif()