1. 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.
  2. 02 May, 2016 1 commit
  3. 28 Jan, 2016 1 commit
  4. 21 Sep, 2015 1 commit
  5. 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.
  6. 09 Jun, 2015 1 commit
  7. 26 May, 2015 1 commit
    • Brad King's avatar
      Honor visibility properties for all target types (#15556) · 700f1c3b
      Brad King authored
      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
  8. 14 May, 2015 1 commit
  9. 12 May, 2015 1 commit
  10. 30 Apr, 2015 2 commits
  11. 29 Apr, 2015 1 commit
  12. 28 Apr, 2015 1 commit
  13. 09 Apr, 2015 1 commit
    • Brad King's avatar
      Link libraries by full path even in implicit directories · 882f48e5
      Brad King authored
      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.
  14. 02 Apr, 2015 1 commit
  15. 20 Mar, 2015 1 commit
    • Brad King's avatar
      Ninja: Add policy to require explicit custom command byproducts · bd9c7f9b
      Brad King authored
      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.
  16. 09 Mar, 2015 1 commit
  17. 12 Dec, 2014 1 commit
  18. 03 Dec, 2014 1 commit
    • Brad King's avatar
      try_compile: Pass linker flags into test project (#14066) · 88eb5824
      Brad King authored
      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.
  19. 01 Dec, 2014 1 commit
  20. 25 Nov, 2014 1 commit
  21. 11 Sep, 2014 1 commit
  22. 13 Aug, 2014 1 commit
  23. 30 May, 2014 1 commit
  24. 08 May, 2014 1 commit
  25. 17 Apr, 2014 1 commit
  26. 14 Apr, 2014 1 commit
  27. 09 Apr, 2014 1 commit
    • Stephen Kelly's avatar
      Export: Disallow exported interface includes in src/build tree (#14592). · 783bce29
      Stephen Kelly authored
      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.
  28. 02 Apr, 2014 3 commits
    • Stephen Kelly's avatar
      cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. · 5702e106
      Stephen Kelly authored
      Add policy CMP0051 to control this behavior.
    • Brad King's avatar
      Do not warn by default when policy CMP0025 or CMP0047 is not set · a41c0a9d
      Brad King authored
      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.
    • Brad King's avatar
      Help: Revise and format policy CMP0025 and CMP0047 docs · d339653e
      Brad King authored
      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.
  29. 17 Mar, 2014 1 commit
  30. 03 Mar, 2014 1 commit
  31. 12 Feb, 2014 2 commits
  32. 10 Feb, 2014 1 commit
  33. 07 Feb, 2014 1 commit
  34. 29 Jan, 2014 1 commit
    • Brad King's avatar
      project: Manage VERSION variables · 7e142c5a
      Brad King authored
      Teach the project() command to set variables
      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: Alexander Neundorf's avatarAlex Neundorf <neundorf@kde.org>
  35. 22 Jan, 2014 1 commit
    • Stephen Kelly's avatar
      QNX: Introduce QCC compiler id for that QNX platform compiler. · e00db59d
      Stephen Kelly authored
      Introduce policy CMP0047 to control resetting the id for
      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
  36. 12 Jan, 2014 1 commit