CMP0049.rst 777 B

12345678910111213141516171819202122232425
  1. CMP0049
  2. -------
  3. Do not expand variables in target source entries.
  4. CMake 2.8.12 and lower performed an extra layer of variable expansion
  5. when evaluating source file names::
  6. set(a_source foo.c)
  7. add_executable(foo \${a_source})
  8. .. note: no cmake highlighting since this syntax is deprecated
  9. This was undocumented behavior.
  10. The ``OLD`` behavior for this policy is to expand such variables when processing
  11. the target sources. The ``NEW`` behavior for this policy is to issue an error
  12. if such variables need to be expanded.
  13. This policy was introduced in CMake version 3.0.
  14. CMake version |release| warns when the policy is not set and uses
  15. ``OLD`` behavior. Use the :command:`cmake_policy` command to set
  16. it to ``OLD`` or ``NEW`` explicitly.
  17. .. include:: DEPRECATED.txt