diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2012-05-20 15:28:54 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2012-05-20 15:28:54 (GMT) |
commit | 4986d525afcddcad6f8610c85cc7d2cf46701ad5 (patch) | |
tree | 070cafea4f5f2b6bd2c26a190288a3634f203616 /Source/cmDocumentVariables.cxx | |
parent | f90223cafc4be83a1556e2d238e2af596afbd616 (diff) | |
download | CMake-4986d525afcddcad6f8610c85cc7d2cf46701ad5.zip CMake-4986d525afcddcad6f8610c85cc7d2cf46701ad5.tar.gz CMake-4986d525afcddcad6f8610c85cc7d2cf46701ad5.tar.bz2 |
Use CPACK_xxx and CMAKE_xxx in a consistent way.
CMAKE_xxx vars are now used in the CMake-generated cmake_install.cmake
script while CPACK_xxx equivalent vars are used from within CPack.
CPack is responsible for getting/forwarding definitions of
CPACK_xxxx var corresponding to CMAKE_xxxx when invoking
CMake-generated install scripts.
As a consequence:
CMAKE_ABSOLUTE_DESTINATION_FILES
CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
may be used from outside CPack as well.
e.g.
cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=1 -P cmake_install.cmake
works as expected.
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r-- | Source/cmDocumentVariables.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 897e516..fb40024 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -833,6 +833,36 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Default is ON.",false, "Variables That Change Behavior"); + cm->DefineProperty + ("CMAKE_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE, + "List of files which have been installed using " + " an ABSOLUTE DESTINATION path.", + "This variable is defined by CMake-generated cmake_install.cmake " + "scripts." + " It can be used (read-only) by program or script that source those" + " install scripts. This is used by some CPack generators (e.g. RPM).", + false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE, + "Ask cmake_install.cmake script to warn each time a file with " + "absolute INSTALL DESTINATION is encountered.", + "This variable is used by CMake-generated cmake_install.cmake" + " scripts. If ones set this variable to ON while running the" + " script, it may get warning messages from the script.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE, + "Ask cmake_install.cmake script to error out as soon as " + "a file with absolute INSTALL DESTINATION is encountered.", + "The fatal error is emitted before the installation of " + "the offending file takes place." + " This variable is used by CMake-generated cmake_install.cmake" + " scripts. If ones set this variable to ON while running the" + " script, it may get fatal error messages from the script.",false, + "Variables That Change Behavior"); // Variables defined by CMake that describe the system |