1. 15 Nov, 2019 1 commit
  2. 24 Jul, 2019 1 commit
  3. 16 Jul, 2019 1 commit
  4. 25 Jun, 2019 1 commit
  5. 13 Jun, 2019 1 commit
  6. 21 May, 2019 1 commit
  7. 13 May, 2019 1 commit
  8. 19 Apr, 2019 1 commit
    • Brad King's avatar
      MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by default · 1baf122c
      Brad King authored
      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
      1baf122c
  9. 17 Apr, 2019 1 commit
    • Brad King's avatar
      MSVC: Add abstraction for runtime library selection · fb3370b6
      Brad King authored
      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
      fb3370b6
  10. 15 Mar, 2019 1 commit
    • Robert Maynard's avatar
      export: Disable PACKAGE mode user package registry by default · 9bede5c4
      Robert Maynard authored
      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.
      9bede5c4
  11. 25 Feb, 2019 1 commit
    • Brad King's avatar
      XLClang: Add policy CMP0089 to present as XL for compatibility · 5c413863
      Brad King authored
      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.
      5c413863
  12. 10 Jan, 2019 1 commit
  13. 22 Dec, 2018 1 commit
  14. 07 Dec, 2018 1 commit
  15. 19 Nov, 2018 1 commit
    • Kyle Edwards's avatar
      Genex: Add policy to handle empty list items in $<IN_LIST:...> · b5f8113c
      Kyle Edwards authored
      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
      b5f8113c
  16. 14 Nov, 2018 1 commit
    • Kyle Edwards's avatar
      find_package(): Add policy to remove the FindQt module · 0f5c1b40
      Kyle Edwards authored
      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.
      0f5c1b40
  17. 11 Nov, 2018 1 commit
  18. 10 Oct, 2018 1 commit
    • Kyle Edwards's avatar
      add_subdirectory: Run subdirectory install rules in correct order · fc8955e8
      Kyle Edwards authored
      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.
      fc8955e8
  19. 25 Sep, 2018 1 commit
  20. 19 Sep, 2018 1 commit
  21. 12 Sep, 2018 1 commit
    • Brad King's avatar
      target_link_libraries: Allow use with targets in other directories · a1ad0a69
      Brad King authored
      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
      a1ad0a69
  22. 25 Jul, 2018 1 commit
  23. 09 Jul, 2018 1 commit
  24. 18 Jun, 2018 1 commit
  25. 18 Apr, 2018 1 commit
    • Brad King's avatar
      CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES · a61ae3fb
      Brad King authored
      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
      a61ae3fb
  26. 16 Mar, 2018 1 commit
    • Brad King's avatar
      find_package: Use PackageName_ROOT variables as search prefixes · eb35d888
      Brad King authored
      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
      eb35d888
  27. 07 Mar, 2018 1 commit
  28. 17 Nov, 2017 1 commit
  29. 18 Jul, 2017 1 commit
    • Sebastian Holtermann's avatar
      Autogen: Process GENERATED files. Add CMP0071. · dca5df16
      Sebastian Holtermann authored
      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
      dca5df16
  30. 09 Jun, 2017 1 commit
    • Brad King's avatar
      file(GENERATE): Add policy CMP0070 to define relative path behavior · 82be694c
      Brad King authored
      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
      82be694c
  31. 30 Mar, 2017 1 commit
    • Ruslan Baratov's avatar
      Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION · 1588a577
      Ruslan Baratov authored
      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.
      1588a577
  32. 14 Feb, 2017 1 commit
  33. 06 Dec, 2016 1 commit
    • Brad King's avatar
      try_compile: Add policy CMP0067 to honor language standards · f72ba42b
      Brad King authored
      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
      f72ba42b
  34. 29 Jun, 2016 1 commit
    • Brad King's avatar
      try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG> · d582c23a
      Brad King authored
      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.
      d582c23a
  35. 02 May, 2016 2 commits
  36. 21 Sep, 2015 1 commit
  37. 03 Aug, 2015 1 commit
    • Matt McCormick's avatar
      if: Add "TEST <test>" condition · 14e49ed1
      Matt McCormick authored
      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.
      14e49ed1
  38. 09 Jun, 2015 1 commit
  39. 26 May, 2015 1 commit
    • Brad King's avatar
      Honor visibility properties for all target types (#15556) · 700f1c3b
      Brad King authored
      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.
      700f1c3b