summaryrefslogtreecommitdiffstats
path: root/Help/policy
Commit message (Collapse)AuthorAgeFilesLines
* add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compilingRalf Habacker2023-12-191-0/+27
| | | | | | Add policy CMP0158 to provide compatibility for existing projects. Fixes: #23672
* Merge topic 'doc-CMP0149'Brad King2023-11-201-0/+7
|\ | | | | | | | | | | | | fe0d03b044 Help: Document that CMP0149 should be set before project() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8990
| * Help: Document that CMP0149 should be set before project()Brad King2023-11-201-0/+7
| | | | | | | | Issue: #25413
* | Swift: Add abstraction for compilation modeEvan Wilde2023-11-171-0/+48
| | | | | | | | | | | | | | | | | | | | | | 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
* | Link step: Enable to configure deduplication of librariesMarc Chevrier2023-11-091-0/+47
| | | | | | | | | | | | | | | | | | Some platforms, Apple or Windows for instance, do not require to duplicate static libraries to resolve mutual dependencies. Moreover, Xcode version 15 emits a warning if a library is duplicated. On Windows, enable a better control of libraries order. Fixes: #20722, #25297
* | CMP0155: ignore scanning for sources if no scanner is availableBen Boeckel2023-11-011-2/+4
| | | | | | | | | | | | | | | | | | | | This allows for a more graceful transition for projects using C++20 without scanner support (e.g., Clang 15 or GCC 13). While newer compilers will (needlessly) scan, it allows C++20-using projects to use older compilers without having to set `CMAKE_CXX_SCAN_FOR_MODULES` to support newer CMake minimum versions. Fixes: #25357
* | cmNinjaTargetGenerator: do not order-depend on C++ module sourcesBen Boeckel2023-10-201-0/+6
| | | | | | | | | | | | | | | | | | C++ module sources should not be included by any other TUs, so their presence cannot matter for order-only dependencies of the entire target. Exclude them. Update CMP0154 to take this into consideration and add tests to the `CXXModules` suite (which already deals with module support detection).
* | Help: Update Sphinx versionadded directives for 3.28 releaseBrad King2023-10-031-0/+2
| | | | | | | | | | | | | | | | | | Run the script: Utilities/Sphinx/update_versions.py --since v3.27.0 --overwrite Manually remove directives added to new documentation of existing environment variables.
* | Merge topic 'cxxmodules-no-longer-experimental'Brad King2023-10-021-0/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 437280b127 cxxmodules: scan C++ sources for imports by default 3cddd11649 Ninja: message about not compiled sources explicitly 068fde1c34 cmGeneratorTarget: use `this->` for method calls 197a6bf171 cxxmodules: rework control logic for scanning regular C++ sources 5eb7bd641a Tests/RunCMake/CXXModules: remove rules file requirement ff18acc301 CXXModules: remove `EXPERIMENTAL` from C++ module variable names 0c07f39006 cmExperimental: remove the flag for C++ modules 68caec9137 Help: add a manpage for cxxmodule support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !8828
| * | cxxmodules: scan C++ sources for imports by defaultBen Boeckel2023-10-021-0/+26
| | | | | | | | | | | | | | | Existing projects are not using C++ modules in their sources, so introduce policy CMP0155 to enable scanning by default.
* | | Merge topic 'doc-CMP0124'Brad King2023-10-021-5/+37
|\ \ \ | |/ / |/| / | |/ | | | | | | 55bf2a3494 Help: Document CMP0124 behavior on already-set variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8850
| * Help: Document CMP0124 behavior on already-set variablesBrad King2023-09-291-5/+37
| | | | | | | | | | | | | | | | | | Improve the documentation from commit 46896d98bb (foreach(): loop variables are only available in the loop scope, 2021-04-25, v3.21.0-rc1~245^2) to follow policy documentation convention. Fixes: #25224 Inspired-by: Marius Messerschmidt <marius.messerschmidt@googlemail.com>
* | Ninja: Allow compilation before generation of dependencies' private sourcesMartin Duffy2023-09-201-0/+53
| | | | | | | | | | | | | | | | | | | | 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
* | exec_program(): Remove by policy CMP0153Kyle Edwards2023-07-251-0/+12
| |
* | file(REAL_PATH): resolve symlinks before '..' componentsRobert Maynard2023-07-201-0/+20
|/ | | | | | | | Previously REAL_PATH would collapse paths before resolving any symlinks so if `..` crossed a symlink the output from `REAL_PATH` would be wrong. It looked like REAL_PATH did this by mistake since it was a side-effect of ensuring we had an absolute path before resolving symlinks.
* Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not setOrkun Tokdemir2023-05-031-0/+28
| | | | Add policy CMP0151 to preserve the old behavior by default.
* Merge topic 'ExternalProject-relative-git-urls'Craig Scott2023-04-271-0/+39
|\ | | | | | | | | | | | | 550f63447d ExternalProject/FetchContent: Support relative remote URLs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7988
| * ExternalProject/FetchContent: Support relative remote URLsChris Wright2023-04-261-0/+39
| | | | | | | | | | | | | | | | | | Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve relative remote URLs provided via `GIT_REPOSITORY`. Add policy CMP0150 to maintain compatibility. Fixes: #24211 Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* | Merge branch 'backport-3.26-help-CMP0105' into Help-CMP0105-clarificationsMarc Chevrier2023-04-151-2/+3
|\ \ | |/ |/|
| * Help: CMP0105 policy: clarificationsMarc Chevrier2023-04-151-2/+3
| |
* | VS: Select latest available Windows SDK version by defaultBrad King2023-04-051-0/+47
| | | | | | | | | | | | | | Add policy `CMP0149` to stop preferring SDKs exactly matching `CMAKE_SYSTEM_VERSION` over the latest SDK. Fixes: #16202
* | FindPython{Interp,Libs}: Add policy to remove these modulesBrad King2023-03-301-0/+29
| | | | | | | | | | | | The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated since CMake 3.12. Add a policy to pretend they do not exist in order to encourage projects to port to `FindPython` or `FindPython{2,3}`.
* | VS: Add policy to build custom commands concurrentlyBrad King2023-03-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 33c15ae2b9 (VS: Build custom commands concurrently when possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to custom commands in `.vcxproj` files, but that had to be reverted by commit abb1c12162 (VS: Revert "Build custom commands concurrently when possible", 2023-03-07, v3.26.0-rc6~3^2) because some projects may have custom commands that accidentally rely on serial execution in MSBuild. Add a policy to use `BuildInParallel` for custom commands in projects that have been updated to set the policy to `NEW`. Fixes: #18405
* | FindCUDA: Add policy to remove this moduleBrad King2023-03-091-0/+29
| | | | | | | | | | | | The `FindCUDA` module has been deprecated since CMake 3.10. Add a policy to pretend it doesn't exist in order to encourage projects to port away from it.
* | Dart,FindDart: Add policy to remove these modulesBrad King2023-02-281-0/+30
| | | | | | | | | | These modules and the "DART" tool they support have long been replaced by CTest.
* | Merge topic 'doc-cleanup-3.26-rc4'Brad King2023-02-281-6/+6
|\ \ | |/ | | | | | | | | | | | | b39b3e3bdb Help: Fix typos and grammar in 3.26 release notes 9f1360ae19 Help: Improve wording of FOLDER-related properties and policies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8264
| * Help: Improve wording of FOLDER-related properties and policiesCraig Scott2023-02-251-6/+6
| |
* | find_package: Use <PACKAGENAME>_ROOT variables as search prefixesBrad King2023-02-231-0/+26
|/ | | | | | | | | Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check upper-case `<PACKAGENAME>_ROOT` variables. Add policy `CMP0144` to enable the behavior in a compatible way. Fixes: #24403
* Help: Clarify behavior of BEFORE with target_compile_options()Craig Scott2022-11-271-8/+16
|
* Help: remove links from pages to themselvesBen Boeckel2022-11-181-1/+1
| | | | | At least the top-reference links. Internal `:ref:` usages have been left intact.
* Merge topic 'use_folders_on_by_default'Brad King2022-11-081-0/+30
|\ | | | | | | | | | | | | | | d3acd22380 USE_FOLDERS: Treat as on by default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Amir Masoud Abdol <amirmasoudabdol@icloud.com> Merge-request: !7830
| * USE_FOLDERS: Treat as on by defaultJuan Ramos2022-11-081-0/+30
| | | | | | | | | | | | | | Add a policy to treat the `USE_FOLDERS` global property as ON by default if it is not set. Fixes: #21695
* | Help: Fix some redirects reported with sphinx linkcheckAlex Turbov2022-11-071-1/+1
|/ | | | Mostly it's about replace `http:` with `https:` protocol.
* Help: Minor grammar, typo and formatting cleanupsCraig Scott2022-10-092-2/+2
|
* Merge topic 'help-add-custom-comman-byproducts'Brad King2022-09-191-0/+3
|\ | | | | | | | | | | | | 00b788e85e Help:custom_command: link policy on BYPRODUCTS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7662
| * Help:custom_command: link policy on BYPRODUCTSHinell2022-09-161-0/+3
| | | | | | | | | | | | Link policy explaining BYPRODUCTS. Fixes: #23786
* | Xcode: Do not append per-config suffixes to library search pathsMikko Sivulainen2022-09-151-0/+27
|/ | | | | | | Add policy `CMP0142` to remove the automatic addition of the `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` suffix in a compatible way. Fixes: #21757
* MSVC: Add abstraction for debug information formatGlen Chung2022-09-141-0/+55
| | | | | | | | | | | | | | | | 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
* return(): Propagate variables to result scopeMarc Chevrier2022-09-031-0/+17
| | | | Fixes: #23871
* Help: Fix typos, grammar and formatting in CMP0134 policy docsCraig Scott2022-08-301-4/+1
|
* Help: CMP0097 applies to FetchContent as wellCraig Scott2022-07-241-2/+4
| | | | The omission of FetchContent_Declare() in the original policy docs was just an oversight.
* Help: Mention CMP0131 in LINK_LIBRARIES docsCraig Scott2022-07-051-1/+1
|
* CheckIPOSupported: Compile check using flags of calling projectBrad King2022-06-101-1/+19
| | | | | | | | | | | | | | | | Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the calling project into the test project. The set of flags may affect the availability of IPO support. Since this may change the result of the check for existing projects, add a policy for compatibility. This was discovered after commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to switch our default for MSVC's debug info flag. The `-ZI` flag is incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted pending future work on an alternative solution. Re-use the CMP0138 policy number for this change to CheckIPOSupported instead. Fixes: #23607
* MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"Brad King2022-06-091-31/+1
| | | | | | | | | | | | | | Revert commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24). The `-ZI` flag is incompatible with the `-GL` flag used for IPO, and so is not an unconditionally better default. Revert the change pending future design of a first-class setting for MSVC debug info format that can be automatically reconciled with IPO settings. That commit introduced policy CMP0138, but we already have later policy numbers used too. Leave placeholder text to avoid policy renumbering. Issue: #23607, #10189
* if command: Add PATH_EQUAL operatorMarc Chevrier2022-06-031-0/+17
|
* MSVC: Default to -ZI instead of /Zi for x86 and x64Glen Chung2022-05-261-0/+43
| | | | | | | | | | Add a policy for compatibility. For more information, see [1]. [1] https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170 Fixes: #10189
* try_compile: Add option to skip passing platform variablesBrad King2022-05-161-0/+4
| | | | | | | Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell `try_compile` not to pass platform variables to the test project. Issue: #23219
* try_compile: Propagate platform variables in project-mode tooBrad King2022-05-161-0/+29
| | | | | | | | | Add policy CMP0137 to propagate both our builtin variables and those listed by `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` to `try_compile` whole-project builds. Inspired-by: Alexander Neumann <Alexander.Neumann@hamburg.de> Fixes: #23219
* OpenWatcom: Support CMAKE_WATCOM_RUNTIME_LIBRARY with Linux and OS/2 buildsCameron Cawley2022-05-061-1/+2
|
* OpenWatcom: Allow specifying the runtime libraryCameron Cawley2022-05-061-0/+49
| | | | | | | | 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