summaryrefslogtreecommitdiffstats
path: root/Help/policy
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add policy CMP0068 separate install_name and RPATH settings on macOSClinton Stimpson2017-02-141-0/+35
| | | | | | | | BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name of a target on macOS. Fixes: #16589
* try_compile: extend CMP0067 to honor language standards for CUDA.Robert Maynard2016-12-121-1/+4
|
* try_compile: Add policy CMP0067 to honor language standardsBrad King2016-12-061-0/+34
| | | | | | | | | | | | | | Projects use `try_compile` to check if they will be able to compile some particular source code. When a language standard variable like `CMAKE_CXX_STANDARD` is set, then the project intends to compile source code using a compiler mode for that standard. Therefore it makes sense for `try_compile` to use that standard in the test project too. Unfortunately this was not done when support for the `CMAKE_CXX_STANDARD` variable was first implemented. Add a policy to introduce the improved behavior in a compatible way. Closes: #16456
* try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG>Brad King2016-06-291-0/+27
| | | | | | | | | | | | | | | | In the `try_compile` source file signature we propagate the caller's value of `CMAKE_<LANG>_FLAGS` into the test project. Extend this to propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the default value in the test project. This will be useful, for example, to allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`). However, some projects may currently depend on this not being done, so we need to activate the behavior using a policy. This change was originally made by commit v3.6.0-rc1~160^2 (try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11) but without the policy and so had to be reverted during the 3.6 release candidate cycle. Fixes #16174.
* CMP0059: Fix typo in policy descriptionBrad King2016-05-021-1/+1
|
* Help: Clarify policy `CMP0040` documentation (#15681)Bartosz Kosiorek2016-01-281-8/+11
| | | | | State explicitly that the target must be defined in the current directory. While at it, improve markup formatting.
* CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGSChuck Atkins2015-09-211-0/+27
| | | | | This new policy restricts the addition of the shared library link flags to executables only when the ENABLE_EXPORTS property is set to True.
* if: Add "TEST <test>" conditionMatt McCormick2015-08-031-0/+17
| | | | | | | | if(TEST TestNameThatExists) will return true if a test with the name TestNameThatExists has been added with add_test. The syntax is similar to if(TARGET TargetName). Since use of "TEST" as an argument to if() could previously be interpreted as a non-keyword argument, add policy CMP0064 to treat it as a keyword as NEW behavior.
* Help: Document explicitly that policy OLD behavior is deprecatedBrad King2015-06-0965-0/+132
| | | | | | | | | | | The most likely documentation page a project author will read in response to a policy warning is the page for the policy itself. Add to every policy documentation page a note explicitly stating that the OLD behavior is deprecated. Also mention this in the cmake_policy() command documentation that explains how to set a policy to OLD. Suggested-by: Fraser Hutchison <fraser.hutchison@gmail.com>
* Honor visibility properties for all target types (#15556)Brad King2015-05-261-0/+26
| | | | | | | | | | | | | | | | The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN were first merged in commit v2.8.12~322 (Merge topic 'VISIBILITY_PRESET-property', 2013-06-05) but worked only for shared libraries and executables with exports. Prior to commit v3.0.0-rc1~581^2 (GenerateExportHeader: Deprecate add_compiler_export_flags function., 2013-09-02) the add_compiler_export_flags function was used to add visibility flags to all targets. The visibility flags are useful for sources in all target types because they may be later linked into shared libraries or executables with exports. Introduce policy CMP0063 to enable them for all target types while preserving compatibility with existing projects that do not expect this.
* install: Disallow installing export() result.Stephen Kelly2015-05-141-0/+27
|
* CTest: Stop telling 'make' to ignore errors with -iBrad King2015-05-121-0/+24
| | | | Add policy CMP0061 to maintain compatibility for existing projects.
* Merge topic 'if-IN_LIST'Brad King2015-04-301-1/+11
|\ | | | | | | | | aed6239e if: Implement new IN_LIST operator
| * if: Implement new IN_LIST operatorNils Gladitz2015-04-301-1/+11
| |
* | Merge topic 'revert-CMP0057'Brad King2015-04-301-18/+1
|\ \ | |/ | | | | | | 32a2f414 Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."
| * Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."Nils Gladitz2015-04-301-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 242c3966 (add_custom_command: Diagnose MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands, 2015-03-26). I misdiagnosed the underlying issue that prompted creation of policy CMP0057. The actual issue surfaces when a single custom command's MAIN_DEPENDENCY is listed in more than one target; this issue will have to be addressed independently.
* | Help: Replace CMP0054 example to show when it makes a differenceTamás Kenéz2015-04-291-6/+10
| | | | | | | | | | | | The previous example for CMP0054 did not show how critical the policy is since the result is the same in both cases (NEW and OLD behavior). Instead show an example when the policy does make a difference.
* | Help: Clarify policy CMP0026 titleNils Gladitz2015-04-281-1/+1
|/ | | | | | | Clarify that the policy only applies to build targets and not e.g. imported targets. Suggested-by: Alan W. Irwin
* Link libraries by full path even in implicit directoriesBrad King2015-04-091-0/+63
| | | | | | | | | | | | | | | | | | | | | | When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.
* Do not treat DEFINITIONS as a built-in directory propertyStephen Kelly2015-04-021-0/+17
| | | | | | | | Add policy CMP0059 to cover this change. The property has been deprecated since CMake 2.4 anyway. This will help clean up cmMakefile -- the DefineFlagsOrig member should not need to exist.
* Ninja: Add policy to require explicit custom command byproductsBrad King2015-03-201-0/+108
| | | | | | | | | | | | Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown custom command dependencies. This requires projects to specify their custom command byproducts explicitly. With this requirement we no longer have to assume that unknown custom command dependencies are generated and can instead simply assume they are source files expected to exist when the build starts. This is particularly important in in-source builds. It is also helpful for out-of-source builds to allow Ninja to diagnose missing files before running custom command rules that depend on them.
* add_custom_command: Diagnose MAIN_DEPENDENCY limitation.Nils Gladitz2015-03-091-0/+21
| | | | | The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across multiple custom commands.
* Merge topic 'doc-CMP0054-example'Brad King2014-12-121-3/+31
|\ | | | | | | | | f2f1c95d Help: Extend policy CMP0054 documentation with an example
| * Help: Extend policy CMP0054 documentation with an exampleNils Gladitz2014-12-121-3/+31
| |
* | try_compile: Pass linker flags into test project (#14066)Brad King2014-12-031-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by try_compile, just like we already copy CMAKE_<LANG>_FLAGS. Add CMake Policy CMP0056 to activate this behavior in a compatible way, but do not warn by default when the policy is not set since it will affect all try_compile calls. Extend the RunCMake.try_compile test with a case covering this behavior for each policy setting.
* | Merge topic 'doc-CMP0053-dedup-char'Brad King2014-12-011-1/+1
|\ \ | |/ | | | | | | 191d2b20 Help: Remove duplicate '#' in CMP0053 valid character list
| * Help: Remove duplicate '#' in CMP0053 valid character listChristoph Grüninger2014-12-011-1/+1
| |
* | break: Add policy CMP0055 to check calls strictlyGregor Jasny2014-11-251-0/+17
|/ | | | | | Reject break() without loop scope or any arguments. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-0/+18
|
* Merge topic 'doc-CMP0022-compat-version-typo'Brad King2014-08-131-1/+1
|\ | | | | | | | | 91857e04 CMP0022: Fix version documented to support LINK_PUBLIC/LINK_PRIVATE
| * CMP0022: Fix version documented to support LINK_PUBLIC/LINK_PRIVATEBrad King2014-08-131-1/+1
| | | | | | | | These have been available since 2.8.7, not 2.8.9 as the docs said.
* | Help: Add missing space in policy CMP0020 descriptionPeter Kümmel2014-05-301-1/+1
| |
* | EVIS: Add policy CMP0053Ben Boeckel2014-05-082-0/+47
| | | | | | | | | | This policy switches between the old EVIS parser and the new, faster parser.
* | Help: Link to cmake-buildsystem from CMP0052 docs.Stephen Kelly2014-04-171-0/+3
| |
* | Help: Fix typo in CMP0051.Stephen Kelly2014-04-141-1/+1
| | | | | | | | STRIP_GENEX -> GENEX_STRIP.
* | Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | Allow directories in the source tree or build tree only if the install tree is a subdirectory of the source tree or build tree, as appropriate. Re-use the test files in the RunCMake.include_directories test to run in multiple scenarios. Bump the required CMake version in the test to 3.0 to ensure that the new policy warnings are emitted correctly.
* | Merge topic 'target-sources-refactor'Brad King2014-04-031-0/+24
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources. aa0a3562 cmGeneratorTarget: Compute target objects on demand 042c1c83 cmTarget: Compute languages from object libraries on demand. fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand. c355d108 cmComputeTargetDepends: Track object library depends. e5da9e51 cmTarget: Allow any generator expression in SOURCES property. 5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages 28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand. bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression. 8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES. 4959f341 cmSourceFileLocation: Collapse full path for directory comparisons. fcc92878 cmSourceFileLocation: Remove unused Update method. 59e8740a cmTarget: Remove AddSourceFile method 26d494ba cmTarget: Use string API to add sources to cmTarget objects. d38423ec cmTarget: Add a method to obtain list of filenames for sources. ...
| * cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.Stephen Kelly2014-04-021-0/+24
| | | | | | | | Add policy CMP0051 to control this behavior.
* | Do not warn by default when policy CMP0025 or CMP0047 is not setBrad King2014-04-022-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These policies are triggered by the use of a particular compiler rather than outdated CMake code in a project. Avoid warning in every project that enables a language by not displaying the policy warning by default. Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning explicitly; otherwise enable the warning with --debug-output or --trace. This breaks with strict policy convention because it does not provide developers with any warning about the behavior change by default. Existing projects will continue to build without a warning or change in behavior. When a developer changes the minimum required version of CMake in a project to a sufficiently high value (3.0), the project will suddenly get the new compiler id and may break, but at least the breakage comes with a change to the project rather than the version of CMake used to build it. Breaking strict policy convention is worthwhile in this case because very few projects will be affected by the behavior change but every project would have to see the warning if it were enabled by default.
* | Help: Revise and format policy CMP0025 and CMP0047 docsBrad King2014-04-022-20/+31
|/ | | | | | Add inline reST markup as appropriate. Word CMP0047 docs more like those of CMP0025. State explicitly that the policies must be set before the project or enable_language command calls.
* cmTarget: Restore <CONFIG>_LOCATION to CMP0026 OLD behavior (#14808)Stephen Kelly2014-03-171-3/+4
| | | | | | | Restore support for the undocumented <CONFIG>_LOCATION target property removed by commit v3.0.0-rc1~175^2 (cmTarget: Remove support for <CONFIG>_LOCATION property, 2013-12-30) as part of the CMP0026 OLD behavior.