summaryrefslogtreecommitdiffstats
path: root/Source/cmExportInstallFileGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target propertyOrkun Tokdemir2023-04-091-0/+3
| | | | | | | | | | Add this target property to specify macro names that propagate to dependents as `AUTOMOC_MACRO_NAMES`. The dependents will automatically generate MOC files for source files that contain the inherited macro names. Co-Authored-By: Craig Scott <craig.scott@crascit.com> Fixes: #19679
* Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-1/+14
| | | | Fixes: #24123
* cmGeneratorExpression: Require cmake instanceKyle Edwards2022-11-111-2/+2
|
* export: Fix IMPORTED_LOCATION of iOS flat app bundlesHarry Mallon2022-09-141-1/+4
| | | | | | | | | iOS/tvOS app bundles are flat and do not include the `Contents/MacOS/` layers, so they should not be in the `IMPORTED_LOCATION`. Use the same logic that commit 34f5ef564a (iOS: Fix App Bundle layout, 2015-12-10, v3.5.0-rc1~129^2~1) added for the installation layout. Fixes: #23963
* cmExport*FileGenerator: support exporting C++ module propertiesBen Boeckel2022-07-061-1/+73
| | | | | C++ module properties will be generated at build time, so generate code that includes the files actually responsible for the information.
* cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+34
| | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* generated-scripts: use CMAKE_CURRENT_LIST_DIR where possibleBen Boeckel2022-04-201-2/+1
|
* generated-scripts: unset used variablesBen Boeckel2022-04-201-0/+2
|
* generated-scripts: use `foreach(IN LISTS)`Ben Boeckel2022-04-201-1/+1
|
* generated-scripts: quote variable expansionsBen Boeckel2022-04-201-1/+1
|
* generated-cmake: use `_cmake_` prefixes for local variablesBen Boeckel2022-04-201-3/+3
| | | | This avoids stomping on any user variables.
* cmExportFileGenerator: Simplify collection of targets missing from export setBrad King2022-04-111-28/+22
| | | | | Store the list of missing target names in a member instead of threading an explicit reference to it through the call stack.
* Merge topic 'restore-target-export-includes'Brad King2022-02-101-1/+2
|\ | | | | | | | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
| * install(TARGETS): Restore per-export INCLUDES DESTINATIONEugene Shalygin2022-02-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55e4753bbb (Refactor cmTargetExport removing InterfaceIncludeDirecories, 2021-07-20, v3.22.0-rc1~337^2~1) the storage of `INCLUDES DESTINATION` was moved into each target. However, a target may be installed in multiple exports, and their `INCLUDES DESTINATION` should not be mixed. Convert the IncludeDirectoriesEntries vector to a map and modify access function to store the directories lists with respect to cmExportTarget object. This fixes error when the same target is exported more than once via different exports and each for consequent export its include directories list grows. Add a test for this case. Fixes: #23183
* | install(EXPORT): Install file setsKyle Edwards2021-10-271-0/+105
|/
* Rename cmProp in cmValueMarc Chevrier2021-09-211-1/+1
|
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-0/+1
| | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* Refactor export file generator intefaceEugene Shalygin2021-07-221-7/+7
| | | | | Replace cmTargetExport with const cmGeneratorTarget to allow recursive processing of exported targets and their link dependencies.
* install(EXPORT): Set copy-if-different on install export config filesDaan De Meyer2021-01-191-0/+1
| | | | | Avoid reinstalling the per-config export install files if the contents didn't change after a configure.
* export: Do not fail generation for separate namelink only caseDeniz Bahadir2020-12-011-0/+3
| | | | | | | | Update the change from commit 64690f6df0 (export: Do not fail generation for namelink-only case, 2020-10-09, v3.19.0-rc1~7^2) to also handle separate namelink-only and namelink-skip calls. Fixes: #21529
* INSTALL_NAME_DIR: Add support for generator expressionsKyle Edwards2019-11-041-2/+3
|
* Refactor: Generalize cmExportInstallFileGenerator::ReplaceInstallPrefix()Kyle Edwards2019-11-011-9/+1
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-4/+4
| | | | | 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.
* PCH: Propagate INTERFACE_PRECOMPILE_HEADERS in install(EXPORT)Brad King2019-09-251-0/+3
| | | | | | | | | This was accidentally left out of commit 0467a2f91b (PCH: add PRECOMPILE_HEADERS to special properties, 2015-03-12). Also add a test case for `install(EXPORT)` and `export()` propagation of precompiled headers. Fixes: #19741
* cmExportSet: subsume cmExportSetMap source filesTushar Maheshwari2019-09-191-1/+1
|
* cmExportSet: default destructorTushar Maheshwari2019-09-191-7/+8
|
* cmExportSetMap: improve ownership of cmExportSetTushar Maheshwari2019-09-191-4/+3
| | | | | - use `std::piecewise_construct` to fix gcc-4.8 build. - can use `emplace(name, name)` gcc-6 onwards.
* clang-tidy: modernize-return-braced-init-listRegina Pfeifer2019-09-061-1/+1
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* cmExportInstallFileGenerator: improve error messageBen Boeckel2019-08-201-15/+23
| | | | | | | Following commit 49cfd390 (cmExportBuildFileGenerator: improve error message, 2019-06-26), improve the error message related to installed export sets by referencing the files which contain the exported target ambiguously.
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-1/+1
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* 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`.
* cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-4/+4
|
* IWYU: Update CMake code for IWYU built with Clang 6Brad King2019-01-151-2/+1
| | | | | IWYU now correctly requires `<utility>` for `std::move`. It also requires a container header when used via a range-based for loop.
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-6/+6
| | | | Enable the check in .clang-tidy and fix all warnings.
* LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-0/+2
| | | | | | | | | | | | These new capabilities enable to manage link directories Two new properties: * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES One new command * target_link_directories(): to populate target properties Fixes: #17215
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-1/+1
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDSMarc Chevrier2018-06-271-0/+2
| | | | Fixes: #17997
* LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+3
| | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* Fix misc. typosluz.paz2018-06-041-1/+1
| | | | Found via `codespell` and `grep`
* Export: allow exporting of additional propertiesWouter Klouwen2018-03-161-0/+6
| | | | | | | | | This change introduces an additional property that may be set on a target to allow additional properties to be exported. Normally only a limited number of properties are exported. Additional properties may be exported by simply setting the `EXPORT_PROPERTIES` property on a target that is exported.
* install,export: Maybe transform OBJECT libraries to INTERFACE librariesBrad King2018-02-281-4/+18
| | | | | | | | | | | 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-7/+7
| | | | | | | | | | * 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-1/+1
| | | | | - 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-33/+20
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Replace C-style castsDaniel Pfeifer2017-08-271-1/+1
|
* Access string npos without instancePavel Solodovnikov2017-06-011-1/+2
|
* Allow OBJECT libraries to be installed, exported, and importedRobert Maynard2017-04-181-0/+19
| | | | | | | | 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>
* Add support for x32-abiSteven Newbury2017-03-071-1/+3
| | | | | | | | Detect x32-abi through CMakeCompilerABI infrastruture and use this information at runtime to determine the correct library paths with `FIND_LIBRARY_USE_LIBX32_PATHS`. Fixes: #15994
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|