mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-26 16:39:44 -06:00
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.5.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 5845c218d7 (Deprecate compatibility with
CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
17 lines
531 B
CMake
17 lines
531 B
CMake
include(RunCMake)
|
|
set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON)
|
|
|
|
# Protect tests from running inside the default install prefix.
|
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix")
|
|
|
|
run_cmake(CMP0041-OLD)
|
|
run_cmake(CMP0041-NEW)
|
|
run_cmake(CMP0041-WARN)
|
|
|
|
# Protect tests from running inside the default install prefix.
|
|
set(RunCMake_TEST_OPTIONS "--install-prefix ${RunCMake_BINARY_DIR}/NotDefaultPrefix")
|
|
|
|
run_cmake(CMP0041-tid-OLD)
|
|
run_cmake(CMP0041-tid-NEW)
|
|
run_cmake(CMP0041-tid-WARN)
|