CMake/Tests/RunCMake/project/CMakeLists.txt
Craig Scott e5a9ccbcc8 project: Always set <PROJECT-NAME>_* as normal variables
Re-introduce the behavior originally introduced in CMake 3.30.3 by
commit c1ece78d11 (project: non cache <project> prefix variables are
also created, 2024-08-27, v3.30.3~2^2), but this time with a policy for
compatibility.

Issue: #25714
Issue: #26243
2024-10-08 10:07:11 -04:00

16 lines
576 B
CMake

if("x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired")
# No cmake_minimum_required(VERSION)
elseif(RunCMake_TEST MATCHES "^CMP0048")
cmake_minimum_required(VERSION 2.8.12) # old enough to not set CMP0048
else()
cmake_minimum_required(VERSION 3.10)
# CMP0180 needs to be set before the project() call for these tests
if("x${RunCMake_TEST}" STREQUAL "xCMP0180-NEW")
cmake_policy(SET CMP0180 NEW)
elseif("x${RunCMake_TEST}" STREQUAL "xCMP0180-OLD")
cmake_policy(SET CMP0180 OLD)
endif()
endif()
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)