summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-3/+6
| | | | | 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.
* cmInstallCommand: Port away from cmCommandRegina Pfeifer2019-09-211-280/+314
|
* Merge topic 'smart_ptr/cmExportSet'Brad King2019-09-201-11/+10
|\ | | | | | | | | | | | | | | | | 71f088f53a cmExportSet: subsume cmExportSetMap source files 6511fa6f33 cmExportSet: default destructor 9b8a1f7c28 cmExportSetMap: improve ownership of cmExportSet Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3816
| * cmExportSet: subsume cmExportSetMap source filesTushar Maheshwari2019-09-191-1/+0
| |
| * cmExportSet: default destructorTushar Maheshwari2019-09-191-6/+6
| |
| * cmExportSetMap: improve ownership of cmExportSetTushar Maheshwari2019-09-191-6/+6
| | | | | | | | | | - use `std::piecewise_construct` to fix gcc-4.8 build. - can use `emplace(name, name)` gcc-6 onwards.
* | Refactor: Use cmStrCat to construct error stringsAsit Dhal2019-09-181-190/+124
|/ | | | | Replace string construction using std::stringstream with cmStrCat and cmWrap.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-4/+3
|\ | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-4/+3
| | | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-6/+3
|/ | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-3/+3
|
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-1/+1
|
* Merge topic 'fileapi-install-generators'Brad King2019-08-051-1/+3
|\ | | | | | | | | | | | | d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3639
| * fileapi: Fix codemodel target install destination for cross-dir rulesBrad King2019-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Since commit e89ad0f94e (install: Allow installing targets created in another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling `install(TARGETS)` for targets created in another directory. However, install generators are associated with the directory in which the call to `install()` appears. This may not be the same directory in which the target is defined. Record in each target the list of install generators it has. Fixes: #19546
* | cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-1/+1
| | | | | | | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* | AIX: Create import library for executables with exportsBrad King2019-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, plugins meant to be loaded into executables via `dlopen` must be linked with access to a list of symbols exported from the executable in order to use them (when not using runtime linking). The AIX linker supports specifying this list as an "import file" passed on the command line either via the `-bI:...` option or (with a leading `#! .` line) as a normal input file like any other library file. The linker import file plays the same role on AIX as import libraries do on Windows. Teach CMake to enable its import library abstraction on AIX for executables with the `ENABLE_EXPORTS` target property set. Teach our internal `ExportImportList` script to optionally generate a leading `#! .` line at the top of the generated export/import list. Update our rule for linking an executable with exports to generate a public-facing "import library" implemented as an AIX linker import file. With this approach, our existing infrastructure for handling import libraries on Windows will now work for AIX linker import files too: * Plugins that link to their executable's symbols will be automatically linked using the import file on the command line. * The executable's import file will be (optionally) installed and exported for use in linking externally-built plugins. This will allow executables and their plugins to build even if we later turn off runtime linking. Issue: #19163
* | De-duplicate checks for whether a platform uses Windows DLLsBrad King2019-07-121-6/+2
|/
* Merge topic 'iface-headers'Brad King2019-04-121-2/+1
|\ | | | | | | | | | | | | a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3181
| * INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER propertiesAvraham Shukron2019-04-111-2/+1
| | | | | | | | | | | | | | Also support installing headers on an INTERFACE library. Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com> Fixes: #15234
* | cmInstallCommand: Port to cmArgumentParserRegina Pfeifer2019-04-041-82/+90
|/
* install: Do not crash on imported global targetBrad King2019-03-071-1/+5
| | | | | | | | | | | Since commit e89ad0f94e (install: Allow installing targets created in another directory, 2018-06-18, v3.13.0-rc1~407^2) the `install(TARGETS)` command may find a global-scoped target outside the calling directory. Ignore an `IMPORTED GLOBAL` target if it is found in this way. Imported targets cannot be installed, and trying to do so violates internal invariants. Fixes: #19022
* cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-1/+1
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-6/+6
| | | | Reduce the number of files relying on `cmake.h`.
* install: Add sane set of defaults for DESTINATION and file type parametersKyle Edwards2018-11-071-79/+297
| | | | | | | | | | | | If the user does not specify a DESTINATION for a target type, the install() command checks to see if the appropriate variable from GNUInstallDirs is set. If it is not, then it uses an appropriate hard-coded guess. In addition, for FILES and DIRECTORY, the user can specify a file type instead of a DESTINATION, and the command will use the appropriate variable from GNUInstallDirs, or a hard-coded guess if it is not set.
* install: Record TARGET mode backtraces internallyBrad King2018-10-181-27/+31
|
* cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-3/+1
|
* cmGlobalGenerator::AddInstallComponent(): Accept std::string argumentVitaly Stakhovsky2018-08-301-13/+13
|
* install: Allow installing targets created in another directoryZack Galbreath2018-06-181-3/+7
| | | | | | | | Previously, `install(TARGETS)` would only accept targets created in the same directory scope. Relax this restriction by searching the global scope when determining whether or not a target exists. Fixes: #14444
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-5/+7
| | | | | | | | | | | | 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.
* install: add NAMELINK_COMPONENT argumentKyle Edwards2018-05-031-7/+39
| | | | | | | For shared libraries, this allows you to specify separate components for the shared library and for the namelink. Suggested in https://cmake.org/pipermail/cmake-developers/2014-December/024032.html.
* Identify DLL platforms via CMAKE_IMPORT_LIBRARY_SUFFIXStephan Szabo2018-03-091-2/+3
| | | | | | | Use `CMAKE_IMPORT_LIBRARY_SUFFIX` to identify platforms that have DLL import libraries rather than memorizing a list of platform names. Fixes: #16801
* install,export: Maybe transform OBJECT libraries to INTERFACE librariesBrad King2018-02-281-17/+14
| | | | | | | | | | | Teach the `install` and `export` commands to support installing and exporting `OBJECT` libraries without their object files. Transform them to `INTERFACE` libraries in such cases. For `install(TARGETS)`, activate this when no destination for the object files is specified. For `export`, activate this only under Xcode with multiple architectures when we have no well-defined object file locations to give to clients.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-4/+4
| | | | | | | | | | * 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.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-3/+4
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-34/+25
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-28/+27
|
* Provide and use CM_FALLTHROUGHDaniel Pfeifer2017-06-031-2/+2
|
* Access string npos without instancePavel Solodovnikov2017-06-011-5/+5
|
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-9/+11
|
* Allow OBJECT libraries to be installed, exported, and importedRobert Maynard2017-04-181-9/+41
| | | | | | | | Teach install() and export() to handle the actual object files. Disallow this on Xcode with multiple architectures because it still cannot be cleanly supported there. Co-Author: Brad King <brad.king@kitware.com>
* 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'
* Apple: Add support for static frameworksGregor Jasny2017-01-311-10/+32
| | | | Closes: #16432
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-1/+0
|
* Remove redundant c_str() callsDaniel Pfeifer2016-10-301-1/+1
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-1/+16
|
* Separate compilation for commands included in cmBootstrapCommands2Daniel Pfeifer2016-10-211-0/+2
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-13/+13
|
* 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.