summaryrefslogtreecommitdiffstats
path: root/Source/cmWriteFileCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source: Fix various compiler warnings in Visual Studio 2017Bruno Manganelli2019-01-091-1/+1
|
* file(WRITE): Avoid toggling permissions between 644 and 664David Faure2018-08-011-5/+9
| | | | | | | | | | On systems with umask 022, this function would set permissions to 664 and restore them to 644 at the end, every single time it was called (which is many times on e.g. install_manifest.txt). The intent of the code was to make non-writable files temporarily writable and to restore permissions in the end, but really, if it's already user-writable there's no point in toggling this back and forth.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-1/+1
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-4/+1
|
* Remove redundant c_str() callsDaniel Pfeifer2016-10-301-1/+1
|
* Separate compilation for commands included in cmCommandsDaniel Pfeifer2016-10-211-0/+5
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-33/+23
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Source: Stabilize include order of sys/types.h before sys/stat.hBrad King2016-05-031-0/+1
| | | | | Include the two headers in an isolated block with a comment separating them so that tools that re-order includes do not re-order these.
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* Remove borland workarounds.Stephen Kelly2014-10-151-2/+0
| | | | | CMake 3.0 is the last release to require to be able to build with Borland.
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+2
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | 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/ \+$//'
* Borland: No S_IWGRP is availableBrad King2010-06-031-0/+2
|
* Really trust umask in file(WRITE) command (#10789, #10126)Brad King2010-06-031-12/+7
| | | | | | | | | Commit 8d0161c8 (Trust umask for file permissions, 2010-01-12) taught these commands to set permissions to 0666 explicitly. The intention was to let the open() call inside ofstream handle permsisions so that umask would be honored. Now we set permissions only when we need to preserve those on an existing file. New files will be created with umask-based permissions.
* Trust umask for file permissionsBrad King2010-01-121-4/+2
| | | | | Open output files with mode 0666 so that permissions are not more strict than umask permits. See issue #10126.
* 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.
* 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: 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
* STYLE: fix line lengthKen Martin2006-05-121-1/+2
|
* ENH: Allow blocking of writing into the source treeAndy Cedilnik2006-03-221-0/+10
|
* ENH: Cleanup bootstrap even moreAndy Cedilnik2006-03-221-0/+3
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-1/+1
|
* STYLE: Fix typosAndy Cedilnik2005-07-061-1/+1
|
* BUG: Handle restrictive permissionsAndy Cedilnik2005-03-071-0/+27
|
* ENH: Add check for infinite loops. Make sure that files written using ↵Andy Cedilnik2004-04-181-0/+1
| | | | WRITE_FILE and FILE WRITE are not used as input files. Fixes Bug #678 - WRITE_FILE and FILE(WRITE...) lead to infinite loops
* ENH: Moved ExpandListVariables out of individual commands. Argument ↵Brad King2002-12-111-4/+2
| | | | evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.
* Make directory if it does not exist yetAndy Cedilnik2002-11-041-2/+5
|
* Add flag to WRITE_FILE to appendAndy Cedilnik2002-10-291-2/+10
|
* ENH: Added reference to Copyright.txt. Removed old reference to ITK ↵Brad King2002-10-231-3/+3
| | | | copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs.
* removed some includesKen Martin2002-09-271-1/+0
|
* compiler warningKen Martin2002-09-221-1/+0
|
* Fix namespace problemAndy Cedilnik2002-09-211-1/+1
|
* Add WRITE_FILE command, which writes string to a fileAndy Cedilnik2002-09-201-0/+54