summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.h
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-05-14 21:29:42 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-05-14 21:29:42 (GMT)
commit47f0dbd70b83ccb5e314abee5feded2ed50a23fb (patch)
treeb3821ced0886a295429aa3e014e4f7abf087a5aa /Source/CPack/cmCPackGenerator.h
parent6ba055bacdce1cdf7a74008b980440027f275d94 (diff)
downloadCMake-47f0dbd70b83ccb5e314abee5feded2ed50a23fb.zip
CMake-47f0dbd70b83ccb5e314abee5feded2ed50a23fb.tar.gz
CMake-47f0dbd70b83ccb5e314abee5feded2ed50a23fb.tar.bz2
CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION
The [usually] wrong usage of absolute DESTINATION in INSTALL rules keeps popping-up on the ML. We shall have some way to: 1) easily detect it. 2) forbids this for some CPack generator like NSIS In fact it should certainly be forbidden for *any* generators when used on Windows but we may implements that on top of the current patch. The patch ask the task to the generated cmake_install.cmake scripts. Those scripts are a little bit more complicated with that but iff there are absolute DESTINATION. This cost nothing if relative DESTINATION are used. Two new vars are introduced (and documented to handle that): CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION and CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
Diffstat (limited to 'Source/CPack/cmCPackGenerator.h')
-rw-r--r--Source/CPack/cmCPackGenerator.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index 68ee3f2..ddde8b5 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -206,13 +206,22 @@ protected:
/**
* Does the CPack generator support CPACK_SET_DESTDIR?
- * The default legacy value is 'true' generator
+ * The default legacy value is 'SETDESTDIR_SUPPORTED' generator
* have to override it in order change this.
* @return CPackSetDestdirSupport
*/
virtual enum CPackSetDestdirSupport SupportsSetDestdir() const;
/**
+ * Does the CPack generator support absolute path
+ * in INSTALL DESTINATION?
+ * The default legacy value is 'true' generator
+ * have to override it in order change this.
+ * @return true if supported false otherwise
+ */
+ virtual bool SupportsAbsoluteDestination() const;
+
+ /**
* Does the CPack generator support component installation?.
* Some Generators requires the user to set
* CPACK_<GENNAME>_COMPONENT_INSTALL in order to make this