CMP0066.rst 1.3 KB

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