summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* add_test: Optionally use a launcher for tests running in-project targetsRalf Habacker2023-12-131-0/+1
| | | | | | | Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER` target property. Issue: #23672
* Merge topic 'swift-compilation-mode'Brad King2023-11-191-0/+1
|\ | | | | | | | | | | | | | | | | | | 0f80101b73 Tests: Update Swift tests to use CMP0157 NEW behavior c1d787e473 Swift: Add abstraction for compilation mode c39384f540 Tests: Simplify RunCMake.Swift conditions to enable use of Swift Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8918
| * Swift: Add abstraction for compilation modeEvan Wilde2023-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding `Swift_COMPILATION_MODE` target property to control the compilation mode. Select among `wholemodule`, `singlefile`, and `incremental`. Add policy CMP0157 to remove the default `-wmo` flags in favor of the abstract setting. Issue: #25366
* | Autogen: Add support for response files for moc predef targetstophoo2023-11-161-0/+1
| | | | | | | | | | Add support for response files for moc predef targets and make the limit when to use response files for autogen targets configurable.
* | install(EXPORT): Export find_dependency() callsKyle Edwards2023-11-131-0/+11
|/ | | | | | Issue: #20511 Co-Authored-by: Brad King <brad.king@kitware.com> Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
* Add options to specify linker toolMarc Chevrier2023-10-131-0/+1
| | | | | | | | | | | | | | | | | | Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as the target property `LINKER_TYPE` to specify which linker must be used. The implementation of this capability is specified by variables specific to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`. Some definitions are provided as part of `CMake`. For example, to select the `LLVM` linker rather than the standard one, the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`. And, on `Apple`, `Linux` and some environments on `Windows`, the variable `CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows` environments based on `MSVC`, where the linker is used directly, the tool `lld-link.exe` will be used rather than `link.exe`. Fixes: #19174, #24254, #24990
* Ninja: Allow compilation before generation of dependencies' private sourcesMartin Duffy2023-09-201-0/+5
| | | | | | | | | | This requires knowing when a generated header is public, which we can model using file sets. Add policy CMP0154 to treat generated sources as private by default in targets with file sets. Generated public headers can be specified in public file sets. Fixes: #24959 Issue: #15555
* cxxmodules: generate synthetic targets as an initial passBen Boeckel2023-08-171-0/+180
| | | | | | We need to be able to construct BMIs that will be usable from the client modules for the target importing the module, so create BMI-only compilation rules for `IMPORTED` targets to create these BMIs.
* cmTarget: report that synthetic targets can compile sourcesBen Boeckel2023-08-171-0/+3
|
* cmTarget: rename entry copying methodBen Boeckel2023-08-171-6/+6
| | | | It will also be used to copy from other targets, not just directories.
* cmTarget: track and store `IMPORTED_CXX_MODULES_` usage propertiesBen Boeckel2023-08-171-0/+38
| | | | | | While not "usage requirements" directly, when applied to a target that will eventually have the BMI compile rules attached to them, they need tracked as such.
* OPTIMIZE_DEPENDENCIES: Skip order-only deps for non-linking targetsCraig Scott2023-08-091-0/+18
| | | | Fixes: #21517
* cmTarget: handle `HIP_STANDARD` like other language standardsBen Boeckel2023-07-291-2/+3
|
* macOS: Add support for linking against .xcframework foldersKyle Edwards2023-07-261-0/+20
| | | | Issue: #21752
* Merge topic 'property-typo-fix'Brad King2023-07-251-1/+1
|\ | | | | | | | | | | | | | | c172eecea6 cmTarget: Restore Fortran_PREPROCESS property initialization Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8654
| * cmTarget: Restore Fortran_PREPROCESS property initializationBen Boeckel2023-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix a typo from commit e522f8ca06 (cmTarget: factor out properties initialized for target which compile, 2023-02-01, v3.27.0-rc1~577^2~13), that broke this property. Also update the test suite to use this upgrade as some level of coverage. Fixes: #25123
* | cmTarget: Add a way to represent imported shared library stubsRobert Maynard2023-07-181-6/+20
| | | | | | | | | | | | | | | | Shared library stubs can be used for linking, but not at runtime. Their role is similar to import libraries on Windows, so represent their location with the `IMPORTED_IMPLIB` target property. Fixes: #24940
* | cmList: Add container conversion to stringMarc Chevrier2023-06-221-6/+6
|/
* Merge topic 'automoc-moc-options-test'Brad King2023-06-011-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | 1f4b374d6e cmQtAutoGenInitializer: Reduce string copies b6f66b445a cmQtAutoGenInitializer: Remove no-op calls 55d93bdabf cmQtAutoGenInitializer: Improve const correctness feb56a666f cmTarget: Improve const correctness of AddUtility 5e513e562f Help: Add AUTOMOC_MOC_OPTIONS example 5380ad9d58 Tests: Add test for AUTOMOC_MOC_OPTIONS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8523
| * cmTarget: Improve const correctness of AddUtilityOrkun Tokdemir2023-05-311-1/+2
| |
* | cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesetsBen Boeckel2023-05-311-32/+0
|/ | | | | There's no backing implementation for header units anyways, so just remove it for now.
* SetProperty: suppress raw pointer usageMarc Chevrier2023-05-261-30/+2
|
* Merge topic 'autogen-system-include'Brad King2023-05-041-0/+1
|\ | | | | | | | | | | | | | | | | | | 7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set 033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property 8ba16db163 Tests/RunCMake: Add option for dynamic expected output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8400
| * Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target propertyOrkun Tokdemir2023-05-031-0/+1
| | | | | | | | | | | | | | `AUTOGEN_USE_SYSTEM_INCLUDE` was added. `AUTOGEN_USE_SYSTEM_INCLUDE` is a boolean property that can be set on a target to indicate that the autogen target include directory should be added as a system include directory or normal include directory to the target.
* | Merge topic 'vs-debugger-init'Brad King2023-05-021-0/+4
|\ \ | | | | | | | | | | | | | | | | | | 35566b48b4 VS: Add variables to initialize debugger-related properties Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8445
| * | VS: Add variables to initialize debugger-related propertiesAlex Neundorf2023-05-011-0/+4
| |/ | | | | | | | | | | Add variables to initialize target properties `VS_DEBUGGER_COMMAND`, `VS_DEBUGGER_COMMAND_ARGUMENTS`, `VS_DEBUGGER_ENVIRONMENT`, and `VS_DEBUGGER_WORKING_DIRECTORY`.
* | CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-4/+4
|/
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-4/+5
|
* Merge topic 'autogen-exe-vars'Brad King2023-03-231-0/+3
|\ | | | | | | | | | | | | b3d1797508 Autogen: Add CMAKE_AUTO*_EXECUTABLE variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8352
| * Autogen: Add CMAKE_AUTO*_EXECUTABLE variablesOrkun Tokdemir2023-03-221-0/+3
| | | | | | | | | | | | | | | | Add the `CMAKE_AUTOMOC_EXECUTABLE`, `CMAKE_AUTOUIC_EXECUTABLE`, and `CMAKE_AUTORCC_EXECUTABLE` variables to initialize the corresponding `AUTO{MOC,UIC,RCC}_EXECUTABLE` target properties. Fixes: #20071
* | Merge topic 'vs-windows-min-version'Brad King2023-03-161-0/+1
|\ \ | |/ |/| | | | | | | | | 6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8319
| * VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variablehalx992023-03-151-0/+1
| | | | | | | | | | | | Provide a way to initialize the `VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION` target property on targets. It sets `WindowsTargetPlatformMinVersion` in `.vcxproj` files.
* | Merge topic 'support_cubin_fatbin_optix_cuda_output'Brad King2023-03-141-8/+35
|\ \ | |/ |/| | | | | | | | | | | 2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8259
| * CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilationRobert Maynard2023-03-131-8/+35
| |
* | Apple: text-based stubs: manage imported configurations mappingMarc Chevrier2023-03-051-1/+3
| |
* | Merge topic 'Apple-handle-Text-Stubs'Brad King2023-03-021-9/+47
|\ \ | |/ |/| | | | | | | | | | | | | ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files) fcbd723a50 Enhance support functions Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !8204
| * Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-3/+36
| | | | | | | | Fixes: #24123
| * Enhance support functionsMarc Chevrier2023-02-281-6/+11
| | | | | | | | | | * Avoid duplicate definiitions for IsExecutableWithExports, etc... * Add helper IsApple()
* | Add option to add SOVERSION to DLL namesRalf Habacker2023-02-271-0/+6
|/ | | | | | | Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`. Fixes: #24251 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* cmMakefile: add support for a "synthesized" targetBen Boeckel2023-02-141-0/+17
| | | | | | It is a normal target, but will end up copying its internals from another target. Keep track of this state so that such copying can only occur when intended.
* cmTarget: make Visibility an `enum class`Ben Boeckel2023-02-141-10/+10
|
* cmTarget: store visibility as an `enum` rather than boolsBen Boeckel2023-02-141-13/+46
| | | | | | | | C++ modules are going to introduce a third concept of "synthesized" targets, so update logic where needed to avoid assuming "not imported? must be normal". Also add an accessor method to perform queries against the visibility.
* cmTarget: convert VS property settings to the new property lambdaBen Boeckel2023-02-021-15/+4
|
* cmTarget: factor out `POSITION_INDEPENDENT_CODE` initializationBen Boeckel2023-02-021-14/+8
| | | | | | This property is initialized using the common framework, but then forced on SHARED and MODULE targets, so just post-process the property in this case.
* cmTarget: factor out properties with targets with commandsBen Boeckel2023-02-021-5/+8
|
* cmTarget: factor out properties for targets with exportsBen Boeckel2023-02-021-5/+11
|
* cmTarget: factor out executable-requiring propertiesBen Boeckel2023-02-021-5/+8
|
* cmTarget: factor out linkable normal library target propertiesBen Boeckel2023-02-021-17/+10
|
* cmTarget: factor out non-executable normal target with artifact propertiesBen Boeckel2023-02-021-12/+12
|
* cmTarget: factor out normal targets with artifact propertiesBen Boeckel2023-02-021-24/+12
|