cmake-policies.7.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. .. cmake-manual-description: CMake Policies Reference
  2. cmake-policies(7)
  3. *****************
  4. .. only:: html
  5. .. contents::
  6. Introduction
  7. ============
  8. CMake policies introduce behavior changes while preserving compatibility
  9. for existing project releases. Policies are deprecation mechanisms, not
  10. feature toggles. Each policy documents a deprecated ``OLD`` behavior and
  11. a preferred ``NEW`` behavior. Projects must be updated over time to
  12. use the ``NEW`` behavior, but their existing releases will continue to
  13. work with the ``OLD`` behavior.
  14. Updating Projects
  15. -----------------
  16. When policies are newly introduced by a version of CMake, their ``OLD``
  17. behaviors are immediately deprecated by that version of CMake and later.
  18. Projects should be updated to use the ``NEW`` behaviors of the policies
  19. as soon as possible.
  20. Use the :command:`cmake_minimum_required` command to record the latest
  21. version of CMake for which a project has been updated.
  22. For example:
  23. ..
  24. Sync this cmake_minimum_required example with ``Help/dev/maint.rst``.
  25. .. code-block:: cmake
  26. cmake_minimum_required(VERSION 3.10...4.1)
  27. This uses the ``<min>...<max>`` syntax to enable the ``NEW`` behaviors
  28. of policies introduced in CMake 4.1 and earlier while only requiring a
  29. minimum version of CMake 3.10. The project is expected to work with
  30. both the ``OLD`` and ``NEW`` behaviors of policies introduced between
  31. those versions.
  32. Transition Schedule
  33. -------------------
  34. To help projects port to the ``NEW`` behaviors of policies on their own
  35. schedule, CMake offers a transition period:
  36. * If a policy is not set by a project, CMake uses its ``OLD`` behavior,
  37. but may warn that the policy has not been set.
  38. * Users running CMake may silence the warning without modifying a
  39. project by setting the :variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>`
  40. variable as a cache entry on the :manual:`cmake(1)` command line:
  41. .. code-block:: shell
  42. cmake -DCMAKE_POLICY_DEFAULT_CMP0990=OLD ...
  43. * Projects may silence the warning by using the :command:`cmake_policy`
  44. command to explicitly set the policy to ``OLD`` or ``NEW`` behavior:
  45. .. code-block:: cmake
  46. if(POLICY CMP0990)
  47. cmake_policy(SET CMP0990 NEW)
  48. endif()
  49. .. note::
  50. A policy should almost never be set to ``OLD``, except to silence
  51. warnings in an otherwise frozen or stable codebase, or temporarily
  52. as part of a larger migration path.
  53. * If a policy is set to ``OLD`` by a project, CMake versions released
  54. at least |POLICY_OLD_DELAY_WARNING| after the version that introduced
  55. a policy may issue a warning that the policy's ``OLD`` behavior will
  56. be removed from a future version of CMake.
  57. * If a policy is not set to ``NEW`` by a project, CMake versions released
  58. at least |POLICY_OLD_DELAY_ERROR| after the version that introduced a
  59. policy, and whose major version number is higher, may issue an error
  60. that the policy's ``OLD`` behavior has been removed.
  61. .. |POLICY_OLD_DELAY_WARNING| replace:: 2 years
  62. .. |POLICY_OLD_DELAY_ERROR| replace:: 6 years
  63. Supported Policies
  64. ==================
  65. The following policies are supported.
  66. Policies Introduced by CMake 4.1
  67. --------------------------------
  68. .. toctree::
  69. :maxdepth: 1
  70. CMP0197: MSVC link -machine: flag is not in CMAKE_*_LINKER_FLAGS. </policy/CMP0197>
  71. CMP0196: The CMakeDetermineVSServicePack module is removed. </policy/CMP0196>
  72. CMP0195: Swift modules in build trees use the Swift module directory structure. </policy/CMP0195>
  73. CMP0194: MSVC is not an assembler for language ASM. </policy/CMP0194>
  74. CMP0193: GNUInstallDirs caches CMAKE_INSTALL_* with leading 'usr/' for install prefix '/'. </policy/CMP0193>
  75. CMP0192: GNUInstallDirs uses absolute SYSCONFDIR, LOCALSTATEDIR, and RUNSTATEDIR in special prefixes. </policy/CMP0192>
  76. CMP0191: The FindCABLE module is removed. </policy/CMP0191>
  77. CMP0190: FindPython enforce consistency in cross-compiling mode. </policy/CMP0190>
  78. CMP0189: TARGET_PROPERTY evaluates LINK_LIBRARIES properties transitively. </policy/CMP0189>
  79. CMP0188: The FindGCCXML module is removed. </policy/CMP0188>
  80. CMP0187: Include source file without an extension after the same name with an extension. </policy/CMP0187>
  81. CMP0186: Regular expressions match ^ at most once in repeated searches. </policy/CMP0186>
  82. Policies Introduced by CMake 4.0
  83. --------------------------------
  84. .. toctree::
  85. :maxdepth: 1
  86. CMP0185: FindRuby no longer provides upper-case RUBY_* variables. </policy/CMP0185>
  87. CMP0184: MSVC runtime checks flags are selected by an abstraction. </policy/CMP0184>
  88. CMP0183: add_feature_info() supports full Condition Syntax. </policy/CMP0183>
  89. CMP0182: Create shared library archives by default on AIX. </policy/CMP0182>
  90. CMP0181: Link command-line fragment variables are parsed and re-quoted. </policy/CMP0181>
  91. Policies Introduced by CMake 3.31
  92. ---------------------------------
  93. .. toctree::
  94. :maxdepth: 1
  95. CMP0180: project() always sets <PROJECT-NAME>_* as normal variables. </policy/CMP0180>
  96. CMP0179: De-duplication of static libraries on link lines keeps first occurrence. </policy/CMP0179>
  97. CMP0178: Test command lines preserve empty arguments. </policy/CMP0178>
  98. CMP0177: install() DESTINATION paths are normalized. </policy/CMP0177>
  99. CMP0176: execute_process() ENCODING is UTF-8 by default. </policy/CMP0176>
  100. CMP0175: add_custom_command() rejects invalid arguments. </policy/CMP0175>
  101. CMP0174: cmake_parse_arguments(PARSE_ARGV) defines a variable for an empty string after a single-value keyword. </policy/CMP0174>
  102. CMP0173: The CMakeFindFrameworks module is removed. </policy/CMP0173>
  103. CMP0172: The CPack module enables per-machine installation by default in the CPack WIX Generator. </policy/CMP0172>
  104. CMP0171: 'codegen' is a reserved target name. </policy/CMP0171>
  105. Policies Introduced by CMake 3.30
  106. ---------------------------------
  107. .. toctree::
  108. :maxdepth: 1
  109. CMP0170: FETCHCONTENT_FULLY_DISCONNECTED requirements are enforced. </policy/CMP0170>
  110. CMP0169: FetchContent_Populate(depName) single-argument signature is deprecated. </policy/CMP0169>
  111. CMP0168: FetchContent implements steps directly instead of through a sub-build. </policy/CMP0168>
  112. CMP0167: The FindBoost module is removed. </policy/CMP0167>
  113. CMP0166: TARGET_PROPERTY evaluates link properties transitively over private dependencies of static libraries. </policy/CMP0166>
  114. CMP0165: enable_language() must not be called before project(). </policy/CMP0165>
  115. CMP0164: add_library() rejects SHARED libraries when not supported by the platform. </policy/CMP0164>
  116. CMP0163: The GENERATED source file property is now visible in all directories. </policy/CMP0163>
  117. CMP0162: Visual Studio generators add UseDebugLibraries indicators by default. </policy/CMP0162>
  118. Policies Introduced by CMake 3.29
  119. ---------------------------------
  120. .. toctree::
  121. :maxdepth: 1
  122. CMP0161: CPACK_PRODUCTBUILD_DOMAINS defaults to true. </policy/CMP0161>
  123. CMP0160: More read-only target properties now error when trying to set them. </policy/CMP0160>
  124. CMP0159: file(STRINGS) with REGEX updates CMAKE_MATCH_<n>. </policy/CMP0159>
  125. CMP0158: add_test() honors CMAKE_CROSSCOMPILING_EMULATOR only when cross-compiling. </policy/CMP0158>
  126. CMP0157: Swift compilation mode is selected by an abstraction. </policy/CMP0157>
  127. CMP0156: De-duplicate libraries on link lines based on linker capabilities. </policy/CMP0156>
  128. Policies Introduced by CMake 3.28
  129. ---------------------------------
  130. .. toctree::
  131. :maxdepth: 1
  132. CMP0155: C++ sources in targets with at least C++20 are scanned for imports when supported. </policy/CMP0155>
  133. CMP0154: Generated files are private by default in targets using file sets. </policy/CMP0154>
  134. CMP0153: The exec_program command should not be called. </policy/CMP0153>
  135. CMP0152: file(REAL_PATH) resolves symlinks before collapsing ../ components. </policy/CMP0152>
  136. Policies Introduced by CMake 3.27
  137. ---------------------------------
  138. .. toctree::
  139. :maxdepth: 1
  140. CMP0151: AUTOMOC include directory is a system include directory by default. </policy/CMP0151>
  141. CMP0150: ExternalProject_Add and FetchContent_Declare treat relative git repository paths as being relative to parent project's remote. </policy/CMP0150>
  142. CMP0149: Visual Studio generators select latest Windows SDK by default. </policy/CMP0149>
  143. CMP0148: The FindPythonInterp and FindPythonLibs modules are removed. </policy/CMP0148>
  144. CMP0147: Visual Studio generators build custom commands in parallel. </policy/CMP0147>
  145. CMP0146: The FindCUDA module is removed. </policy/CMP0146>
  146. CMP0145: The Dart and FindDart modules are removed. </policy/CMP0145>
  147. CMP0144: find_package uses upper-case PACKAGENAME_ROOT variables. </policy/CMP0144>
  148. Policies Introduced by CMake 3.26
  149. ---------------------------------
  150. .. toctree::
  151. :maxdepth: 1
  152. CMP0143: USE_FOLDERS global property is treated as ON by default. </policy/CMP0143>
  153. Policies Introduced by CMake 3.25
  154. ---------------------------------
  155. .. toctree::
  156. :maxdepth: 1
  157. CMP0142: The Xcode generator does not append per-config suffixes to library search paths. </policy/CMP0142>
  158. CMP0141: MSVC debug information format flags are selected by an abstraction. </policy/CMP0141>
  159. CMP0140: The return() command checks its arguments. </policy/CMP0140>
  160. Policies Introduced by CMake 3.24
  161. ---------------------------------
  162. .. toctree::
  163. :maxdepth: 1
  164. CMP0139: The if() command supports path comparisons using PATH_EQUAL operator. </policy/CMP0139>
  165. CMP0138: CheckIPOSupported uses flags from calling project. </policy/CMP0138>
  166. CMP0137: try_compile() passes platform variables in project mode. </policy/CMP0137>
  167. CMP0136: Watcom runtime library flags are selected by an abstraction. </policy/CMP0136>
  168. CMP0135: ExternalProject and FetchContent ignore timestamps in archives by default for the URL download method. </policy/CMP0135>
  169. CMP0134: Fallback to "HOST" Windows registry view when "TARGET" view is not usable. </policy/CMP0134>
  170. CMP0133: The CPack module disables SLA by default in the CPack DragNDrop Generator. </policy/CMP0133>
  171. CMP0132: Do not set compiler environment variables on first run. </policy/CMP0132>
  172. CMP0131: LINK_LIBRARIES supports the LINK_ONLY generator expression. </policy/CMP0131>
  173. CMP0130: while() diagnoses condition evaluation errors. </policy/CMP0130>
  174. Policies Introduced by CMake 3.23
  175. ---------------------------------
  176. .. toctree::
  177. :maxdepth: 1
  178. CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU. </policy/CMP0129>
  179. Policies Introduced by CMake 3.22
  180. ---------------------------------
  181. .. toctree::
  182. :maxdepth: 1
  183. CMP0128: Selection of language standard and extension flags improved. </policy/CMP0128>
  184. CMP0127: cmake_dependent_option() supports full Condition Syntax. </policy/CMP0127>
  185. Policies Introduced by CMake 3.21
  186. ---------------------------------
  187. .. toctree::
  188. :maxdepth: 1
  189. CMP0126: set(CACHE) does not remove a normal variable of the same name. </policy/CMP0126>
  190. CMP0125: find_(path|file|library|program) have consistent behavior for cache variables. </policy/CMP0125>
  191. CMP0124: foreach() loop variables are only available in the loop scope. </policy/CMP0124>
  192. CMP0123: ARMClang cpu/arch compile and link flags must be set explicitly. </policy/CMP0123>
  193. CMP0122: UseSWIG use standard library name conventions for csharp language. </policy/CMP0122>
  194. CMP0121: The list command detects invalid indices. </policy/CMP0121>
  195. Policies Introduced by CMake 3.20
  196. ---------------------------------
  197. .. toctree::
  198. :maxdepth: 1
  199. CMP0120: The WriteCompilerDetectionHeader module is removed. </policy/CMP0120>
  200. CMP0119: LANGUAGE source file property explicitly compiles as language. </policy/CMP0119>
  201. CMP0118: GENERATED sources may be used across directories without manual marking. </policy/CMP0118>
  202. CMP0117: MSVC RTTI flag /GR is not added to CMAKE_CXX_FLAGS by default. </policy/CMP0117>
  203. CMP0116: Ninja generators transform DEPFILEs from add_custom_command(). </policy/CMP0116>
  204. CMP0115: Source file extensions must be explicit. </policy/CMP0115>
  205. Policies Introduced by CMake 3.19
  206. ---------------------------------
  207. .. toctree::
  208. :maxdepth: 1
  209. CMP0114: ExternalProject step targets fully adopt their steps. </policy/CMP0114>
  210. CMP0113: Makefile generators do not repeat custom commands from target dependencies. </policy/CMP0113>
  211. CMP0112: Target file component generator expressions do not add target dependencies. </policy/CMP0112>
  212. CMP0111: An imported target missing its location property fails during generation. </policy/CMP0111>
  213. CMP0110: add_test() supports arbitrary characters in test names. </policy/CMP0110>
  214. CMP0109: find_program() requires permission to execute but not to read. </policy/CMP0109>
  215. Policies Introduced by CMake 3.18
  216. ---------------------------------
  217. .. toctree::
  218. :maxdepth: 1
  219. CMP0108: A target cannot link to itself through an alias. </policy/CMP0108>
  220. CMP0107: An ALIAS target cannot overwrite another target. </policy/CMP0107>
  221. CMP0106: The Documentation module is removed. </policy/CMP0106>
  222. CMP0105: Device link step uses the link options. </policy/CMP0105>
  223. CMP0104: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. </policy/CMP0104>
  224. CMP0103: Multiple export() with same FILE without APPEND is not allowed. </policy/CMP0103>
  225. Policies Introduced by CMake 3.17
  226. ---------------------------------
  227. .. toctree::
  228. :maxdepth: 1
  229. CMP0102: mark_as_advanced() does nothing if a cache entry does not exist. </policy/CMP0102>
  230. CMP0101: target_compile_options honors BEFORE keyword in all scopes. </policy/CMP0101>
  231. CMP0100: Let AUTOMOC and AUTOUIC process .hh header files. </policy/CMP0100>
  232. CMP0099: Link properties are transitive over private dependencies of static libraries. </policy/CMP0099>
  233. CMP0098: FindFLEX runs flex in CMAKE_CURRENT_BINARY_DIR when executing. </policy/CMP0098>
  234. Policies Introduced by CMake 3.16
  235. ---------------------------------
  236. .. toctree::
  237. :maxdepth: 1
  238. CMP0097: ExternalProject_Add with GIT_SUBMODULES "" initializes no submodules. </policy/CMP0097>
  239. CMP0096: project() preserves leading zeros in version components. </policy/CMP0096>
  240. CMP0095: RPATH entries are properly escaped in the intermediary CMake install script. </policy/CMP0095>
  241. Policies Introduced by CMake 3.15
  242. ---------------------------------
  243. .. toctree::
  244. :maxdepth: 1
  245. CMP0094: FindPython3, FindPython2 and FindPython use LOCATION for lookup strategy. </policy/CMP0094>
  246. CMP0093: FindBoost reports Boost_VERSION in x.y.z format. </policy/CMP0093>
  247. CMP0092: MSVC warning flags are not in CMAKE_{C,CXX}_FLAGS by default. </policy/CMP0092>
  248. CMP0091: MSVC runtime library flags are selected by an abstraction. </policy/CMP0091>
  249. CMP0090: export(PACKAGE) does not populate package registry by default. </policy/CMP0090>
  250. CMP0089: Compiler id for IBM Clang-based XL compilers is now XLClang. </policy/CMP0089>
  251. Policies Introduced by CMake 3.14
  252. ---------------------------------
  253. .. toctree::
  254. :maxdepth: 1
  255. CMP0088: FindBISON runs bison in CMAKE_CURRENT_BINARY_DIR when executing. </policy/CMP0088>
  256. CMP0087: install(SCRIPT | CODE) supports generator expressions. </policy/CMP0087>
  257. CMP0086: UseSWIG honors SWIG_MODULE_NAME via -module flag. </policy/CMP0086>
  258. CMP0085: IN_LIST generator expression handles empty list items. </policy/CMP0085>
  259. CMP0084: The FindQt module does not exist for find_package(). </policy/CMP0084>
  260. CMP0083: Add PIE options when linking executable. </policy/CMP0083>
  261. CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082>
  262. Policies Introduced by CMake 3.13
  263. ---------------------------------
  264. .. toctree::
  265. :maxdepth: 1
  266. CMP0081: Relative paths not allowed in LINK_DIRECTORIES target property. </policy/CMP0081>
  267. CMP0080: BundleUtilities cannot be included at configure time. </policy/CMP0080>
  268. CMP0079: target_link_libraries allows use with targets in other directories. </policy/CMP0079>
  269. CMP0078: UseSWIG generates standard target names. </policy/CMP0078>
  270. CMP0077: option() honors normal variables. </policy/CMP0077>
  271. CMP0076: target_sources() command converts relative paths to absolute. </policy/CMP0076>
  272. Policies Introduced by CMake 3.12
  273. ---------------------------------
  274. .. toctree::
  275. :maxdepth: 1
  276. CMP0075: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. </policy/CMP0075>
  277. CMP0074: find_package uses PackageName_ROOT variables. </policy/CMP0074>
  278. CMP0073: Do not produce legacy _LIB_DEPENDS cache entries. </policy/CMP0073>
  279. Policies Introduced by CMake 3.11
  280. ---------------------------------
  281. .. toctree::
  282. :maxdepth: 1
  283. CMP0072: FindOpenGL prefers GLVND by default when available. </policy/CMP0072>
  284. Policies Introduced by CMake 3.10
  285. ---------------------------------
  286. .. toctree::
  287. :maxdepth: 1
  288. CMP0071: Let AUTOMOC and AUTOUIC process GENERATED files. </policy/CMP0071>
  289. CMP0070: Define file(GENERATE) behavior for relative paths. </policy/CMP0070>
  290. Policies Introduced by CMake 3.9
  291. --------------------------------
  292. .. toctree::
  293. :maxdepth: 1
  294. CMP0069: INTERPROCEDURAL_OPTIMIZATION is enforced when enabled. </policy/CMP0069>
  295. CMP0068: RPATH settings on macOS do not affect install_name. </policy/CMP0068>
  296. Policies Introduced by CMake 3.8
  297. --------------------------------
  298. .. toctree::
  299. :maxdepth: 1
  300. CMP0067: Honor language standard in try_compile() source-file signature. </policy/CMP0067>
  301. Policies Introduced by CMake 3.7
  302. --------------------------------
  303. .. toctree::
  304. :maxdepth: 1
  305. CMP0066: Honor per-config flags in try_compile() source-file signature. </policy/CMP0066>
  306. Unsupported Policies
  307. ====================
  308. The following policies are no longer supported.
  309. Projects' calls to :command:`cmake_minimum_required(VERSION)` or
  310. :command:`cmake_policy(VERSION)` must set them to ``NEW``.
  311. Their ``OLD`` behaviors have been removed from CMake.
  312. .. _`Policies Introduced by CMake 3.4`:
  313. Policies Introduced by CMake 3.4, Removed by CMake 4.0
  314. ------------------------------------------------------
  315. .. toctree::
  316. :maxdepth: 1
  317. CMP0065: Do not add flags to export symbols from executables without the ENABLE_EXPORTS target property. </policy/CMP0065>
  318. CMP0064: Support new TEST if() operator. </policy/CMP0064>
  319. .. _`Policies Introduced by CMake 3.3`:
  320. Policies Introduced by CMake 3.3, Removed by CMake 4.0
  321. ------------------------------------------------------
  322. .. toctree::
  323. :maxdepth: 1
  324. CMP0063: Honor visibility properties for all target types. </policy/CMP0063>
  325. CMP0062: Disallow install() of export() result. </policy/CMP0062>
  326. CMP0061: CTest does not by default tell make to ignore errors (-i). </policy/CMP0061>
  327. CMP0060: Link libraries by full path even in implicit directories. </policy/CMP0060>
  328. CMP0059: Do not treat DEFINITIONS as a built-in directory property. </policy/CMP0059>
  329. CMP0058: Ninja requires custom command byproducts to be explicit. </policy/CMP0058>
  330. CMP0057: Support new IN_LIST if() operator. </policy/CMP0057>
  331. .. _`Policies Introduced by CMake 3.2`:
  332. Policies Introduced by CMake 3.2, Removed by CMake 4.0
  333. ------------------------------------------------------
  334. .. toctree::
  335. :maxdepth: 1
  336. CMP0056: Honor link flags in try_compile() source-file signature. </policy/CMP0056>
  337. CMP0055: Strict checking for break() command. </policy/CMP0055>
  338. .. _`Policies Introduced by CMake 3.1`:
  339. Policies Introduced by CMake 3.1, Removed by CMake 4.0
  340. ------------------------------------------------------
  341. .. toctree::
  342. :maxdepth: 1
  343. CMP0054: Only interpret if() arguments as variables or keywords when unquoted. </policy/CMP0054>
  344. CMP0053: Simplify variable reference and escape sequence evaluation. </policy/CMP0053>
  345. CMP0052: Reject source and build dirs in installed INTERFACE_INCLUDE_DIRECTORIES. </policy/CMP0052>
  346. CMP0051: List TARGET_OBJECTS in SOURCES target property. </policy/CMP0051>
  347. .. _`Policies Introduced by CMake 3.0`:
  348. Policies Introduced by CMake 3.0, Removed by CMake 4.0
  349. ------------------------------------------------------
  350. .. toctree::
  351. :maxdepth: 1
  352. CMP0050: Disallow add_custom_command SOURCE signatures. </policy/CMP0050>
  353. CMP0049: Do not expand variables in target source entries. </policy/CMP0049>
  354. CMP0048: project() command manages VERSION variables. </policy/CMP0048>
  355. CMP0047: Use QCC compiler id for the qcc drivers on QNX. </policy/CMP0047>
  356. CMP0046: Error on non-existent dependency in add_dependencies. </policy/CMP0046>
  357. CMP0045: Error on non-existent target in get_target_property. </policy/CMP0045>
  358. CMP0044: Case sensitive Lang_COMPILER_ID generator expressions. </policy/CMP0044>
  359. CMP0043: Ignore COMPILE_DEFINITIONS_Config properties. </policy/CMP0043>
  360. CMP0042: MACOSX_RPATH is enabled by default. </policy/CMP0042>
  361. CMP0041: Error on relative include with generator expression. </policy/CMP0041>
  362. CMP0040: The target in the TARGET signature of add_custom_command() must exist. </policy/CMP0040>
  363. CMP0039: Utility targets may not have link dependencies. </policy/CMP0039>
  364. CMP0038: Targets may not link directly to themselves. </policy/CMP0038>
  365. CMP0037: Target names should not be reserved and should match a validity pattern. </policy/CMP0037>
  366. CMP0036: The build_name command should not be called. </policy/CMP0036>
  367. CMP0035: The variable_requires command should not be called. </policy/CMP0035>
  368. CMP0034: The utility_source command should not be called. </policy/CMP0034>
  369. CMP0033: The export_library_dependencies command should not be called. </policy/CMP0033>
  370. CMP0032: The output_required_files command should not be called. </policy/CMP0032>
  371. CMP0031: The load_command command should not be called. </policy/CMP0031>
  372. CMP0030: The use_mangled_mesa command should not be called. </policy/CMP0030>
  373. CMP0029: The subdir_depends command should not be called. </policy/CMP0029>
  374. CMP0028: Double colon in target name means ALIAS or IMPORTED target. </policy/CMP0028>
  375. CMP0027: Conditionally linked imported targets with missing include directories. </policy/CMP0027>
  376. CMP0026: Disallow use of the LOCATION target property. </policy/CMP0026>
  377. CMP0025: Compiler id for Apple Clang is now AppleClang. </policy/CMP0025>
  378. CMP0024: Disallow include export result. </policy/CMP0024>
  379. .. _`Policies Introduced by CMake 2.8`:
  380. Policies Introduced by CMake 2.8, Removed by CMake 4.0
  381. ------------------------------------------------------
  382. .. toctree::
  383. :maxdepth: 1
  384. CMP0023: Plain and keyword target_link_libraries signatures cannot be mixed. </policy/CMP0023>
  385. CMP0022: INTERFACE_LINK_LIBRARIES defines the link interface. </policy/CMP0022>
  386. CMP0021: Fatal error on relative paths in INCLUDE_DIRECTORIES target property. </policy/CMP0021>
  387. CMP0020: Automatically link Qt executables to qtmain target on Windows. </policy/CMP0020>
  388. CMP0019: Do not re-expand variables in include and link information. </policy/CMP0019>
  389. CMP0018: Ignore CMAKE_SHARED_LIBRARY_Lang_FLAGS variable. </policy/CMP0018>
  390. CMP0017: Prefer files from the CMake module directory when including from there. </policy/CMP0017>
  391. CMP0016: target_link_libraries() reports error if its only argument is not a target. </policy/CMP0016>
  392. CMP0015: link_directories() treats paths relative to the source dir. </policy/CMP0015>
  393. CMP0014: Input directories must have CMakeLists.txt. </policy/CMP0014>
  394. CMP0013: Duplicate binary directories are not allowed. </policy/CMP0013>
  395. CMP0012: if() recognizes numbers and boolean constants. </policy/CMP0012>
  396. .. _`Policies Introduced by CMake 2.6`:
  397. Policies Introduced by CMake 2.6, Removed by CMake 4.0
  398. ------------------------------------------------------
  399. .. toctree::
  400. :maxdepth: 1
  401. CMP0011: Included scripts do automatic cmake_policy PUSH and POP. </policy/CMP0011>
  402. CMP0010: Bad variable reference syntax is an error. </policy/CMP0010>
  403. CMP0009: FILE GLOB_RECURSE calls should not follow symlinks by default. </policy/CMP0009>
  404. CMP0008: Libraries linked by full-path must have a valid library file name. </policy/CMP0008>
  405. CMP0007: list command no longer ignores empty elements. </policy/CMP0007>
  406. CMP0006: Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION. </policy/CMP0006>
  407. CMP0005: Preprocessor definition values are now escaped automatically. </policy/CMP0005>
  408. CMP0004: Libraries linked may not have leading or trailing whitespace. </policy/CMP0004>
  409. CMP0003: Libraries linked via full path no longer produce linker search paths. </policy/CMP0003>
  410. CMP0002: Logical target names must be globally unique. </policy/CMP0002>
  411. CMP0001: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used. </policy/CMP0001>
  412. CMP0000: A minimum required CMake version must be specified. </policy/CMP0000>