CMP0066.rst 1.3 KB

123456789101112131415161718192021222324252627
  1. CMP0066
  2. -------
  3. Honor per-config flags in :command:`try_compile` source-file signature.
  4. The source file signature of the :command:`try_compile` command uses the value
  5. of the :variable:`CMAKE_<LANG>_FLAGS` variable in the test project so that the
  6. test compilation works as it would in the main project. However, CMake 3.6 and
  7. below do not also honor config-specific compiler flags such as those in the
  8. :variable:`CMAKE_<LANG>_FLAGS_DEBUG` variable. CMake 3.7 and above prefer to
  9. honor config-specific compiler flags too. This policy provides compatibility
  10. for projects that do not expect config-specific compiler flags to be used.
  11. The ``OLD`` behavior of this policy is to ignore config-specific flag
  12. variables like :variable:`CMAKE_<LANG>_FLAGS_DEBUG` and only use CMake's
  13. built-in defaults for the current compiler and platform.
  14. The ``NEW`` behavior of this policy is to honor config-specific flag
  15. variabldes like :variable:`CMAKE_<LANG>_FLAGS_DEBUG`.
  16. This policy was introduced in CMake version 3.7. Unlike most policies,
  17. CMake version |release| does *not* warn by default when this policy
  18. is not set and simply uses OLD behavior. See documentation of the
  19. :variable:`CMAKE_POLICY_WARNING_CMP0066 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  20. variable to control the warning.
  21. .. include:: DEPRECATED.txt