summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | 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.
* Add parentheses around '&&' between '||' for gccBrad King2009-09-111-2/+2
| | | | | | | The GNU compiler warns about possible operator precedence mistakes and asks for explicit parentheses (-Wparentheses). We add the parentheses to silence the warning. This also fixes one real logic error in the find_package() implementation by correcting expression evaluation order.
* Try to fix the failing new StringFileTest on HP-UXAlexander Neundorf2009-09-061-2/+2
| | | | | | | | | | It seems that while(i=file.get(), file) iterates one character too much on HP-UX, let's see whether while(file.get(c)) works, at least this is given as example on http://h30097.www3.hp.com/cplus/ifstream_3c__std.htm Alex
* fix #9316: when converting binary data to hex, also print the leading 0'sAlexander Neundorf2009-09-061-1/+1
| | | | Alex
* COMP: Avoid unused arg warnings in cmFileCommandBrad King2009-04-291-1/+1
| | | | | The default cmFileCopier::ReportCopy implementation is empty, so we should leave out the argument names.
* COMP: Fix nested class member accessBrad King2009-04-291-0/+2
| | | | | | 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.
* COMP: Fix non-virtual destructor warningBrad King2009-04-291-0/+1
| | | | | | 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.
* ENH: Create file(COPY) command signatureBrad King2009-04-291-14/+108
| | | | | | | | 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.
* ENH: Teach file(INSTALL) relative pathsBrad King2009-04-291-2/+19
| | | | | | | | | | | 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.
* ENH: Refactor file(INSTALL) implementationBrad King2009-04-291-498/+583
| | | | | | 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.
* ENH: Send all file installations through one pathBrad King2009-04-291-96/+79
| | | | | | 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.
* ENH: Better error on file perm or time failureBrad King2009-04-291-26/+16
| | | | | This improves the error message produced during installation when CMake cannot set file modification time or permissions.
* BUG: Error when install dir cannot be createdBrad King2009-04-291-0/+4
| | | | | This teaches the undocumented file(INSTALL) command to report an error when it cannot create the destination directory.
* ENH: Simplify CMAKE_INSTALL_ALWAYS implementationBrad King2009-04-291-27/+20
| | | | | | This simplifies cmFileInstaller internally by storing the 'always' mark as an instance variable instead of passing it through all method signatures.
* ENH: Simplify construction of cmFileInstallerBrad King2009-04-291-3/+4
| | | | This cleans up the cmFileInstaller constructor signature.
* BUG: Fix required permissions check againBrad King2009-04-281-1/+1
| | | | | | While copying a directory the destination must have owner rwx permissions. This corrects our check, this time with correct operator precedence using parenthesis.
* ENH: Remove unused PROPERTIES from file(INSTALL)Brad King2009-04-271-37/+8
| | | | | The undocumented file(INSTALL) command used to support a PROPERTIES option, but no install code still uses it. This removes the option.
* BUG: Fix required permissions check for dir copyBrad King2009-04-271-1/+1
| | | | | While copying a directory the destination must have owner rwx permissions. This corrects our check.
* ENH: Create file(RENAME) command modeBrad King2009-04-151-0/+43
| | | | | This creates command "file(RENAME <oldname> <newname>)" to rename a file or directory within a single disk volume.
* ENH: Teach file(REMOVE) how to use relative pathsBrad King2009-03-061-3/+10
| | | | | | 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.
* ENH: Add undocumented file(DIFFERENT) commandBrad King2009-01-071-0/+65
| | | | | This new command will be used by generated installation scripts to determine whether an already-installed export file has changed.
* COMP: Fix installation of cmake-gui by CMake 2.4Brad King2009-01-051-1/+16
| | | | | | | | | 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.
* ENH: Refactor internal file(INSTALL) arg parsingBrad King2009-01-051-55/+22
| | | | | | 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.
* BUG: Do not copy permissions of files when making the copy in an install ↵David Cole2008-12-181-2/+8
| | | | 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.
* ENH: Improve FILE GLOB_RECURSE handling of symlinks with a new CMake policy. ↵David Cole2008-09-111-3/+55
| | | | 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.
* ENH: Add the RECURSE_SYMLINKS_OFF flag to the FILE GLOB_RECURSE command. ↵David Cole2008-08-231-0/+14
| | | | Exposes the recently added kwsys capability that prevents recursing through symlinks to CMake scripts.
* ENH: Inform user when RPATH or RUNPATH is removedBrad King2008-08-141-3/+14
|
* ENH: Inform user when RPATH is set during installation.Brad King2008-05-271-3/+16
| | | | | - Original patch from Alex. - Modified to print only when RPATH is actually set.
* BUG: Fix previous change to file(STRINGS) command.Brad King2008-05-171-10/+6
| | | | | - Previous change added form-feed as a string terminator. - Instead it should just be recognized as a valid string character.
* ENH: Teach Fortran compiler identification about the Portland Group compiler ↵Brad King2008-05-161-5/+9
| | | | (PGI).
* BUG: Remove check for files written by file(WRITE) being loaded.Brad King2008-04-301-1/+0
| | | | | | | | | | | | - 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.
* ENH: Improve RPATH behavior during installation.Brad King2008-04-141-14/+148
| | | | | | | - 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
* ENH: Improve error message when installation file(CHRPATH) cannot change the ↵Brad King2008-04-071-2/+4
| | | | RPATH.
* ENH: install the mac application bundle into /Applications directly with no ↵Bill Hoffman2008-04-041-1/+2
| | | | enclosing folder
* BUG: the directory the FILE DOWNLOAD command is writing to might not exist.Sebastien Barre2008-03-131-0/+11
|
* ENH: Cleanup builtin chrpath supportBrad King2008-03-021-6/+62
| | | | | | | | | | | | - 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
* ENH: Use builtin chrpath instead of relinking ELF targetsBrad King2008-03-011-0/+32
| | | | | | | | | | - 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
* ENH: add more information to messageBill Hoffman2008-02-181-4/+6
|
* ENH: make sure files are binary for download and make status a pair of value ↵Bill Hoffman2008-02-071-3/+5
| | | | string
* ENH: remove debug print stuffBill Hoffman2008-02-061-7/+0
|
* ENH: add DOWNLOAD option to FILE commandBill Hoffman2008-02-061-0/+172
|
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* BUG: with cmake 2.4 INSTALL_FILES() with no files was accepted by cmake,Alexander Neundorf2008-01-071-3/+5
| | | | | | | | | | 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
* BUG: File installation should overwrite the destination if the file times ↵Brad King2008-01-041-5/+2
| | | | 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.
* STYLE: Fix line-too-long.Brad King2008-01-031-1/+1
|
* COMP: fix build on Windows with gcc, patch from Maik BeckmannAlexander Neundorf2008-01-031-1/+2
| | | | Alex
* ENH: add the keywords OFFSET and HEX to the FILE() command, using OFFSET anAlexander Neundorf2008-01-021-22/+73
| | | | | | | | | 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
* ENH: Added FILES_MATCHING option to INSTALL(DIRECTORY). This will help ↵Brad King2008-01-021-4/+32
| | | | install a tree of header files while ignoring non-headers.
* ENH: During file installation treat the source file as a dependency of the ↵Brad King2007-10-051-18/+45
| | | | 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.
* STYLE: fix line lengthsAlexander Neundorf2007-07-201-1/+1
| | | | Alex