mirror of
https://github.com/reactos/CMake.git
synced 2024-12-20 02:28:25 +00:00
c332e0bf3c
Isolation of policy changes inside scripts is important for protecting the including context. This teaches include() and find_package() to imply a cmake_policy(PUSH) and cmake_policy(POP) around the scripts they load, with a NO_POLICY_SCOPE option to disable the behavior. This also creates CMake Policy CMP0011 to provide compatibility. See issue #8192.
9 lines
270 B
CMake
9 lines
270 B
CMake
cmake_minimum_required(VERSION 2.6.3)
|
|
|
|
# Make sure a policy set differently by our includer is now correct.
|
|
cmake_policy(GET CMP0003 cmp)
|
|
check(CMP0003 "NEW" "${cmp}")
|
|
|
|
# Test allowing the top-level file to not have cmake_minimum_required.
|
|
cmake_policy(SET CMP0000 OLD)
|