summaryrefslogtreecommitdiffstats
path: root/Help/policy
Commit message (Collapse)AuthorAgeFilesLines
* CUDA: Add support for disabling CUDA_ARCHITECTURESRaul Tambre2020-06-151-0/+25
| | | | | | | | | | The ability to disable adding architectures completely for packaging purposes and cases requiring passing the architectures flags explicitly has been requested. Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES for this purpose. Implements #20821.
* target_link_libraries: self-link through ALIAS is an errorMarc Chevrier2020-05-301-0/+19
| | | | Fixes: #19617
* ALIAS target: cannot overwrite an existing targetMarc Chevrier2020-05-281-0/+19
| | | | Fixes: #19616
* Modules/Documentation: removeBen Boeckel2020-04-221-0/+19
| | | | | | | | | | | | This is an old module from when VTK and other Kitware projects drove the addition of commands and modules into CMake itself. Modern VTK doesn't need this module and it can be ignored. This module is kept around so that the ancient VTK versions which use it are not broken by it. VTK itself stopped using the module in 2012 and the last usage by an example in VTK was removed in 2020. Fixes: #20591
* CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-0/+19
| | | | | | | | | | properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated to the device link step. To control which options are selected for normal link and device link steps, the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used. Fixes: #18265
* CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-151-0/+31
| | | | | | | | | | | Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.
* export(): raise an error on multiple calls with same FILEMarc Chevrier2020-03-261-0/+22
| | | | Fixes: 20472
* cmMarkAsAdvancedCommand: ignore variables which don't exist in the cacheBen Boeckel2020-01-201-0/+25
| | | | Fixes: #18331
* target_compile_options: ensure BEFORE keyword is handled in all scopesMarc Chevrier2020-01-111-0/+20
| | | | Fixes: #20200
* Autogen: Process .hh headers based on new policy CMP0100 settingsSebastian Holtermann2020-01-041-0/+40
| | | | | | | Reintroduces .hh header processing in AUTOMOC and AUTOUIC based on the new policy CMP0100 setting. Fixes: #13904 CMAKE_AUTOMOC misses headers with ".hh" extension
* Link properties: must be transitive over private dependency on static libraryMarc Chevrier2019-12-091-0/+24
| | | | Fixes: #20022
* FindFLEX: Add policy CMP0098 to run flex in build treeJannick2019-11-151-0/+30
|
* Merge topic 'docs-find-vars'Brad King2019-10-291-3/+3
|\ | | | | | | | | | | | | | | a0a7a45dbc Help: Fix markup errors, improve wording of CMAKE_FIND... variable docs 049dbdd38c Help: Document that <PackageName>_ROOT applies to config packages too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3952
| * Help: Document that <PackageName>_ROOT applies to config packages tooCraig Scott2019-10-271-3/+3
| | | | | | | | | | | | | | | | | | The original intent of <PackageName>_ROOT may have been for it to apply only to Find modules, but the implementation of the find_package() command treats modules and config packages the same. Both result in a <PackageName>_ROOT variable being pushed onto the stack of package roots. A config package can also call other find_...() commands, the behavior doesn't apply just to find modules.
* | Help: Fix capitalization in CMP0097 documentationKyle Edwards2019-10-231-1/+1
|/
* ExternalProject: Support not initializing any submodulesRobert Maynard2019-07-241-0/+23
| | | | Fixes #15592
* Merge topic 'msvc-runtime-library-doc'Brad King2019-07-191-1/+3
|\ | | | | | | | | | | | | 282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3573
| * MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not setBrad King2019-07-191-1/+3
| | | | | | | | | | By default `CMAKE_MSVC_RUNTIME_LIBRARY` is not set. Document the default runtime library selection in that case. We already test it.
| * Merge branch 'android-pie-cmp0083' into release-3.15Brad King2019-06-191-0/+6
| |\ | | | | | | | | | Merge-request: !3459
* | | project: Keep leading `0` in PROJECT_VERSION componentsAlex Turbov2019-07-161-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce CMake policy `CMP0096` to make `project()` keep leading zeros in version components. As a side effect, it now allows really long version numbers. Fixes: #19421 Co-Author: Brad King <brad.king@kitware.com>
* | | Merge topic 'android-pie-cmp0083'Brad King2019-06-191-0/+6
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 9e99a95c7d Android: ensure PIE behavior is consistent regardless CMP0083 policy Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3459
| * | Android: ensure PIE behavior is consistent regardless CMP0083 policyMarc Chevrier2019-06-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c4b4d8b3a6 (POSITION_INDEPENDENT_CODE: Manage link flags for executables, 2018-10-02, v3.14.0-rc1~395^2) we accidentally removed our Android-specific logic for PIE under the CMP0083 OLD behavior. Restore it and also implement Android-specific logic for CMP0083 NEW behavior. Fixes: #19393
* | | cmInstallTargetGenerator: Introduce CMP0095Dennis Klein2019-06-131-0/+30
| |/ |/| | | | | | | | | | | Escape coincidental CMake syntax in RPATH entries when generating the intermediary cmake_install.cmake script. Fixes #19225
* | FindPython: Add policy to manage lookup stratgey default.Marc Chevrier2019-05-211-0/+22
| |
* | FindBoost: Introduce CMP0093 to report Boost_VERSION in x.y.z formatDennis Klein2019-05-131-0/+24
| | | | | | | | This aligns module mode behaviour with config mode.
* | MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by defaultBrad King2019-04-191-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not add default warning flags on other compilers, and having a warning flag in the default flags makes it hard for projects to customize the warning level. They need to use string processing to remove `/W3` from `CMAKE_{C,CXX}_FLAGS`. Therefore we should drop it. However, projects may be using string processing to replace `/W3` with another flag, so we cannot simply drop it. Add a policy to drop it in a compatible way. Fixes: #18317
* | MSVC: Add abstraction for runtime library selectionBrad King2019-04-171-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class abstraction to select the runtime library from an enumeration of logical names. We've long hesitated to do this because the idea of "runtime library selection" 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 flags 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 CMP0091 to provide compatibility. Fixes: #19108
* | Help: Improve documentation formatingBartosz Kosiorek2019-04-045-17/+19
| |
* | Help: Improve documentation links and formattingBartosz Kosiorek2019-03-2755-336/+347
| |
* | Merge topic 'doc-cmp0082'Brad King2019-03-211-3/+5
|\ \ | |/ | | | | | | | | | | ce730e9c22 Help: Clarify policy CMP0082 documentation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3133
| * Help: Clarify policy CMP0082 documentationBrad King2019-03-211-3/+5
| | | | | | | | | | | | | | The policy documentation added by commit fc8955e889 (add_subdirectory: Run subdirectory install rules in correct order, 2018-10-02, v3.14.0-rc1~565^2~1) left out our usual sentence about the policy providing compatibility.
* | export: Disable PACKAGE mode user package registry by defaultRobert Maynard2019-03-151-0/+27
| | | | | | | | | | | | | | The user package registry populated by the `export()` command causes side effects outside the build and source directories. Such effects should be opt-in rather than op-out. Introduce a policy to change default behavior of `export(PACKAGE)` to do nothing.
* | XLClang: Add policy CMP0089 to present as XL for compatibilityBrad King2019-02-251-0/+30
|/ | | | | | | | We now identify IBM's Clang-based XL compilers, which define `__ibmxl__`, as `XLClang` rather than `XL`. In order to support existing project code that checks for `XL`, add a policy whose OLD behavior is to present the compiler id as `XL` and whose NEW behavior is to present the compiler id as `XLClang` as we really detect it.
* PIE link options: No warning when policy CMP0083 is not set.Marc Chevrier2019-02-201-3/+4
| | | | Fixes: #18955
* FindBISON: Add policy CMP0088 to run bison in build treeRobert Maynard2019-01-101-0/+29
|
* Merge topic 'link-options'Craig Scott2018-12-231-0/+38
|\ | | | | | | | | | | | | f255280fd9 PIE link options: Update strategy to fix performance regression Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2739
| * PIE link options: Update strategy to fix performance regressionMarc Chevrier2018-12-191-0/+38
| | | | | | | | Fixes: #18700
* | install: Teach CODE,SCRIPT modes to evaluate generator expressionsJon Chronopoulos2018-12-221-0/+29
|/ | | | | | | This also introduces CMP0087 which will keep the OLD behaviour of not evaluating generator expressions Fixes: #15785
* UseSWIG: add management of SWIG option -moduleMarc Chevrier2018-12-071-0/+20
| | | | | | | When file property SWIG_MODULE_NAME is specified, provide option -module to SWIG compiler. Fixes: #18374
* Help: update policy 0078 documentationMarc Chevrier2018-12-071-0/+2
|
* Genex: Add policy to handle empty list items in $<IN_LIST:...>Kyle Edwards2018-11-191-0/+21
| | | | | | | | | | The old behavior of $<IN_LIST:...> is inconsistent with that of if(IN_LIST), in that it does not find an empty search item even if the list contains empty items. This change adds a new policy to correctly handle empty items and make the behavior more consistent with if(IN_LIST). Fixes: #18556
* find_package(): Add policy to remove the FindQt moduleKyle Edwards2018-11-141-0/+26
| | | | | | | | Removing FindQt.cmake gives Qt upstream a path forward to export its own QtConfig.cmake files which can be found by find_package() without having to explicitly specify CONFIG. Projects that still want to use Qt3/4 can call find_package(Qt[34]), include(FindQt), or add FindQt.cmake to their CMAKE_MODULE_PATH.
* POSITION_INDEPENDENT_CODE: Manage link flags for executablesMarc Chevrier2018-11-111-0/+24
| | | | Fixes: #14983, #16561
* Help: Override pygments CMakeLexer to support <..> and [..]Joachim Wuttke (o)2018-10-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | * The code snippets in the docs consist of CMake code mixed with syntax definition punctuation like < > [ ] ... Therefore a pure CMake lexer is inadequate. Here it is replaced by a CMake syntax definition parser. * Fixed syntax definition snippets in FindPkgConfig.cmake to make best use of syntax highlighting. This source file is the hardest to support because it contains comparison operators <= = >=, which need special attention to avoid confusion with the placeholder indicators <...>. * Fixed syntax in execute_process.rst (there were unbalanced brackets). * Disabled syntax highlighting for long string examples in cmake-language.7.rst. * No highlighting of removed syntax in CMP0049 * To inspect the outcome of this patch, see e.g. the pages * manual/cmake-buildsystem.7.html * module/ExternalProject.html * module/FindPkgConfig.html which are particularly rich in complex code snippets.
* Merge topic 'document-dollar-in-varnames'Brad King2018-10-161-0/+4
|\ | | | | | | | | | | | | 82a4822610 CMP0053: document that `$` is a valid literal variable character Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2479
| * CMP0053: document that `$` is a valid literal variable characterBen Boeckel2018-10-151-0/+4
| | | | | | | | | | | | | | | | This was overlooked in the initial implementation of CMP0053. However, an additional policy to reject it again is not worth it. Instead, add tests and document the behavior. Fixes: #17883
* | add_subdirectory: Run subdirectory install rules in correct orderKyle Edwards2018-10-101-0/+24
| | | | | | | | | | | | | | | | | | Before this change, install rules created by add_subdirectory() would be executed after all of the top-level install rules, even if they were declared before the top-level rules. This change adds a new policy, CMP0082, which interleaves the add_subdirectory() install rules with the other install rules so they are run in the correct order.
* | Help: Clarify policy CMP0077 documentationBrad King2018-10-031-4/+40
|/ | | | | | | Add background about the case in which the policy is relevant. Describe the OLD and NEW behaviors more completely. Fixes: #18418
* LINK_DIRECTORIES target property: add policy for absolute paths check.Marc Chevrier2018-09-251-0/+22
|
* BundleUtilities: Disallow inclusion at configure timeKyle Edwards2018-09-191-0/+25
| | | | | | This commit adds a new CMake policy, CMP0080, which prohibits the inclusion of BundleUtilities at configure time. The old behavior is to allow the inclusion.