CMP0018.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. CMP0018
  2. -------
  3. Ignore CMAKE_SHARED_LIBRARY_<Lang>_FLAGS variable.
  4. CMake 2.8.8 and lower compiled sources in SHARED and MODULE libraries
  5. using the value of the undocumented CMAKE_SHARED_LIBRARY_<Lang>_FLAGS
  6. platform variable. The variable contained platform-specific flags
  7. needed to compile objects for shared libraries. Typically it included
  8. a flag such as -fPIC for position independent code but also included
  9. other flags needed on certain platforms. CMake 2.8.9 and higher
  10. prefer instead to use the POSITION_INDEPENDENT_CODE target property to
  11. determine what targets should be position independent, and new
  12. undocumented platform variables to select flags while ignoring
  13. CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely.
  14. The default for either approach produces identical compilation flags,
  15. but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its
  16. original value this policy determines which approach to use.
  17. The OLD behavior for this policy is to ignore the
  18. POSITION_INDEPENDENT_CODE property for all targets and use the
  19. modified value of CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and
  20. MODULE libraries.
  21. The NEW behavior for this policy is to ignore
  22. CMAKE_SHARED_LIBRARY_<Lang>_FLAGS whether it is modified or not and
  23. honor the POSITION_INDEPENDENT_CODE target property.
  24. This policy was introduced in CMake version 2.8.9. CMake version
  25. |release| warns when the policy is not set and uses OLD behavior. Use
  26. the cmake_policy command to set it to OLD or NEW explicitly.
  27. .. include:: DEPRECATED.txt