Commit Graph

65 Commits

Author SHA1 Message Date
Stephen Kelly ddc052052b Always use the auto_ptr from cmsys.
This is for consistency throughout cmake. The cmsys version exists
becaues uses of auto_ptr types as return types does not work with
some implementations in ancient compilers.
2012-11-21 00:56:36 +01:00
Brad King 7cdc95ac36 Merge topic 'CPack-BugFixesSet'
b6f7881 Remove seemingly bogus duplicate CPACK_PACKAGE_FILE_NAME call.
2012-11-13 14:32:09 -05:00
Andreas Mohr b6f7881962 Remove seemingly bogus duplicate CPACK_PACKAGE_FILE_NAME call.
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-11-11 21:54:35 +01:00
Andreas Mohr 572d9e1e05 Correct string literal typo (have "(NULL)" like all other cases).
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-11-10 15:49:05 +01:00
David Cole 7ff422fb8e Merge topic 'CPack-ArchiveGen-andDESTIR_ON'
ddec053 Make CPACK_SET_DESTDIR work with archive generator + component-based packaging
2012-10-17 16:44:06 -04:00
Eric NOULARD ddec053321 Make CPACK_SET_DESTDIR work with archive generator + component-based packaging
Fix bug #13004. The patch is from Stanislaw Szymczyk.
2012-10-14 18:50:57 +02:00
Eric NOULARD 561b4baead CPACK_XX_ON_ABSOLUTE_INSTALL_DESTINATION is now properly checked for ON/OFF
This fixes bug #0013490
2012-10-14 14:36:14 +02:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
David Cole db1857e142 Merge topic 'CPackNSIS-warnDESTDIRandABSOLUTE'
4986d52 Use CPACK_xxx and CMAKE_xxx in a consistent way.
f90223c Fix KWStyle warning
47f0dbd CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION
6ba055b CPack add easy possibility to warn about CPACK_SET_DESTDIR
2012-05-24 13:38:03 -04:00
Eric NOULARD 4986d525af 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.
2012-05-20 17:28:54 +02:00
Eric NOULARD 47f0dbd70b 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
2012-05-14 23:29:42 +02:00
Eric NOULARD 6ba055bacd CPack add easy possibility to warn about CPACK_SET_DESTDIR
CPackNSIS will only warn but sooner or later it should error out
2012-05-14 20:26:15 +02:00
Eric NOULARD 3d10f65e39 CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193 2012-05-09 18:02:13 +02:00
Eric NOULARD 805c1b21d6 Handle CPACK_MONOLITHIC_INSTALL in some rare use cases.
For example, when CPACK_<GEN>_COMPONENT_INSTALL and
CPACK_MONOLITHIC_INSTALL are both set. Previously, this
combination of variable settings produced an error without
any explanation. Now, in this case CPACK_MONOLITHIC_INSTALL wins
without trouble.
This is useful for when e.g. CPACK_ARCHIVE_COMPONENT_INSTALL is
globally on and one wants MONOLITHIC install for STGZ (but not
other generators). The same behavior may be obtained by re-setting
CPACK_ARCHIVE_COMPONENT_INSTALL to 0 but in any case the
'both set' case should have been handled without error.
2012-03-18 20:21:35 +01:00
Eric NOULARD 5d18851b25 CPackArchive restore default behavior and provide new variable.
CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY should be set by the user
in order to get the toplevel directory included in the archive
whenever a componentized archive is requested. This solves bug #12129
and keeps fully backward compatible behavior.
2012-02-01 23:32:50 +01:00
Daniel Nelson 3cab24a974 CPack Add top level directory in component install for Archive Generators
This patch fixes bug #0012129
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-01-13 22:01:53 +01:00
Johan Björk 7b8dcdd173 CPack: Do not recurse through directory symlinks (#12284)
...when building CPack archive-based packages (.tar.gz and similar)

Rather, put the symlinks-to-directories into the archive as files,
and expect/trust that the things the symlinks point to are also in
the archive.
2011-09-06 14:04:37 -04:00
Johan Björk 856a9e499f RunSingleCommand: Replace verbose boolean with enum
No behaviour change, this prepares for adding a flag to skip the merging
of output streams.
2011-07-28 10:42:03 -04:00
Eric NOULARD d3fd945900 CPackRPM Fix #12096: handle absolute install path with component install 2011-04-17 17:12:38 +02:00
Eric NOULARD 9c43824066 Fix KWStyle warnings 2011-04-04 14:59:58 -04:00
Clinton Stimpson 64a5e20999 Combine component packaging methods into an enum.
Also allow generators to override the default packaging method.
Add a ONE_PER_GROUP option so that method can be specified by the user without relying on defaults.
2011-03-31 13:33:03 -04:00
Eric NOULARD 6dfc818394 CPack fix #11930 and simplifies component packaging options 2011-03-23 18:28:05 +01:00
Eric NOULARD 21007f8989 CPack fix CPackDeb crash when CPackDeb.cmake ends with a FATAL_ERROR 2011-03-19 11:12:31 +01:00
Eric NOULARD b813f863e6 CPack fix compile error on VS70 and avoid KWStyle warnings 2011-03-04 22:57:37 +01:00
Eric NOULARD 77333a92c2 CPack more robust way to collect files belonging to a component 2011-03-03 22:43:31 +01:00
Eric NOULARD f2ab270e6f CPack fix KWStyle warning 2011-02-24 00:29:25 +01:00
Eric NOULARD 4deb308e82 CPack Authorize DISPLAY_NAME usage in component package
Second (last) part fix of feature request #11814
2011-02-22 23:49:49 +01:00
Eric NOULARD 494bb8ada7 CPackRPM honors all the different ways of packaging components
RPM cannot easily 'merge' differents directory into a single RPM
with shared prefix. So more flexibility has been added to generic
CPackGenerator in order to let the specific generator chose the
local installation directory for each component.
2011-02-06 21:23:10 +01:00
Brad King ceae8b1062 Merge topic 'CPack-MoreComponentControls'
6d94ea3 CPack  use IsOn when it's better than IsSet
2010-12-16 13:59:45 -05:00
Eric NOULARD 6d94ea3692 CPack use IsOn when it's better than IsSet
This authorize more control because one can set
CPACK_ARCHIVE_COMPONENT_INSTALL to ON globally
and then set it selectively to OFF inside
a CPack project config file.
Sidenote: GetOption ought to be a 'const' method.
2010-12-12 12:55:02 +01:00
Eric NOULARD 17b05e6d7f CPack Honor CPACK_MONOLITHIC_INSTALL at CPack time too 2010-12-12 12:30:42 +01:00
Eric NOULARD 66e86b4770 CPack fix kwstyle breakage and make CPackRPM backward compatible
backward compatible= No componentized RPM unless requested
using CPACK_RPM_COMP0NENT_INSTALL
2010-11-15 20:54:19 +01:00
Eric NOULARD 2c84d169b3 CPackRPM add basic component support to CPackRPM
basic means 1 RPM per component and no dependency handling
this implies some CPackGenerator refactoring
2010-11-13 17:56:36 +01:00
Bill Hoffman 390117435a Fix KWStyle line length issues. 2010-09-15 16:41:41 -04:00
Brad King c9b0e1da5c Merge topic 'CPack-PreserveSymlinksInInstalledDirs-v2'
013e003 CPack  handle symlinks in CPACK_INSTALLED_DIRECTORIES fix for bug5430
2010-09-08 11:07:38 -04:00
Brad King 65fa0f0235 Merge topic 'CPackArchiveGenerator-ComponentSupport'
a986daf CPack fix broken compilation for CygwinSource generator
873e99a CPackArchiveGenerator improve usability and robustness
654683a CPackArchiveGenerator  add component supports
36a550a CPackArchiveGenerator  use cmArchiveWrite wrapper
2010-08-31 14:24:32 -04:00
Eric NOULARD 013e0039ee CPack handle symlinks in CPACK_INSTALLED_DIRECTORIES fix for bug5430
The proposed solution is to avoid to CopyIfDifferent any links
found in CPACK_INSTALLED_DIRECTORIES but memorize them instead
then at the end of the processing for each dir do re-create the
link in the installed tree.
Current patch should work if the link are "local" to the directory.
2010-08-28 16:50:06 +02:00
Eric NOULARD 654683adc7 CPackArchiveGenerator add component supports 2010-08-24 21:42:21 +02:00
Eric NOULARD 6a521f8604 CPack Enable better handling of absolute installed files
The idea of the patch is to let the install generator define
CPACK_ABSOLUTE_INSTALL_FILES then when CMake is installing
project he will concatenate the list of files and give
it to specific CPack Generator by defining CPACK_ABSOLUTE_INSTALL_FILES
to be the list of ALL files that were installed using absolute destination.
An example of use has been applied to RPM generator which now
tries to automatically build a relocatable package.
2010-08-23 17:38:33 +02:00
Eric NOULARD 40dc97dc73 CPack Backward-compatibly enforce DESTDIR for DEB and RPM 2010-08-23 16:14:40 +02:00
Eric NOULARD bd510fe4ea CPack: Avoid member shadowing after API refactor (part2)
After converting method arguments to members we need to avoid use of the
same names as local variables and other method arguments. One more fix.
2010-08-12 20:18:46 +02:00
Brad King 31a313d470 CPack: Avoid member shadowing after API refactor
After converting method arguments to members we need to avoid use of the
same names as local variables and other method arguments.
2010-08-11 16:17:09 -04:00
Eric NOULARD cd7b8a03f5 CPack: Refactor API in order to handle multi-file packages
The multi-argument CompressFiles(...) method has been replace by the
no-argument PackageFiles() method and 3 more member variables.  This
will enable implemention of multi-package generators.  Now each specific
generator (which overloads PackageFiles()) may decide to change the name
and/or the number of generated package files.
2010-08-11 14:09:52 -04:00
Brad King fdb5f78705 CPack: Try harder to remove temporary dir (#10793)
Windows filesystems sometimes lock files temporarily.  Try removing the
CPack temp install folder multiple times before giving up.
2010-06-04 14:32:08 -04:00
Alexander Neundorf eb91859d6f remove unused variables, reported by icpc
Alex
2009-10-03 08:35:57 -04:00
Brad King f40406ed6b Fix default install prefix on Haiku
Since Haiku does not have /usr (and therefore /usr/local), this commit
changes the default install prefix to the equivalent directory of
/boot/common.

See issue #9607.
2009-09-30 08:31:53 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King e9d7ebb3ec BUG: Do not double-initialize local generators
All global generator CreateLocalGenerator methods automatically
initialize the local generator instances with SetGlobalGenerator.  In
several places we were calling SetGlobalGenerator again after receiving
the return value from CreateLocalGenerator.  The double-initializations
leaked the resources allocated by the first call to SetGlobalGenerator.
This fix removes the unnecessary calls.
2009-07-28 10:47:02 -04:00
Brad King dc13914cd6 ENH: Create cmXMLSafe to help escapes in XML
This class provides easy syntax to efficiently insert blocks of data
into XML documents with proper escapes.  It replaces the old
cmCTest::MakeXMLSafe and cmSystemTools::MakeXMLSafe methods which
allocated extra memory instead of directly streaming the data.
2009-02-05 16:31:37 -05:00
David Cole cc51ddd34b BUG: Use the DESTDIR prefix when creating the directory in CPack when CPACK_SET_DESTDIR is ON. Thanks to Petri Hodju for reporting this regression to the CMake mailing list: http://www.cmake.org/pipermail/cmake/2008-October/024563.html. 2008-10-15 09:35:27 -04:00