mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 21:58:50 -05:00
ENH: Add "if(POLICY policy-id)" option for IF command.
- This will help projects support multiple CMake versions.
- In order to set a policy when using a newer CMake but still
working with an older CMake one may write
if(POLICY CMP1234)
cmake_policy(SET CMP1234 NEW)
endif(POLICY CMP1234)
- Note that since CMake 2.4 does not have if(POLICY) supporting
it will also require using "if(COMMAND cmake_policy)"
This commit is contained in:
@@ -139,6 +139,9 @@ public:
|
||||
" if(COMMAND command-name)\n"
|
||||
"True if the given name is a command, macro or function that can be "
|
||||
"invoked.\n"
|
||||
" if(POLICY policy-id)\n"
|
||||
"True if the given name is an existing policy "
|
||||
"(of the form CMP<NNNN>).\n"
|
||||
" if(EXISTS file-name)\n"
|
||||
" if(EXISTS directory-name)\n"
|
||||
"True if the named file or directory exists. "
|
||||
|
||||
Reference in New Issue
Block a user