summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-1/+1
|
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-4/+5
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* add_subdirectory: Run subdirectory install rules in correct orderKyle Edwards2018-10-101-0/+13
| | | | | | | | | Before this change, install rules created by add_subdirectory() would be executed after all of the top-level install rules, even if they were declared before the top-level rules. This change adds a new policy, CMP0082, which interleaves the add_subdirectory() install rules with the other install rules so they are run in the correct order.
* 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.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-3/+2
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* install: Avoid CMP0054 warning in generated install scriptBrad King2017-08-301-2/+2
| | | | | | This could happen when an install component is called `TEST`. Fixes: #17211
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-1/+1
|
* 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.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+2
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-129/+113
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* install: Add EXCLUDE_FROM_ALL option (#14921)Nick Lewis2016-02-041-6/+12
| | | | | | | | | | | | | | | | | | | Let us take an example of a project that has some tests in a component that need to be installed into a dedicated test package. The user expectation is that the result could be achieved by typing the following: make make tests make install DESTDIR=/testpkgs make install-tests However this results in test components in the default installation as well as the testpkg. Add an EXCLUDE_FROM_ALL option to the install() command to tell it that the installation rule should not be included unless its component is explicitly specified for installation.
* cmInstallGenerator: Pass destination explicitly to AddInstallRuleBrad King2015-02-111-1/+1
| | | | | This will allow specific invocations to transform the destination before AddInstallRule uses it.
* cmInstallGenerator: Fix check for absolute install destinationsBrad King2015-02-111-2/+3
| | | | | | | In AddInstallRule, check for absolute install destinations before converting to the absolute install destination. Previously this worked only by accident because literal "${CMAKE_INSTALL_PREFIX}" looks like a relative path.
* cmInstallGenerator: Refactor computation of absolute install destBrad King2015-02-111-5/+6
| | | | | | | | Replace the GetInstallDestination method, which looked up the Destination ivar, with a new ConvertToAbsoluteDestination method that takes the nominal destination as an argument. Update call sites accordingly. This will allow some clients to transform the install destination before calling the method.
* install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)Brad King2014-06-241-1/+5
| | | | | | | | | | | | Installing large directories, e.g., the output of a doxygen run, prints one line per file resulting in too much noise in the build output. Add an option to the install(DIRECTORY) command to not print anything upon make install. Extend the RunCMake.install test with cases covering MESSAGE_NEVER behavior of the install(DIRECTORY) command. Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
* install: Add CMAKE_INSTALL_MESSAGE variable (#13761)Brad King2014-06-241-0/+28
| | | | | | | | | Create a variable to allow users to control which installation messages are printed. In particular, provide a "LAZY" setting that prints "Installing" messages but not "Up-to-date" messages. This is desirable for incremental re-installations. Suggested-by: J Decker <d3ck0r@gmail.com>
* install: Thread message level setting through internal APIBrad King2014-06-241-2/+4
| | | | | | | Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-1/+1
|
* Generate modern-style cmake code.Stephen Kelly2013-08-221-7/+7
| | | | | | | | | | | The commits 9db31162 (Remove CMake-language block-end command arguments, 2012-08-13) and 77543bde (Convert CMake-language commands to lower case, 2012-08-13) changed most cmake code to use lowercase commands and no parameters in termination commands. However, those changes excluded cmake code generated in c++ by cmake. Make a similar style change to code generated by cmake.
* Use CPACK_xxx and CMAKE_xxx in a consistent way.Eric NOULARD2012-05-201-8/+8
| | | | | | | | | | | | | | | | 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.
* Fix KWStyle warningEric NOULARD2012-05-151-1/+2
|
* CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATIONEric NOULARD2012-05-141-0/+9
| | | | | | | | | | | | | | | | | | 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
* Factor cmInstallType out of cmTarget::TargetTypeBrad King2012-02-271-10/+8
| | | | | | The purpose of the TargetType enumeration was overloaded for install type because install rules were once recorded as targets. Factor the install types out into their own enumeration.
* InstallGen/CPack fix handling absolute installed file regressionEric NOULARD2010-09-201-2/+5
|
* CPack Enable better handling of absolute installed filesEric NOULARD2010-08-231-0/+20
| | | | | | | | | | 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.
* 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.
* ENH: Remove unused PROPERTIES from file(INSTALL)Brad King2009-04-271-5/+0
| | | | | The undocumented file(INSTALL) command used to support a PROPERTIES option, but no install code still uses it. This removes the option.
* ENH: Refactor cmInstallGenerator for re-useBrad King2009-03-161-120/+4
| | | | | | A new cmScriptGenerator base class factors out the non-install-specific part of cmInstallGenerator. This will be useful for other generators that want per-configuration functionality.
* BUG: Fix component-name test on installationBrad King2008-12-161-2/+2
| | | | | | | Generated cmake_install.cmake script code used MATCHES to compare component names. This does not support characters considered special by regular expression syntax in component names. This change uses STREQUAL instead. See issue #8256.
* ENH: Updated exporting and importing of targets to support libraries and ↵Brad King2008-01-281-1/+38
| | | | | | | | | | | | | | | | | | configurations. - Created cmExportFileGenerator hierarchy to implement export file generation - Installed exports use per-config import files loaded by a central one. - Include soname of shared libraries in import information - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators - Import files compute the installation prefix relative to their location when loaded - Add mapping of importer configurations to importee configurations - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries - Scope IMPORTED targets within directories to isolate them - Place all properties created by import files in the IMPORTED namespace - Document INSTALL(EXPORT) and EXPORT() commands. - Document IMPORTED signature of add_executable and add_library - Enable finding of imported targets in cmComputeLinkDepends
* STYLE: add some newlines to cmake_install.cmake, so it's easier to readAlexander Neundorf2007-08-201-1/+1
| | | | | | -move the array behind the if, it's unused before it Alex
* ENH: Further cleanup of installation script generation. The per-component ↵Brad King2007-07-021-18/+120
| | | | 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.
* ENH: Improved indentation of generated cmake_install.cmake code.Brad King2007-07-021-3/+5
|
* ENH: First step of install script generator cleanup. Each configuration to ↵Brad King2007-06-281-2/+19
| | | | be installed is now separately handled instead of using variables to store per-configuration names. For targets the component and configuration install-time tests are now done in the install script instead of in the FILE(INSTALL) command. This cleans things up like not trying to strip a file that was optionally not installed. It also simplifies the code for install_name adjustment on OSX. This commit is surrounded by the tags CMake-InstallGeneratorCleanup1-pre and CMake-InstallGeneratorCleanup1-post.
* ENH: Implemented INSTALL(DIRECTORY) command and added a test. Re-organized ↵Brad King2006-08-211-2/+8
| | | | cmFileCommand's implementation of FILE(INSTALL) a bit to help out. This addresses bug#1694 and partially addresses bug#2691.
* ENH: Started implementing INSTALL(DIRECTORY) command mode. This is not yet ↵Brad King2006-08-171-3/+8
| | | | finished so it is undocumented and there is no test. These changes also separate the notions of file and directory permissions.
* STYLE: fix line lengthKen Martin2006-05-111-12/+13
|
* ENH: Added CONFIGURATIONS option to INSTALL command to allow ↵Brad King2006-05-051-9/+21
| | | | per-configuration install rules.
* ENH: Added named component installation implementation. Installation ↵Brad King2006-03-301-0/+5
| | | | behavior should be unchanged unless -DCOMPONENT=<name> is specified when cmake_install.cmake is invoked.
* ENH: Add proper support for installing bundlesAndy Cedilnik2006-03-281-0/+1
|
* ENH: Added PERMISSIONS and RENAME options to the INSTALL command's FILES and ↵Brad King2006-03-031-1/+11
| | | | PROGRAMS mode, and corresponding support to FILE(INSTALL). Default permissions for shared libraries on non-Windows/non-OSX platforms no longer has the execute bit set.
* BUG: Fixed optional file install support for multi-configuration generators.Brad King2006-02-201-21/+5
|
* BUG: Do not report files as installed if they are optional and do not exist.Brad King2006-02-191-11/+24
|
* ENH: Created new install script generation framework. The INSTALL command ↵Brad King2006-02-191-0/+82
creates the generators which are later used by cmLocalGenerator to create the cmake_install.cmake files. A new target installation interface is provided by the INSTALL command which fixes several problems with the INSTALL_TARGETS command. See bug#2691. Bugs 1481 and 1695 are addressed by these changes.