Commit Graph

133 Commits

Author SHA1 Message Date
Brad King 01c669e643 COMP: Avoid unused arg warnings in cmFileCommand
The default cmFileCopier::ReportCopy implementation is empty, so we
should leave out the argument names.
2009-04-29 14:50:28 -04:00
Brad King d91c5b1a07 COMP: Fix nested class member access
Nested classes have no special access to other members of their
enclosing class.  In cmFileCopier the nested class MatchRule must use
MatchProperties, so we grant friendship to it.
2009-04-29 13:57:19 -04:00
Brad King 222abaad5b COMP: Fix non-virtual destructor warning
This gives cmFileCopier a virtual destructor since it has virtual
methods.  While we never actually delete through a base pointer (or
dynamically at all), the compiler doesn't know and warns anyway.
2009-04-29 13:33:05 -04:00
Brad King c58ca24286 ENH: Create file(COPY) command signature
The file(INSTALL) command has long been undocumented and used only to
implement install() scripts.  We now document it and provide a similar
file(COPY) signature which is useful in general-purpose scripts.  It
provides the capabilities of install(DIRECTORY) and install(FILES) but
operates immediately instead of contributing to install scripts.
2009-04-29 13:13:29 -04:00
Brad King b6cb117346 ENH: Teach file(INSTALL) relative paths
This teaches the undocumented file(INSTALL) command to deal with
relative paths.  Relative input file paths are evaluated with respect to
the current source directory.  Relative output file paths are evaluated
with respect to the current binary directory.

While this command is currently used only in cmake_install.cmake scripts
(in -P script mode), this cleans up its interface in preparation for a
documented signature.
2009-04-29 13:13:08 -04:00
Brad King 6aaa7d45bf ENH: Refactor file(INSTALL) implementation
The undocumented file(INSTALL) is implemented by a cmFileInstaller class
inside cmFileCommand.  This refactors the class to split out code not
specific to installation into a cmFileCopier base class.
2009-04-29 13:12:58 -04:00
Brad King 97263b6cdd ENH: Send all file installations through one path
This creates a single cmFileInstaller method to dispatch installation of
symlinks, directories, and files.  The change removes duplicate tests of
input file type and makes the decision more consistent.
2009-04-29 08:47:13 -04:00
Brad King bc6eec18dc ENH: Better error on file perm or time failure
This improves the error message produced during installation when CMake
cannot set file modification time or permissions.
2009-04-29 08:47:04 -04:00
Brad King f180a834bf BUG: Error when install dir cannot be created
This teaches the undocumented file(INSTALL) command to report an error
when it cannot create the destination directory.
2009-04-29 08:46:56 -04:00
Brad King dc0621ba5a ENH: Simplify CMAKE_INSTALL_ALWAYS implementation
This simplifies cmFileInstaller internally by storing the 'always' mark
as an instance variable instead of passing it through all method
signatures.
2009-04-29 08:46:36 -04:00
Brad King 8d685184f3 ENH: Simplify construction of cmFileInstaller
This cleans up the cmFileInstaller constructor signature.
2009-04-29 08:46:21 -04:00
Brad King 03d8b8ad57 BUG: Fix required permissions check again
While copying a directory the destination must have owner rwx
permissions.  This corrects our check, this time with correct operator
precedence using parenthesis.
2009-04-28 08:19:44 -04:00
Brad King da993b64ce ENH: Remove unused PROPERTIES from file(INSTALL)
The undocumented file(INSTALL) command used to support a PROPERTIES
option, but no install code still uses it.  This removes the option.
2009-04-27 13:20:57 -04:00
Brad King 0178268901 BUG: Fix required permissions check for dir copy
While copying a directory the destination must have owner rwx
permissions.  This corrects our check.
2009-04-27 13:20:47 -04:00
Brad King 0d92350bb6 ENH: Create file(RENAME) command mode
This creates command "file(RENAME <oldname> <newname>)" to rename a file
or directory within a single disk volume.
2009-04-15 09:58:13 -04:00
Brad King 2123b432d9 ENH: Teach file(REMOVE) how to use relative paths
This teaches the command to interpret relative paths with respect to the
location of the invoking CMakeLists.txt file.  The convention is already
used by most commands and won't change the behavior in script mode.
2009-03-06 09:14:57 -05:00
Brad King f074d9f571 ENH: Add undocumented file(DIFFERENT) command
This new command will be used by generated installation scripts to
determine whether an already-installed export file has changed.
2009-01-07 14:16:35 -05:00
Brad King 86aeefc7c9 COMP: Fix installation of cmake-gui by CMake 2.4
When CMake 2.4 generates the build tree for CMake itself it asks the
built CMake to install itself using the rules that 2.4 generated.  Since
the install rules use undocumented commands that are not compatible from
2.4 to 2.6 we need a special case to avoid failure.  This sets a special
indicator variable in the install rules that enables a compatibility
hack to support the old install rule format.
2009-01-05 11:05:57 -05:00
Brad King e2fa035c70 ENH: Refactor internal file(INSTALL) arg parsing
The internal file(INSTALL) command argument parsing used several
booleans with at most one set to true at a time to track argument
parsing state.  This refactors it to use one enumeration.
2009-01-05 11:03:41 -05:00
David Cole 0fafdb7eb8 BUG: Do not copy permissions of files when making the copy in an install rule. If the source file was read-only, this prevents the subsequent set of the destination file's modification time, making the copied file always different in time-stamp than the original and always installing a new file with a new time stamp (but the same content) causing unnecessary downstream incremental rebuilds. As part of this fix, add an optional copyPermissions parameter to the SystemTools routines CopyFileIfDifferent, CopyFileAlways, CopyAFile and CopyADirectory. The copyPermissions parameter defaults to true to preserve the behavior of these routines for existing callers. 2008-12-18 10:43:24 -05:00
David Cole bd1935dcd1 ENH: Improve FILE GLOB_RECURSE handling of symlinks with a new CMake policy. CMP0009 establishes NEW default behavior of not recursing through symlinks. OLD default behavior or explicit FOLLOW_SYMLINKS argument to FILE GLOB_RECURSE will still recurse through symlinks. 2008-09-11 14:34:04 -04:00
David Cole ccf603f0c2 ENH: Add the RECURSE_SYMLINKS_OFF flag to the FILE GLOB_RECURSE command. Exposes the recently added kwsys capability that prevents recursing through symlinks to CMake scripts. 2008-08-23 13:33:13 -04:00
Brad King 8063dd293e ENH: Inform user when RPATH or RUNPATH is removed 2008-08-14 09:53:26 -04:00
Brad King 757875df91 ENH: Inform user when RPATH is set during installation.
- Original patch from Alex.
  - Modified to print only when RPATH is actually set.
2008-05-27 10:22:03 -04:00
Brad King b9ede3c86d BUG: Fix previous change to file(STRINGS) command.
- Previous change added form-feed as a string terminator.
  - Instead it should just be recognized as a valid string character.
2008-05-17 11:42:11 -04:00
Brad King 0c6ba12efd ENH: Teach Fortran compiler identification about the Portland Group compiler (PGI). 2008-05-16 17:50:24 -04:00
Brad King 1381aab4b7 BUG: Remove check for files written by file(WRITE) being loaded.
- CMake 1.8 and below did not do the check but could get in
    infinite loops due to the local generate step.
  - CMake 2.0 added the check but failed to perform it in directories
    with no targets (see bug #678).
  - CMake 2.2 removed the local generate which fixed the problem but
    did not remove the check.
  - Between CMake 2.4 and 2.6.0rc6 the check was fixed to work even
    when no targets appear in a directory (see bug #6923).
  - Bottom line: the check is no longer needed.
2008-04-30 13:42:40 -04:00
Brad King fdc3bfff7c ENH: Improve RPATH behavior during installation.
- If new RPATH is empty then remove the entry completely
  - Preserve file modification time so installation is not repeated
  - If installed file already exists remove it if its RPATH
    does not match that expected
2008-04-14 15:02:44 -04:00
Brad King c408760a8a ENH: Improve error message when installation file(CHRPATH) cannot change the RPATH. 2008-04-07 10:55:52 -04:00
Bill Hoffman 45ce11a075 ENH: install the mac application bundle into /Applications directly with no enclosing folder 2008-04-04 16:02:50 -04:00
Sebastien Barre cddb1346b7 BUG: the directory the FILE DOWNLOAD command is writing to might not exist. 2008-03-13 09:28:26 -04:00
Brad King d732de4a8a ENH: Cleanup builtin chrpath support
- Move computation of extended build-tree rpath
    to cmComputeLinkInformation
  - Only enable the extended build-tree rpath if
    the target will be installed
  - Generalize the interface of file(CHRPATH)
  - When changing the rpath on installation only
    replace the part generated by CMake because
    the native tools (ex SunCC on Linux) might have
    added their own part to the rpath
2008-03-02 14:35:23 -05:00
Brad King 34c76d4304 ENH: Use builtin chrpath instead of relinking ELF targets
- Add cmSystemTools::ChangeRPath method
  - Add undocumented file(CHRPATH) command
  - When installing use file(CHRPATH) to change the rpath
    instead of relinking
  - Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils
  - Remove CMAKE_USE_CHRPATH option since this should
    always work
2008-03-01 12:51:07 -05:00
Bill Hoffman 001d7fa348 ENH: add more information to message 2008-02-18 15:42:55 -05:00
Bill Hoffman 0bfad2946d ENH: make sure files are binary for download and make status a pair of value string 2008-02-07 13:26:16 -05:00
Bill Hoffman a752fc5e85 ENH: remove debug print stuff 2008-02-06 09:46:58 -05:00
Bill Hoffman 7dfcc3fc12 ENH: add DOWNLOAD option to FILE command 2008-02-06 09:35:02 -05:00
Ken Martin 0e69d38004 ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class 2008-01-23 10:28:26 -05:00
Alexander Neundorf 9f2790d3e7 BUG: with cmake 2.4 INSTALL_FILES() with no files was accepted by cmake,
with cmake cvs without this patch an invalid cmake_install.cmake script was
generated in this case, it failed with an error if no files were given. So
just do nothing if no files are listed to make it compatible.

http://lists.kde.org/?l=kde-commits&m=119965185114478&w=2

Alex
2008-01-07 14:52:45 -05:00
Brad King 4e514a5e00 BUG: File installation should overwrite the destination if the file times differ at all rather than only if the source file is newer. Users expect installation to overwrite destination files. This addresses the re-opening of bug#3349. 2008-01-04 14:22:57 -05:00
Brad King c61a3b6fe9 STYLE: Fix line-too-long. 2008-01-03 09:40:38 -05:00
Alexander Neundorf b6918bd9a4 COMP: fix build on Windows with gcc, patch from Maik Beckmann
Alex
2008-01-03 04:19:30 -05:00
Alexander Neundorf 7b54af713d ENH: add the keywords OFFSET and HEX to the FILE() command, using OFFSET an
offset can be specified where the reading starts, and using HEX the data can
be converted into a hex string, so binary data can be compared with text
functions
-add docs for LIMIT, OFFSET and HEX

Alex
2008-01-02 16:46:38 -05:00
Brad King 60bf0531b0 ENH: Added FILES_MATCHING option to INSTALL(DIRECTORY). This will help install a tree of header files while ignoring non-headers. 2008-01-02 15:17:56 -05:00
Brad King a2b2742543 ENH: During file installation treat the source file as a dependency of the installed file. Install the file only if the destination is older than the source. Set the file times on the installed file to match those of the source file. This should greatly improve the speed of repeated installations because it removes the comparison of file contents. This addresses bug#3349. 2007-10-05 09:46:28 -04:00
Alexander Neundorf 55303d6dd2 STYLE: fix line lengths
Alex
2007-07-20 08:36:16 -04:00
Brad King e25dd3b903 COMP: Remove unused argument. 2007-07-02 16:04:15 -04:00
Brad King 7f29f8966d ENH: Further cleanup of installation script generation. The per-component and per-configuration testing is now done in cmake code instead of in the FILE(INSTALL) command. The generation of the cmake code to do these tests is centralized in cmInstallGenerator. Old-style shared library versioning and component/config support code has been removed from FILE(INSTALL). This commit is surrounded by the tags CMake-InstallGeneratorCleanup2-pre and CMake-InstallGeneratorCleanup2-post. 2007-07-02 14:56:57 -04:00
Brad King c0d3ab2d2b BUG: Need to compute the correct versioned name for executables on cygwin. This addresses bug#5238. 2007-06-27 16:10:39 -04:00
Alexander Neundorf b956fc2406 STYLE: remove out commented code
Alex
2007-06-07 13:51:17 -04:00