summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallGenerator.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-05-20 15:28:54 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-05-20 15:28:54 (GMT)
commit4986d525afcddcad6f8610c85cc7d2cf46701ad5 (patch)
tree070cafea4f5f2b6bd2c26a190288a3634f203616 /Source/cmInstallGenerator.cxx
parentf90223cafc4be83a1556e2d238e2af596afbd616 (diff)
downloadCMake-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/cmInstallGenerator.cxx')
-rw-r--r--Source/cmInstallGenerator.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 2b1db79..3be2c2b 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -60,7 +60,7 @@ void cmInstallGenerator
std::string dest = this->GetInstallDestination();
if (cmSystemTools::FileIsFullPath(dest.c_str()))
{
- os << "list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES\n";
+ os << "list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES\n";
os << indent << " \"";
for(std::vector<std::string>::const_iterator fi = files.begin();
fi != files.end(); ++fi)
@@ -80,16 +80,16 @@ void cmInstallGenerator
}
}
os << "\")\n";
- os << indent << "IF (CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
+ os << indent << "IF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
os << indent << indent << "message(WARNING \"ABSOLUTE path INSTALL "
- << "DESTINATION : ${CPACK_ABSOLUTE_DESTINATION_FILES}\")\n";
- os << indent << "ENDIF (CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
+ << "DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}\")\n";
+ os << indent << "ENDIF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
- os << indent << "IF (CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
+ os << indent << "IF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
os << indent << indent << "message(FATAL_ERROR \"ABSOLUTE path INSTALL "
- << "DESTINATION forbidden (by CPack): "
- << "${CPACK_ABSOLUTE_DESTINATION_FILES}\")\n";
- os << indent << "ENDIF (CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
+ << "DESTINATION forbidden (by caller): "
+ << "${CMAKE_ABSOLUTE_DESTINATION_FILES}\")\n";
+ os << indent << "ENDIF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
}
os << "FILE(INSTALL DESTINATION \"" << dest << "\" TYPE " << stype.c_str();
if(optional)