summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'vs-compile-batching'Brad King2022-06-231-0/+1
|\ | | | | | | | | | | | | | | | | 9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching a7ebb73929 Help: Improve formatting in VS_NO_COMPILE_BATCHING docs Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7405
| * VS: Add variable to to turn off Visual Studio compile batchingBrad King2022-06-221-0/+1
| | | | | | | | | | | | | | | | | | Extend the change from commit b764c7c273 (VS: Add property to turn off Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by adding a variable to initialize the property on every target. Issue: #23179 Fixes: #23639
* | Merge topic 'cpp-named-module-file-sets'Brad King2022-06-171-0/+79
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 07bc3b07ec gitlab-ci: test C++ modules using GCC 1b2270aa4e ci: add a Docker image to test out C++ modules with GCC 8c5a53096a Tests/RunCMake/CXXModules: add module-using examples 4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format 02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents a046a45aad cmGlobalNinjaGenerator: add a TODO for header units 386465bf83 cmTarget: add support for C++ module fileset types ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7369
| * | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+79
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Merge topic 'add_SYSTEM_prop'Brad King2022-06-161-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 69beee5314 Add SYSTEM target property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7308
| * | Add SYSTEM target propertyDa Quexian2022-06-151-0/+4
| |/ | | | | | | | | | | | | | | If it is ON, treat INTERFACE_INCLUDE_DIRECTORIES as system include directories. Issue: #18040 Signed-off-by: Da Quexian <daquexian566@gmail.com>
* | Xcode: Add Xcode SCHEME control for 'Launch' controlHarry Mallon2022-06-151-0/+1
|/
* VERIFY_HEADER_SETS: Rename to VERIFY_INTERFACE_HEADER_SETSKyle Edwards2022-05-181-1/+1
| | | | Issue: #23448
* Merge topic 'werror-property'Brad King2022-05-101-0/+1
|\ | | | | | | | | | | | | | | | | 76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Michael Hirsch <michael@scivision.dev> Merge-request: !7187
| * COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errorsMartin Duffy2022-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add `COMPILE_WARNING_AS_ERROR` target property and supporting `CMAKE_COMPILE_WARNING_AS_ERROR` variable. `COMPILE_WARNING_AS_ERROR` is initialized by `CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is true, it expands to a different flag depending on the compiler such that any warnings at compile will be treated as errors. Supports compiler ids that I could find a relevant flag for.
* | OpenWatcom: Allow specifying the runtime libraryCameron Cawley2022-05-061-0/+1
| | | | | | | | | | | | | | | | Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the runtime library selection. Add policy CMP0136 to switch to in place of the old hard-coded default flags. Fixes: #23178
* | cmTarget: add support for querying all file set namesBen Boeckel2022-04-271-0/+11
| |
* | cmTarget: avoid creating export entries if they don't existBen Boeckel2022-04-271-1/+6
| |
* | cmTarget: factor out fileset type handlingBen Boeckel2022-04-251-132/+203
| | | | | | | | | | This allows for new fileset types to be added more easily by factoring out the declarative information into a structure.
* | cmTarget: require filesets to be of the right typeBen Boeckel2022-04-251-34/+61
| | | | | | | | | | | | With new types being proposed for C++ modules, requiring filesets to be of the right type is now pertinent. No tests can be added yet as only `HEADERS` is supported right now.
* | cmTarget: factor out fileset property manipulationBen Boeckel2022-04-251-116/+114
| |
* | cmTarget: pass candidate strings by const-refBen Boeckel2022-04-251-3/+3
| | | | | | | | This avoids having to copy the `std::string` overload.
* | Merge topic 'xcode-universal'Brad King2022-04-141-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 40dd46a96a Xcode: Add tests for OBJECT library per target `OSX_ARCHITECTURES` da4ccb502b Xcode: Check for multiple `OSX_ARCHITECTURES` on target 41ba35a42b cmTarget: Add `HasKnownObjectFileLocation()` shorthand Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7154
| * | cmTarget: Add `HasKnownObjectFileLocation()` shorthandHyper Nova Sun2022-04-111-0/+5
| |/ | | | | | | | | | | | | | | Allow `cmGlobalGenerator`s to decide `HasKnownObjectFileLocation()` per given `cmTarget` - `cmGlobalGenerator::HasKnownObjectFileLocation()` now takes an optional `cmGeneratorTarget` - `cmTarget::HasKnownObjectFileLocation()` added as a shorthand
* | Merge topic 'file-set-repr-improvements'Brad King2022-04-121-55/+42
|\ \ | |/ |/| | | | | | | | | | | | | 5fa15ec9f3 Help: Document that target_sources defines [INTERFACE_]HEADER_SETS c5d4812f20 cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-only 05783b168d cmFileSet: store visibility with the fileset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7168
| * cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-onlyBen Boeckel2022-04-111-52/+39
| | | | | | | | | | | | There is no reason to allow these properties to be manipulated by user code. Instead, use the stored visibility on the fileset objects to derive what these properties should contain.
| * cmFileSet: store visibility with the filesetBen Boeckel2022-04-111-3/+3
| | | | | | | | | | The visibility is intrinsic to the fileset, so store it with it. This avoids recalculating it on every addition to the fileset.
| * Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branchBrad King2022-03-211-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit f3ad061858 (Add usage requirements to update direct link dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage updates in its predecessor commit 193a999cd5 (cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage, 2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch. After initial experience using the feature in practice, additional design considerations have been raised for discussion in the original issue. To avoid rushing this for the 3.23 series, we've decided to revert the feature for now so it can be revised for a future release. Issue: #22496
| * Merge topic 'restore-target-export-includes' into release-3.23Brad King2022-02-101-6/+10
| |\ | | | | | | | | | | | | | | | | | | | | | 83d79636bf install(TARGETS): Restore per-export INCLUDES DESTINATION Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6969
* | | FILE_SET: Add VERIFY_HEADER_SETS target propertyKyle Edwards2022-03-291-0/+1
| | | | | | | | | | | | Fixes: #23338
* | | Genex-LINK_GROUP: Add possibility to group libraries at link stepMarc Chevrier2022-02-281-8/+9
| | | | | | | | | | | | Fixes: #23121
* | | Merge topic 'restore-target-export-includes'Brad King2022-02-101-6/+10
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 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-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Genex: Add $<LINK_LIBRARY:...>Marc Chevrier2022-02-071-57/+83
| |/ |/| | | | | | | | | | | | | This generator expression offers the capability, for the link step, to decorate libraries with prefix/suffix flags and/or adding any specific flag for each library. Fixes: #22812, #18751, #20078, #22703
* | cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storageBrad King2022-01-291-0/+59
| | | | | | | | These properties will be given meaning by later commits.
* | define_property(): Add INITIALIZE_FROM_VARIABLE argumentKyle Edwards2022-01-201-0/+11
| | | | | | | | Fixes: #20698
* | Merge topic 'vs-csharp-dotnet-sdk'Brad King2021-12-221-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6634
| * | VS: Add DOTNET_SDK property to generate SDK-style C# projectsSumit Bhardwaj2021-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Changes in cmVisualStudio10TargetGenerator::Generate to write .Net SDK-style project for VS generators VS 19 and above. Also adds documentation and tests. Issue: #20227
* | | target_link_libraries: Optionally require only target namesBrad King2021-12-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optionally verify that items in `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` that can be target names are actually target names. Add a `LINK_LIBRARIES_ONLY_TARGETS` target property and corresponding `CMAKE_LINK_LIBRARIES_ONLY_TARGETS` variable to enable this new check. Fixes: #22858
* | | cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIESBrad King2021-12-151-0/+28
|/ /
* | cmTargetPropertyComputer: Simplify by restoring use of cmMakefileBrad King2021-12-081-9/+6
| | | | | | | | | | | | | | | | | | | | | | Logically revert commit 390a7d8647 (cmTargetPropertyComputer: Implement GetProperty without cmMakefile, 2016-10-13, v3.8.0-rc1~445^2~9). It relied on using `cmListFileBacktrace` to get a scope in which to look up policies. This does remove a backtrace from `LOCATION` property errors at generate time, but the backtrace we reported before was incorrect. It pointed at the addition of a target, not to the reference to the property.
* | Merge topic 'xcode-generation-enablegpuframecapturemode'Brad King2021-11-121-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 0798edfb85 Tests: Xcode scheme ENABLE_GPU_FRAME_CAPTURE_MODE e09a3eddb6 Xcode: Support "GPU Frame Capture" scheme property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6639
| * | Xcode: Support "GPU Frame Capture" scheme propertyJake Turner2021-10-191-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | Added XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE variable which sets the scheme property value for "GPU Frame Capture" in the Options section by setting the Xcode project variable "enableGPUFrameCaptureMode". Example values are "Metal" (1) and "Disabled" (3). XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE is initialized by the property CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE. Implements: #22700
* | cmTarget: Add cmFileSet and associated propertiesKyle Edwards2021-10-271-1/+320
|/
* Source: Fix clang -Wimplicit-fallthrough warningsSean McBride2021-09-281-0/+2
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-49/+50
|
* Refactor: Convert parallel string/backtrace vectors to BT vectorsKyle Edwards2021-09-031-174/+53
|
* Refactor: Use new SetProperty signaturesMarc Chevrier2021-08-251-4/+4
|
* Enhancement: SetProperty accept cmProp or std::stringMarc Chevrier2021-08-251-52/+64
| | | | | Methods SetProperty of classes cmPropertyMap, cmStateDirectory and cmMakefile accept now cmProp or std::string as argument.
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-21/+22
| | | | | | 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 cmTargetExport removing InterfaceIncludeDirecoriesEugene Shalygin2021-07-221-0/+12
| | | | | | | | 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.
* HIP: Add language to CMakeRobert Maynard2021-06-071-4/+8
|
* Launchers: Support setting linker launchersBobby D Reynolds2021-05-281-0/+4
| | | | Fixes: #18316
* cmListFileCache: Simplify relative path conversion in backtracesBrad King2021-05-171-3/+1
| | | | | | | | Printing paths to CMake input files does not need to use the generator-wide relative path conversion rules because we are not actually generating a relative path for the build system that needs to be consistent with anything else. Instead, simply print a relative path if it does not need to start in `../`, and otherwise an absolute path.
* cmStateDirectory: Rename ConvertToRelPathIf{Not => }ContainedBrad King2021-05-121-1/+1
| | | | The "Not" in the method name is backward from its logic.