summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
Commit message (Collapse)AuthorAgeFilesLines
* If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-111-0/+5
|
* EVIS: Add policy CMP0053Ben Boeckel2014-05-081-0/+5
| | | | | This policy switches between the old EVIS parser and the new, faster parser.
* Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-091-0/+6
| | | | | | | | | | | 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.
* cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.Stephen Kelly2014-04-021-0/+5
| | | | Add policy CMP0051 to control this behavior.
* Remove some c_str() calls.Stephen Kelly2014-03-111-3/+3
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* add_custom_command: Disallow use of SOURCE signatures.Stephen Kelly2014-02-121-0/+5
| | | | Add CMP0050 to control this behavior.
* Add policy CMP0049 to avoid variable expansion in source listsStephen Kelly2014-02-121-0/+5
|
* Drop tweak version component from CMake PoliciesBrad King2014-02-041-69/+54
| | | | | | | | | | | | | Since commit v2.8.2~105^2~2 (Teach CMake Policies about tweak version component, 2010-04-23), cmPolicies has known how to handle a policy introduced in a tweak version. This was done back when we introduced policies with the current development date version and later updated it to the release version. Now we always introduce policies using the next expected release version and explicitly set the policy to test the NEW behavior. CMake Policies (or any other features) should never be introduced in a tweak (bugfix) release, so drop the infrastructure that allows this.
* project: Manage VERSION variablesBrad King2014-01-291-0/+5
| | | | | | | | | | | | | | | | Teach the project() command to set variables {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK} holding the project version number and its components. Add project() command option "VERSION" to specify the version explicitly, and default to the empty string when it is not given. Since this clears variables when no VERSION is given, this may change behavior for existing projects that set the version variables themselves prior to calling project(). Add policy CMP0048 for compatibility. Suggested-by: Alex Neundorf <neundorf@kde.org>
* QNX: Introduce QCC compiler id for that QNX platform compiler.Stephen Kelly2014-01-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Introduce policy CMP0047 to control resetting the id for compatibility. De-duplicate content in the QNX platform file by including the GNU one. QNX is a form of GNU platform. Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They are populated again later by the Compiler/GNU.cmake file anyway. Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC compiler id is in use, and the language is CXX. Use the QNX recommended flag for QCC instead of the gcc compatible -x flag. Populate new module files to handle system includes and depfiles when using the QCC compiler. Remove code which unsets the system include and depfiles related variables. When a GNU driver is used instead of the QCC one, the appropriate flags will be used. These variables were previously cleared for lowest-common-denominator compatibility with both drivers.
* AddDependencies: new policy requires dependencies to existNils Gladitz2014-01-121-0/+5
| | | | | Added new policy CMP0046 which requires dependencies added by add_dependencies() to actually exist.
* get_target_property: Error on non-existent target.Stephen Kelly2014-01-081-0/+5
| | | | Introduce policy CMP0045 to control this behavior.
* Genex: Use case-sensitive comparison for COMPILER_ID.Stephen Kelly2014-01-081-0/+5
|
* cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-081-0/+5
|
* OS X: Add CMP0042 to enable MACOSX_RPATH by defaultClinton Stimpson2014-01-021-0/+5
| | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* Export: Report error on relative include with genex.Stephen Kelly2013-11-261-0/+5
| | | | | | | | | | | | Diagnostics which check the sanity of exported include paths previously skipped over any path containing a generator expression. Introduce a policy to issue an error message in such cases. The export files created in the OLD behavior are not usable, because they contain relative paths or paths to the source or build location which are not suitable for use on installation. CMake will report an error on import.
* Add policy CMP0040 to disallow custom commands on missing targetsNils Gladitz2013-11-211-0/+5
|
* CMP0037: Extend policy to reserved names and custom targetsNils Gladitz2013-11-191-1/+1
| | | | | | | | Teach add_custom_target to check the policy too. Extend the policy to disallow reserved target names that we use for builtin targets like "all". Extend the RunCMake.CMP0037 test to cover these cases.
* CMP0039: Add missing '.' to policy summary lineDaniele E. Domenichelli2013-11-121-1/+1
|
* Disallow linking to utility targets (#13902).Stephen Kelly2013-11-071-0/+5
|
* Disallow link-to-self (#13947).Stephen Kelly2013-11-071-0/+5
|
* Disallow invalid target names (#13140)Stephen Kelly2013-11-071-0/+5
| | | | | Exclude Borland and NMake from the CMP0037 test. They do not accept the colon in a target name.
* Drop compatibility with CMake < 2.4Brad King2013-10-231-9/+3
| | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Add policy CMP0036 to disallow build_nameBrad King2013-10-221-0/+5
|
* Add policy CMP0035 to disallow variable_requiresBrad King2013-10-221-0/+5
|
* Add policy CMP0034 to disallow utility_sourceBrad King2013-10-221-0/+5
|
* Add policy CMP0033 to disallow export_library_dependenciesBrad King2013-10-221-0/+5
|
* Add policy CMP0032 to disallow output_required_filesBrad King2013-10-221-0/+5
|
* Add policy CMP0031 to disallow load_commandBrad King2013-10-221-0/+5
|
* Add policy CMP0030 to disallow use_mangled_mesaBrad King2013-10-221-0/+5
|
* Add policy CMP0029 to disallow subdir_dependsBrad King2013-10-221-0/+5
|
* Consider targets with double colons to be IMPORTED or ALIAS targets.Stephen Kelly2013-10-211-0/+5
| | | | | | | | Introduce a policy to control the behavior. The AliasTargets unit test already tests that using a double-semicolon in the name is not an error. Change the ExportImport test to use a namespace with a double-semicolon too.
* Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors.Stephen Kelly2013-10-181-0/+5
|
* Update CMP0024/CMP0025/CMP0026 release versionBrad King2013-10-171-3/+3
| | | | | | These policies were introduced after 2.8.12 in anticipation of 2.8.13. However, we've now decided the next release will be 3.0.0, so update the version of introduction accordingly.
* Drop builtin policy "full" documentationBrad King2013-10-171-426/+1
| | | | | | | | | | | | | The full policy documentation was moved to Help/policy/*.rst by commit f051814e (Convert builtin help to reStructuredText source files, 2013-10-15). We no longer need the builtin string literals. In commit 87cc62ca (Drop "full" documentation output types, 2013-09-13) we dropped code using the LongDescription field of policy definitions. We need to follow it up with a change similar to commit 399e9c46 (Drop builtin property documentation, 2013-09-16) to remove the policy documentation. Do that now. Keep the short description as it is used in policy error and warning messages.
* Drop "full" documentation output typesBrad King2013-10-151-46/+0
| | | | | | | | | | | | | | | | We will no longer support full documentation generation from executables and will instead generate documentation with other tools. Disable (with a warning left behind) the command-line options: --copyright --help-compatcommands --help-full --help-html --help-man Drop supporting code. Drop manual sections generation from executables. Remove internal documentation construction APIs. Drop unused sections See Also, Author, Copyright, Compat Commands, Custom Modules.
* Add reStructuredText (RST) documentation formatterBrad King2013-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | Temporarily add a RST formatter to convert builtin documentation to .rst source files. This will be removed shortly after we use it to convert documentation. Teach the RST formatter to: * Output preformatted blocks as reStructuredText "::" literal blocks. * Output option lists as bullet lists with option names enclosed in reStructuredText ``literal`` quoting. * Output individual documentation objects (commands, variables, etc.) in separate .rst files organized in directories by type. Replace references to cmVersion::GetCMakeVersion() in builtin documentation with the literal placeholder "|release|" that will be defined as a substitution later.
* cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-111-0/+22
| | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.
* Merge topic 'apple-clang-id'Brad King2013-10-091-0/+17
|\ | | | | | | | | | | | | 1763c31 Set policy CMP0025 to NEW while building CMake itself aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility ab65862 Clang: Add separate "AppleClang" compiler id
| * Add policy CMP0025 for Apple Clang compiler id compatibilityBrad King2013-10-081-0/+17
| | | | | | | | | | | | | | | | | | | | The parent commit introduced a separate "AppleClang" compiler id for Apple's Clang distribution. Add a policy in order to support projects that expect this compiler's id to be just "Clang". When the policy is OLD or not set, map AppleClang back to Clang. Continue to use the AppleClang id internally while enabling the language, but set the CMAKE_<LANG>_COMPILER_ID after project() or enable_language() to the compatible value for use by project code.
* | Merge topic 'export-policy'Brad King2013-10-081-0/+19
|\ \ | |/ | | | | | | 904ff9f export: Add policy CMP0024 to disallow include() of export files
| * export: Add policy CMP0024 to disallow include() of export filesStephen Kelly2013-10-071-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, export() is executed at configure-time. One problem with this is that certain exported properties like the link interface may not be complete at the point the export() is encountered leading to an incorrect or incomplete exported representation. Additionally, the generated IMPORTED_LOCATION property may even be incorrect if commands following the export() have an effect on it. Another problem is that it requires the C++ implementation of cmake to be capable of computing the exported information at configure time. This is a limitation on the cleanup and maintenance of the code. At some point in the future, this limitation will be dropped and more implementation will be moved from cmTarget to cmGeneratorTarget.
* | Fix some indentation problems in cmPolicies.Stephen Kelly2013-08-281-32/+32
|/
* Update version introducing CMP0021, CMP0022, and CMP0023Brad King2013-08-141-3/+3
| | | | These policies will be first released in 2.8.12.
* target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signatureStephen Kelly2013-07-241-0/+26
| | | | | | | Add a new signature to help populate INTERFACE_LINK_LIBRARIES and LINK_LIBRARIES cleanly in a single call. Add policy CMP0023 to control whether the keyword signatures can be mixed with uses of the plain signatures on the same target.
* TLL: Don't populate old link interface if CMP0022 is NEW.Stephen Kelly2013-07-081-1/+5
| | | | | | | | | | | | | Always populate the INTERFACE_LINK_LIBRARIES for interface entries. Don't populate the old interface properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? if CMP0022 is NEW. Because the INTERFACE_LINK_LIBRARIES property is now populated by the target_link_libraries when operating on a static library, make an equivalent change which populates the property with the same value when the old link_libraries() command is used. This silences the policy warning in that case.
* Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-081-0/+5
| | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
* Introduce the INTERFACE_LINK_LIBRARIES property.Stephen Kelly2013-07-081-0/+22
| | | | | | | | | | | | | | | | | | | | This property replaces the properties which match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled for IMPORTED targets, and for non-IMPORTED targets only with a policy. For static libraries, the INTERFACE_LINK_LIBRARIES property is also used as the source of transitive usage requirements content. Static libraries still require users to link to all entries in their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only certain interface libraries. Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally, we need to compare the evaluated result of it with the link implementation to determine whether to issue the policy warning for static libraries. For shared libraries, the policy warning is issued if the contents of the INTERFACE_LINK_LIBRARIES property differs from the contents of the relevant config-specific old LINK_INTERFACE_LIBRARIES property.
* Merge topic 'error-on-exported-missing-include-dir'Brad King2013-05-211-0/+14
|\ | | | | | | | | eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
| * Error on relative path in INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-211-0/+14
| | | | | | | | | | Add policy CMP0021 to preserve existing behavior in projects expecting it from earlier CMake versions.