summaryrefslogtreecommitdiffstats
path: root/Tests/PolicyScope/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* cmake_policy: Add undocumented PARENT_SCOPE option to GETBrad King2018-04-181-0/+8
| | | | | | Policies affecting the behavior of CMake-provided macros and functions need to be able to get the policy setting as of the call site rather than the definition site. Add an undocumented option to do this.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Allow users to specify defaults for unset policiesBrad King2011-01-041-0/+18
| | | | | | | | | | Check CMAKE_POLICY_DEFAULT_CMP<NNNN> for a default when policy CMP<NNNN> would otherwise be left unset. This allows users to set policies on the command line when the project does not set them. One may do this to quiet warnings or test whether a project will build with new behavior without modifying code. There may also be cases when users want to build an existing project release using new behavior for policies unknown to the project at the time of the release.
* ENH: Isolate policy changes in included scriptsBrad King2009-01-221-1/+32
| | | | | | | | 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.
* ENH: Better policies for functions and macrosBrad King2009-01-221-0/+55
This teaches functions and macros to use policies recorded at creation time when they are invoked. It restores the policies as a weak policy stack entry so that any policies set by a function escape to its caller as before.