summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-variables.7.rst
Commit message (Collapse)AuthorAgeFilesLines
* Autogen: AUTO*_EXECUTABLE: add support for per-config valuesOrkun Tokdemir2024-01-171-0/+1
| | | | | | | | | | | | | | * Per-config values were added to `AUTO*_EXECUTABLE`. * Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds. * A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used. * Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph. * The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` is ON * Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage. * Some functions were refactored to avoid code duplication. This commit reimplements fddd0f0443b4ce81d61f15ee1b2f13105967b25a Fixes: #20074
* 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 'vs-ifx'Brad King2023-11-271-0/+1
|\ | | | | | | | | | | | | | | 43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files 5c77facd78 VS: Fix Intel plugin version detection fallback Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9001
| * VS: Add support for using Intel oneAPI Fortran compiler in .vfproj filesBrad King2023-11-221-0/+1
| | | | | | | | | | | | | | Add a `fortran={ifort,ifx}` field to `CMAKE_GENERATOR_TOOLSET` to specify which Intel Fortran compiler to use. Fixes: #25427
* | Help: Move deprecated variables to dedicated section權少2023-11-221-22/+64
|/
* 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/+1
|/ | | | | | Issue: #20511 Co-Authored-by: Brad King <brad.king@kitware.com> Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
* Optionally make `test` target depend on `all`William Sciaroni2023-11-101-0/+1
| | | | Fixes: #8774
* Link Step: compute effective linker used by the compilerMarc Chevrier2023-10-241-0/+4
| | | | | | | | | | | | | | | Extract the effective linker during the computation of implicit artifacts delivered by the compiler to the linker. Define various variables describing the linker: * CMAKE_<LANG>_COMPILER_LINKER * CMAKE_<LANG>_COMPILER_LINKER_VERSION * CMAKE_<LANG>_COMPILER_LINKER_ID * CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT This is complementary to feature introduced by commit 96a953b1ed (Add options to specify linker tool, 2023-09-27). Fixes: #17596, #18209, #25344
* Add options to specify linker toolMarc Chevrier2023-10-131-0/+3
| | | | | | | | | | | | | | | | | | 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
* CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docsBrad King2023-09-251-0/+1
|
* HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platformBrad King2023-09-211-0/+1
| | | | | For now, require the value to be `amd`, since that is the only platform we currently support.
* Merge topic 'use-linker-depfile'Brad King2023-05-041-0/+1
|\ | | | | | | | | | | | | | | 375e6fdbbe Link step: use linker dependency linker file 24a3e5cda0 cmLocalGenerator::MayBeRelativeToWorkDir: take care of all cases Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8443
| * Link step: use linker dependency linker fileMarc Chevrier2023-05-031-0/+1
| | | | | | | | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* | 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.
* | 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`.
* 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
* | 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 'Apple-handle-Text-Stubs'Brad King2023-03-021-0/+2
|\ | | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | Fixes: #24123
* | Add option to add SOVERSION to DLL namesRalf Habacker2023-02-271-0/+1
|/ | | | | | | Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`. Fixes: #24251 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLYAbdelmaged Khalifa2023-02-171-0/+1
| | | | | | | Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`. Fixes: #17097
* Kate: make it possible to force a mode for the "files" entryAlexander Neundorf2023-02-061-0/+1
| | | | | | | By default, kate will try to autodetect whether the project is a svn or git checkout or not. In case this does not give a satisfying result, the user can now set CMAKE_KATE_FILES_MODE to the mode he wants.
* Help: add documentation for Kate-related variableAlexander Neundorf2023-02-031-0/+1
|
* VS: Add a variable to report the Visual Studio version build numberBrad King2022-12-071-0/+1
| | | | | | | | | | VS 2017 and above come with a Visual Studio Installer tool that tracks four-component Visual Studio version numbers. We already detect the VS version number because it is needed to make some generation decisions. Provide the number to projects in a `CMAKE_VS_VERSION_BUILD_NUMBER` variable so they can use it similarly. Fixes: #24230
* clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR propertyKyle Edwards2022-12-061-0/+1
| | | | Fixes: #21362
* cxxmodules: add properties to control scanningBen Boeckel2022-11-181-0/+1
| | | | | | The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for targets and for source files rather than assuming "C++20 always needs to be scanned".
* Help: Re-sort property, variable and compiler id listsCraig Scott2022-10-091-22/+22
|
* Merge topic 'add_tasking_compiler'Brad King2022-09-151-0/+1
|\ | | | | | | | | | | | | 94df5b6ef1 Tasking: Add support for several compiler toolsets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7491
| * Tasking: Add support for several compiler toolsetsChristoph Seitz2022-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Tasking compiler toolset: * TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS, 8051 and PCP architecture compilers) * SmartCode Compiler Toolset 10.1 (with TriCore, ARC, MCS, 8051 architecture compilers) * ARM Compiler 6.0 * MCS Complier 3.3 * 8051 Compiler 7.2 Fixes: #23756
* | Merge topic 'MsvcDebugInformationFormatAbstraction'Brad King2022-09-141-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | a858466aac MSVC: Add test for debug information format 0e96a20478 MSVC: Add abstraction for debug information format d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7606
| * MSVC: Add abstraction for debug information formatGlen Chung2022-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace our hard-coded default for `/Zi` with a first-class abstraction to select the debug information format an enumeration of logical names. We've long hesitated to do this because the idea of "debug information format" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flag requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0141 to provide compatibility. Fixes: #10189
* | LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux hostCristian Adam2022-09-091-0/+1
| | | | | | | | Relates: #23840
* | BSD: Set CMAKE_HOST_BSD variable on a BSD hostCristian Adam2022-09-051-0/+1
| | | | | | | | | | | | Also the BSD variable will be set in CMake scripting mode (-P). Relates: #23853
* | BSD: Only use BSD as variable for target BSD systemCristian Adam2022-09-051-4/+0
|/ | | | | | | Instead of having multiple boolean variables, we only have one string variable: BSD with the name of the target BSD system. Relates: #23853
* Merge topic 'xcode-add-gpu-validation-and-default-configuration'Brad King2022-08-311-0/+3
|\ | | | | | | | | | | | | | | | | 740bee97bd Xcode: Add settings to control a scheme's launch configuration 39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values 4034272ed8 gitignore: Tell Git to ignore the .cache/ directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7581
| * Xcode: Add settings to control a scheme's launch configurationPatriceJiang2022-08-301-0/+1
| |
| * Xcode: Add settings to control a scheme's GPU Validation valuesPatriceJiang2022-08-301-0/+2
| |
* | BSD: Set *BSD variables when targeting a *BSD systemCristian Adam2022-08-201-0/+5
|/ | | | Fixes: #23853
* variable: Set LINUX variable on Linux target systemsCristian Adam2022-08-111-0/+1
| | | Fixes: #23840
* 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
* | 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 'try_compile-project-platform-vars'Brad King2022-05-171-0/+1
|\ | | | | | | | | | | | | | | | | a6562ff579 try_compile: Add option to skip passing platform variables 4843a37676 try_compile: Propagate platform variables in project-mode too Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7265
| * try_compile: Add option to skip passing platform variablesBrad King2022-05-161-0/+1
| | | | | | | | | | | | | | Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell `try_compile` not to pass platform variables to the test project. Issue: #23219