mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.21 and below to encourage projects to port away from setting policies to OLD.
11 lines
320 B
CMake
11 lines
320 B
CMake
|
|
cmake_policy(VERSION 3.5)
|
|
|
|
file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CMP0122-library-name.txt" prefixes)
|
|
|
|
list(GET prefixes 0 std_prefix)
|
|
list(GET prefixes 1 lib_prefix)
|
|
if (NOT std_prefix STREQUAL lib_prefix)
|
|
string (APPEND RunCMake_TEST_FAILED "\nFound prefix: '${lib_prefix}', expected: '${std_prefix}'.")
|
|
endif()
|