summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CMake: fix sizeof string literal violationsKyle Edwards2022-11-181-4/+3
|
* cmGeneratorExpression: Require cmake instanceKyle Edwards2022-11-111-1/+1
|
* export: Increase maximum policy version in exported files to 3.24Brad King2022-10-121-2/+2
| | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.24, so enable them in sufficiently new CMake versions.
* Merge topic 'export-no-shdeps'Brad King2022-08-161-0/+7
|\ | | | | | | | | | | | | 0ebff0d61a export: Restore exclusion of private shared library dependencies from checks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7557
| * export: Restore exclusion of private shared library dependencies from checksBrad King2022-08-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 8c65b7042e (cmExportFileGenerator: Simplify collection of targets missing from export set, 2022-04-11, v3.24.0-rc1~281^2) accidentally dropped the behavior change from commit 0ad2a1c181 (Export: Never treat private link libraries as public package dependencies., 2013-09-24, v3.0.0-rc1~559^2). Restore the behavior and add a test. Fixes: #23838
* | cmExport*FileGenerator: support exporting C++ module propertiesBen Boeckel2022-07-061-0/+25
| | | | | | | | | | C++ module properties will be generated at build time, so generate code that includes the files actually responsible for the information.
* | Add EXPORT_NO_SYSTEM target property, deprecate IMPORTED_NO_SYSTEMDa Quexian2022-06-171-0/+4
| | | | | | | | | | | | Issue: #18040 Signed-off-by: Da Quexian <daquexian566@gmail.com>
* | export: Increase maximum policy version in exported files to 3.23Brad King2022-06-141-2/+2
|/ | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.23, so enable them in sufficiently new CMake versions.
* generated-scripts: improve prose messages with CMake listsBen Boeckel2022-04-201-2/+4
| | | | | | Instead of printing a CMake list, make it an English-style list. This also allows the line-break algorithm to make these messages much more readable.
* generated-scripts: unset used variablesBen Boeckel2022-04-201-1/+4
|
* generated-scripts: use `foreach(IN LISTS)`Ben Boeckel2022-04-201-1/+1
|
* generated-scripts: quote variable expansionsBen Boeckel2022-04-201-4/+4
|
* generated-scripts: simplify `if` conditionsBen Boeckel2022-04-201-8/+7
|
* generated-cmake: use `_cmake_` prefixes for local variablesBen Boeckel2022-04-201-28/+28
| | | | This avoids stomping on any user variables.
* cmExportFileGenerator: require CMake 2.8.3Ben Boeckel2022-04-201-3/+6
| | | | | | | | This allows use of `CMAKE_CURRENT_LIST_DIR`, `foreach(IN LISTS)`, `if(VERSION_*)`, and more. Note that generated filesets code already uses `if(VERSION_*)` and requires CMake 2.8.3 in practice.
* cmExportFileGenerator: Simplify collection of targets missing from export setBrad King2022-04-111-51/+41
| | | | | Store the list of missing target names in a member instead of threading an explicit reference to it through the call stack.
* export: Fix TARGET_NAME lookup for out-of-dir linkingBrad King2022-04-011-12/+16
| | | | | | | Improve the logic added by commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a list of targets, 2020-01-14, v3.17.0-rc1~149^2) to, while exporting targets, look up referenced target names in the correct directory.
* Merge topic 'restore-target-export-includes'Brad King2022-02-101-2/+3
|\ | | | | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge topic 'post-rel-dev'Brad King2022-02-041-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 9a48012f93 Configure CMake itself with policies through CMake 3.22 a5a9687799 export: Increase maximum policy version in exported files to 3.22 a9ffded98c Add deprecation warnings for policies CMP0097 and below Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6948
| * | export: Increase maximum policy version in exported files to 3.22Brad King2022-02-031-2/+2
| | | | | | | | | | | | | | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.22, so enable them in sufficiently new CMake versions.
* | | Replace DEVEL_CMAKE_VERSION with literal 3.23 release versionBrad King2022-02-041-2/+1
|/ / | | | | | | | | | | This was accidentally left out of commit 736663deed (Begin 3.23 release versioning, 2022-02-03). The step is documented as part of the release branching process in the CMake Maintainer Guide `Help/dev/maint.rst`.
* | Add usage requirements to update direct link dependenciesBrad King2022-01-291-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link line construction starts with `LINK_LIBRARIES` and appends dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`. Only the entries of `LINK_LIBRARIES` are considered direct link dependencies. In some advanced use cases, particularly involving static libraries and static plugins, usage requirements need to update the list of direct link dependencies. This may mean adding new items, removing existing items, or both. Add target properties to encode these usage requirements: * INTERFACE_LINK_LIBRARIES_DIRECT * INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE Fixes: #22496
* | install(EXPORT): Install file setsKyle Edwards2021-10-271-0/+37
| |
* | Source: fix many -Wmissing-prototypes warnings by marking functions staticSean McBride2021-10-251-5/+6
| |
* | export: Propagate IMPORTED_NO_SYSTEM target property to consumersBrad King2021-10-151-0/+6
| | | | | | | | | | | | | | | | | | Enabling `IMPORTED_NO_SYSTEM` on a target built within the project has no effect on the build system, but it is still a useful way to set the property on imported targets generated by `install(EXPORT)` and `export()`. Issue: #17364
* | export: Increase maximum policy version in exported files to 3.21Brad King2021-10-081-2/+2
|/ | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.21, so enable them in sufficiently new CMake versions.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-15/+15
|
* Config File Gen: When requiring >= 2.6, don't check < 2.5Marcus Müller2021-08-161-1/+1
| | | | | | This seems to be a clear-cut case. Signed-off-by: Marcus Müller <marcus@hostalia.de>
* Refactor export file generator intefaceEugene Shalygin2021-07-221-22/+21
| | | | | Replace cmTargetExport with const cmGeneratorTarget to allow recursive processing of exported targets and their link dependencies.
* Refactor cmTargetExport removing InterfaceIncludeDirecoriesEugene Shalygin2021-07-221-1/+2
| | | | | | | | Because of this property in the cmTargetExport struct, exporting targets is not uniform: top-level ones have to be dealt with via the cmTargetExport objects, while all linked ones are cmGeneratorTarget objects. Let's pass this additional includedirectories via a special target property making handling exported targets uniform.
* export: Increase maximum policy version in exported files to 3.20Brad King2021-06-301-2/+2
| | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.20, so enable them in sufficiently new CMake versions.
* Source: Remove unnecessary comparisons to nullptrVitaly Stakhovsky2021-05-101-1/+1
|
* export: Increase maximum policy version in exported files to 3.19Brad King2021-02-101-2/+2
| | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.19, so enable them in sufficiently new CMake versions.
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-1/+1
|
* export: Fix replacement of multiple TARGET_NAME expressionsBrad King2021-01-051-1/+1
| | | | | | | | After replacing each such expression, search for following expressions immediately after the end of the replacement text, not after the position of the end of the replaced text. Fixes: #21661
* export: Increase maximum policy version in exported files to 3.18Brad King2020-10-131-2/+2
| | | | | | The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.18, so enable them in sufficiently new CMake versions.
* install(EXPORT): Fix exporting target w/ source named using CONFIG genexDeniz Bahadir2020-09-221-3/+1
| | | | Fixes: #21203
* cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-2/+3
|
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* Export: Specify a policy range in exported filesCraig Scott2020-05-181-4/+6
| | | | | | | This should reduce policy-related warnings coming from the generated files, but in a way that doesn't increase the minimum CMake version for consumers. Relates: #20561
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-29/+28
|
* Refactor: Avoid `std::endl` where it's not necessary (part 1)Alex Turbov2020-03-261-2/+1
| | | | | | | The `std::endl` manupulator, except inserting `\n` character, also performs `os.flush()`, which may leads to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning.
* Merge topic 'prop_t'Brad King2020-03-171-6/+6
|\ | | | | | | | | | | | | 60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4471
| * cmPropertyMap: Introduce cmProp as return type for GetProperty() functionsVitaly Stakhovsky2020-03-131-6/+6
| | | | | | | | | | | | | | Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
* | Source: Remove trailing whitespace from export generation codeAlexandru Croitor2020-03-131-1/+1
|/
* Source: use std::string in place of const char*Vitaly Stakhovsky2020-01-291-2/+2
|
* target_link_libraries: Fix out-of-dir linking of a list of targetsBrad King2020-01-161-0/+4
| | | | | | | | | | | | | | In a case like target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>") then all entries in the list need to be looked up in the caller's scope. Previously our `::@(directory-id)` suffix would apply only to the last entry. Instead surround the entire entry by a pair `::@(directory-id);...;::@` so that the `::@` syntax can encode a directory lookup scope change evaluated as the list is processed. Fixes: #20204
* Add set_property option: DEPRECATIONJoseph Snyder2020-01-021-0/+6
| | | | | | | | | | | | Add a new property flag for a target which contains a message regarding deprecation status. Add a warning at "Generate" time if a linked target is marked as deprecated. Expand ExportImport test to ensure that new property is being set and passed correctly. Ensure that the message is shown during the "Generate" step run of the ExportImport test.
* install,export: Do not treat language names as target namesBrad King2019-10-161-13/+18
| | | | | | | When generating `IMPORTED_LINK_INTERFACE_LANGUAGES`, do not treat the entries as target names. Fixes: #19846