summaryrefslogtreecommitdiffstats
path: root/Help/policy
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* target_link_libraries: Allow use with targets in other directoriesBrad King2018-09-121-0/+40
| | | | | | | | | | | | | | | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Targets named on the RHS will need to be looked up during generation in the scope of the call site rather than the scope of the LHS target. Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties to specify target names that need to be looked up in a directory other than that containing the target on which the property is set. Add minimal documentation of the syntax to help users that encounter it. Unfortunately CMake previously did allow such calls in the case that only `INTERFACE` libraries are specified, but those libraries would be looked up in the target's directory rather than the caller's. Add policy `CMP0079` to enable the new behavior with new lookup scope in a compatible way. Fixes: #17943
* UseSWIG: add policy to manage target naming strategy.Marc Chevrier2018-07-251-0/+22
|
* Merge topic 'doc-find_package-root'Craig Scott2018-07-201-7/+8
|\ | | | | | | | | | | | | 492ade276b Help: Add explicit <PackageName>_ROOT variable documentation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2225
| * Help: Add explicit <PackageName>_ROOT variable documentationBrad King2018-07-201-7/+8
| | | | | | | | | | | | Add documentation for both the CMake variable and environment variable of this name pattern. Update references to these names to link to their documents. Clarify the pattern used to construct their names.
* | option: respect existing normal variableRobert Maynard2018-07-091-0/+16
| | | | | | | | Add policy CMP0077 to change this behavior in a compatible way.
* | target_sources: Interpret relative paths as relative to the calling directoryPatrick Stotko2018-06-181-0/+26
|/ | | | | | | | | | Previously the command considered non-absolute source file paths relative to the associated target on the LHS. This causes problems in incremental builds where files are added from subdirectories and forces users to workaround by manually converting to absolute paths. Change this to enable more intuitive usage by projects. Fixes #17981
* CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIESBrad King2018-04-181-0/+26
| | | | | | | | | | | | | Other check modules honor this variable, so include file checks should too. Add policy `CMP0075` to enable the behavior in a compatible way. This change was originally made by commit v3.11.0-rc1~108^2 (CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could affect checks in existing projects in an incompatible way. Fixes: #9514
* find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-0/+22
| | | | | | | | | | | | | | | | | | | This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and documented by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). However, we had to disable the feature and remove the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9, 2017-08-08) due to breaking projects that used `PackageName_ROOT` variables themselves. Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior in a compatible way. Also revise the stack of root paths to store the paths themselves rather than the package names. This way the policy can be considered at the `find_package` call site instead of individual `find_` calls inside a find module. Co-Author: Chuck Atkins <chuck.atkins@kitware.com> Issue: #17144
* Do not produce legacy _LIB_DEPENDS cache entriesBrad King2018-03-071-0/+25
| | | | | | Introduce policy `CMP0073` to avoid producing these cache entries. Fixes: #16364
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GLBrad King2017-11-171-0/+26
| | | | Fixes: #17449
* Help: Document CMP0037 relaxation of test and package targetsBrad King2017-11-011-1/+6
| | | | | | | Update documentation to account for commit ae5f40696e (CMP0037: Allow test and package targets when features are not enabled, 2017-10-26). Issue: #16062
* CMP0040: Clarify policy warning to match documentationBrad King2017-10-261-1/+1
| | | | | | | | | In commit v3.5.0-rc1~8^2~2 (Help: Clarify policy `CMP0040` documentation, 2016-01-28) the documentation was clarified to indicate that the target must be defined in the current directory. Do the same for the text of the policy warning itself. Fixes: #17399
* Autogen: Doc: Update CMP0071 descriptionSebastian Holtermann2017-09-281-12/+20
|
* Merge topic 'doc-CMP0069-typos'Brad King2017-08-101-4/+4
|\ | | | | | | | | | | | | 8d56308c Help: Fix module and function names in CMP0069 examples Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1122
| * Help: Fix module and function names in CMP0069 examplesRuslan Baratov2017-08-101-4/+4
| | | | | | | | Fixes: #17153
* | Autogen: Process GENERATED files. Add CMP0071.Sebastian Holtermann2017-07-181-0/+34
| | | | | | | | | | | | | | | | | | | | This lets AUTOMOC and AUTOUIC process GENERATED files which used to be ignored before. A new policy CMP0071 ensures that the old behavior of ignoring GENERATED files is enabled when the CMake compatibility version CMAKE_MINIMUM_REQUIRED is < 3.10. Closes #16186
* | file(GENERATE): Add policy CMP0070 to define relative path behaviorBrad King2017-06-091-0/+25
|/ | | | | | | | | Previously `file(GENERATE)` did not define any behavior for relative paths given to the `OUTPUT` or `INPUT` arguments. Define behavior consistent with CMake conventions and add a policy to provide compatibility for projects that relied on the old accidental behavior. Fixes: #16786
* Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-0/+92
| | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.