1CMAKE-POLICIES(7)                    CMake                   CMAKE-POLICIES(7)
2
3
4

NAME

6       cmake-policies - CMake Policies Reference
7

INTRODUCTION

9       Policies  in  CMake  are  used to preserve backward compatible behavior
10       across multiple releases.  When a new policy is introduced, newer CMake
11       versions will begin to warn about the backward compatible behavior.  It
12       is possible to disable the warning by explicitly requesting the OLD, or
13       backward  compatible  behavior using the cmake_policy() command.  It is
14       also possible to request NEW, or non-backward compatible behavior for a
15       policy,  also  avoiding  the  warning.   Each policy can also be set to
16       either NEW or OLD behavior explicitly on  the  command  line  with  the
17       CMAKE_POLICY_DEFAULT_CMP<NNNN> variable.
18
19       A  policy is a deprecation mechanism and not a reliable feature toggle.
20       A policy should almost never be set to OLD, except to silence  warnings
21       in  an otherwise frozen or stable codebase, or temporarily as part of a
22       larger migration path. The OLD behavior of each policy  is  undesirable
23       and will be replaced with an error condition in a future release.
24
25       The  cmake_minimum_required() command does more than report an error if
26       a too-old version of CMake is used to build a project.   It  also  sets
27       all  policies introduced in that CMake version or earlier to NEW behav‐
28       ior.  To manage policies without increasing the minimum required  CMake
29       version, the if(POLICY) command may be used:
30
31          if(POLICY CMP0990)
32            cmake_policy(SET CMP0990 NEW)
33          endif()
34
35       This has the effect of using the NEW behavior with newer CMake releases
36       which users may be using and not issuing a compatibility warning.
37
38       The setting of a policy is confined in some cases to not  propagate  to
39       the parent scope.  For example, if the files read by the include() com‐
40       mand or the find_package() command contain  a  use  of  cmake_policy(),
41       that  policy  setting will not affect the caller by default.  Both com‐
42       mands accept an optional NO_POLICY_SCOPE keyword to control this behav‐
43       ior.
44
45       The  CMAKE_MINIMUM_REQUIRED_VERSION variable may also be used to deter‐
46       mine whether to report an error on use of deprecated  macros  or  func‐
47       tions.
48

POLICIES INTRODUCED BY CMAKE 3.14

50   CMP0088
51       FindBISON runs bison in CMAKE_CURRENT_BINARY_DIR when executing.
52
53       The  module provides a BISON_TARGET macro which generates BISON output.
54       In CMake 3.13 and below the macro would generate a custom command  that
55       runs bison in the source directory.  CMake 3.14 and later prefer to run
56       it in the build directory and use CMAKE_CURRENT_BINARY_DIR as the WORK‐
57       ING_DIRECTORY  of  its  add_custom_command()  invocation.  This ensures
58       that any implicitly generated file is written to the build tree  rather
59       than the source.
60
61       This  policy  provides  compatibility  for  projects that have not been
62       updated to expect the new behavior.
63
64       The OLD behavior for this policy is for BISON_TARGET to use the current
65       source  directory  for  the  WORKING_DIRECTORY  and  where  to generate
66       implicit files. The NEW behavior of this policy is to use  the  current
67       binary  directory  for  the  WORKING_DIRECTORY  and  where  to generate
68       implicit files.
69
70       This policy was introduced in CMake version 3.14.  Use  the  cmake_pol‐
71       icy()  command  to  set it to OLD or NEW explicitly.  Unlike most poli‐
72       cies, CMake version 3.14.5 does not warn when this policy  is  not  set
73       and simply uses OLD behavior.
74
75       NOTE:
76          The  OLD behavior of a policy is deprecated by definition and may be
77          removed in a future version of CMake.
78
79   CMP0087
80       install(CODE) and install(SCRIPT) support generator expressions.
81
82       In CMake 3.13 and earlier, install(CODE) and  install(SCRIPT)  did  not
83       evaluate  generator  expressions.   CMake  3.14 and later will evaluate
84       generator expressions for install(CODE) and install(SCRIPT).
85
86       The  OLD  behavior  of   this   policy   is   for   install(CODE)   and
87       install(SCRIPT)  to not evaluate generator expressions.  The NEW behav‐
88       ior  is  to  evaluate  generator  expressions  for  install(CODE)   and
89       install(SCRIPT).
90
91       Note  that  it  is  the  value of this policy setting at the end of the
92       directory scope that is important, not its setting at the time  of  the
93       call  to  install(CODE)  or install(SCRIPT).  This has implications for
94       calling these commands from places that have their own policy scope but
95       not their own directory scope (e.g. from files brought in via include()
96       rather than add_subdirectory()).
97
98       This policy was introduced in CMake version 3.14.  CMake version 3.14.5
99       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
100       cmake_policy() command to set it to OLD or NEW explicitly.
101
102       NOTE:
103          The OLD behavior of a policy is deprecated by definition and may  be
104          removed in a future version of CMake.
105
106   CMP0086
107       UseSWIG honors SWIG_MODULE_NAME via -module flag.
108
109       Starting  with  CMake 3.14, UseSWIG passes option -module <module_name>
110       to SWIG compiler if the file property  SWIG_MODULE_NAME  is  specified.
111       This policy provides compatibility with projects that expect the legacy
112       behavior.
113
114       The OLD behavior for this policy is to never pass -module option.   The
115       NEW  behavior  is  to pass -module option to SWIG compiler if SWIG_MOD‐
116       ULE_NAME is specified.
117
118       This policy was introduced in CMake version 3.14.  CMake version 3.14.5
119       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
120       cmake_policy() command to set it to OLD or NEW explicitly.
121
122       NOTE:
123          The OLD behavior of a policy is deprecated by definition and may  be
124          removed in a future version of CMake.
125
126   CMP0085
127       $<IN_LIST:...> handles empty list items.
128
129       In CMake 3.13 and lower, the $<IN_LIST:...> generator expression always
130       returned 0 if the first argument was empty, even if the list  contained
131       an  empty item. This behavior is inconsistent with the IN_LIST behavior
132       of if(), which this generator expression is  meant  to  emulate.  CMake
133       3.14 and later handles this case correctly.
134
135       The  OLD behavior of this policy is for $<IN_LIST:...> to always return
136       0 if the first argument is empty. The NEW behavior is to  return  1  if
137       the first argument is empty and the list contains an empty item.
138
139       This policy was introduced in CMake version 3.14.  CMake version 3.14.5
140       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
141       cmake_policy() command to set it to OLD or NEW explicitly.
142
143       NOTE:
144          The  OLD behavior of a policy is deprecated by definition and may be
145          removed in a future version of CMake.
146
147   CMP0084
148       The FindQt module does not exist for find_package().
149
150       The existence of FindQt means that for Qt upstream to  provide  package
151       config  files  that  can  be  found  by find_package(Qt), the consuming
152       project has to explicitly  specify  find_package(Qt  CONFIG).  Removing
153       this  module gives Qt a path forward for exporting its own config files
154       which can easily be found by consuming projects.
155
156       This policy pretends that CMake’s internal FindQt module does not exist
157       for  find_package(). If a project really wants to use Qt 3 or 4, it can
158       call find_package(Qt[34]), include(FindQt),  or  add  FindQt  to  their
159       CMAKE_MODULE_PATH.
160
161       The  OLD  behavior of this policy is for FindQt to exist for find_pack‐
162       age(). The NEW behavior  is  to  pretend  that  it  doesn’t  exist  for
163       find_package().
164
165       This policy was introduced in CMake version 3.14.  CMake version 3.14.5
166       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
167       cmake_policy() command to set it to OLD or NEW explicitly.
168
169       NOTE:
170          The  OLD behavior of a policy is deprecated by definition and may be
171          removed in a future version of CMake.
172
173   CMP0083
174       To control generation of Position Independent Executable (PIE) or  not,
175       some flags are required at link time.
176
177       CMake  3.13  and lower did not add these link flags when POSITION_INDE‐
178       PENDENT_CODE is set.
179
180       The OLD behavior for this policy is to not manage PIE link  flags.  The
181       NEW behavior is to add link flags if POSITION_INDEPENDENT_CODE is set:
182
183       · Set  to  TRUE: flags to produce a position independent executable are
184         passed to the linker step. For example -pie for GCC.
185
186       · Set to FALSE: flags not to produce a position independent  executable
187         are passed to the linker step. For example -no-pie for GCC.
188
189       · Not set: no flags are passed to the linker step.
190
191       Since  a  given linker may not support PIE flags in all environments in
192       which it is used, it is the project’s responsibility to use the  Check‐
193       PIESupported  module  to  check  for  support  to ensure that the POSI‐
194       TION_INDEPENDENT_CODE target property for executables will  be  honored
195       at link time.
196
197       This  policy  was  introduced in CMake version 3.14. Use the cmake_pol‐
198       icy() command to set it to OLD or NEW explicitly.   Unlike  most  poli‐
199       cies,  CMake  version  3.14.5 does not warn when this policy is not set
200       and simply uses OLD behavior.
201
202       NOTE:
203          The OLD behavior of a policy is deprecated by definition and may  be
204          removed in a future version of CMake.
205
206   Examples
207       Behave like CMake 3.13 and do not apply any PIE flags at link stage.
208
209          cmake_minimum_required(VERSION 3.13)
210          project(foo)
211
212          # ...
213
214          add_executable(foo ...)
215          set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE TRUE)
216
217       Use  the CheckPIESupported module to detect whether PIE is supported by
218       the current linker and environment.  Apply PIE flags only if the linker
219       supports them.
220
221          cmake_minimum_required(VERSION 3.14) # CMP0083 NEW
222          project(foo)
223
224          include(CheckPIESupported)
225          check_pie_supported()
226
227          # ...
228
229          add_executable(foo ...)
230          set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE TRUE)
231
232   CMP0082
233       Install  rules from add_subdirectory() calls are interleaved with those
234       in caller.
235
236       CMake 3.13 and lower ran  the  install  rules  from  add_subdirectory()
237       after  all  other  install rules, even if add_subdirectory() was called
238       before the other install rules.  CMake 3.14 and above prefer to  inter‐
239       leave  these  add_subdirectory()  install rules with the others so that
240       they are run in the order they are declared.  This policy provides com‐
241       patibility  for  projects  that have not been updated to expect the new
242       behavior.
243
244       The OLD behavior for this policy is  to  run  the  install  rules  from
245       add_subdirectory() after the other install rules.  The NEW behavior for
246       this policy is to run all install rules in the order they are declared.
247
248       This policy was introduced in CMake version 3.14.   Unlike  most  poli‐
249       cies, CMake version 3.14.5 does not warn by default when this policy is
250       not set and  simply  uses  OLD  behavior.   See  documentation  of  the
251       CMAKE_POLICY_WARNING_CMP0082 variable to control the warning.
252
253       NOTE:
254          The  OLD behavior of a policy is deprecated by definition and may be
255          removed in a future version of CMake.
256

POLICIES INTRODUCED BY CMAKE 3.13

258   CMP0081
259       Relative paths not allowed in LINK_DIRECTORIES target property.
260
261       CMake 3.12 and lower allowed the LINK_DIRECTORIES directory property to
262       contain relative paths.  The base path for such relative entries is not
263       well defined.  CMake 3.13 and later will issue  a  FATAL_ERROR  if  the
264       LINK_DIRECTORIES   target   property   (which  is  initialized  by  the
265       LINK_DIRECTORIES directory property) contains a relative path.
266
267       The OLD behavior for this policy is not to warn about relative paths in
268       the LINK_DIRECTORIES target property.  The NEW behavior for this policy
269       is to issue a FATAL_ERROR if LINK_DIRECTORIES contains a relative path.
270
271       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
272       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
273       cmake_policy() command to set it to OLD or NEW explicitly.
274
275       NOTE:
276          The OLD behavior of a policy is deprecated by definition and may  be
277          removed in a future version of CMake.
278
279   CMP0080
280       BundleUtilities cannot be included at configure time.
281
282       The  macros  provided  by BundleUtilities are intended to be invoked at
283       install time rather than at configure time, because they depend on  the
284       listed  targets  already existing at the time they are invoked. If they
285       are invoked at configure time, the targets haven’t been built yet,  and
286       the commands will fail.
287
288       This  policy  restricts  the  inclusion  of BundleUtilities to cmake -P
289       style scripts and install rules. Specifically, it looks for  the  pres‐
290       ence of CMAKE_GENERATOR and throws a fatal error if it exists.
291
292       The  OLD  behavior  of  this  policy  is to allow BundleUtilities to be
293       included at configure time. The NEW behavior of this policy is to  dis‐
294       allow such inclusion.
295
296       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
297       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
298       cmake_policy() command to set it to OLD or NEW explicitly.
299
300       NOTE:
301          The  OLD behavior of a policy is deprecated by definition and may be
302          removed in a future version of CMake.
303
304   CMP0079
305       target_link_libraries() allows use with targets in other directories.
306
307       Prior to CMake 3.13 the target_link_libraries() command did not  accept
308       targets  not created in the calling directory as its first argument for
309       calls that update the LINK_LIBRARIES of  the  target  itself.   It  did
310       accidentally  accept  targets from other directories on calls that only
311       update the INTERFACE_LINK_LIBRARIES, but would simply  add  entries  to
312       the  property as if the call were made in the original directory.  Thus
313       link interface libraries specified this way were always  looked  up  by
314       generators in the scope of the original target rather than in the scope
315       that called target_link_libraries().
316
317       CMake 3.13 now allows the target_link_libraries() command to be  called
318       from  any  directory  to  add  link  dependencies  and  link  interface
319       libraries to targets created in other  directories.   The  entries  are
320       added  to  LINK_LIBRARIES  and INTERFACE_LINK_LIBRARIES using a special
321       (internal) suffix to tell the generators to look up the  names  in  the
322       calling scope rather than the scope that created the target.
323
324       This  policy provides compatibility with projects that already use tar‐
325       get_link_libraries() with the INTERFACE keyword on a target in  another
326       directory  to  add  INTERFACE_LINK_LIBRARIES entries to be looked up in
327       the target’s directory.  Such projects should be updated to be aware of
328       the new scoping rules in that case.
329
330       The  OLD behavior of this policy is to disallow target_link_libraries()
331       calls naming targets from another directory except  in  the  previously
332       accidentally allowed case of using the INTERFACE keyword only.  The NEW
333       behavior of this policy is to allow all such  calls  but  use  the  new
334       scoping rules.
335
336       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
337       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
338       cmake_policy() command to set it to OLD or NEW explicitly.
339
340       NOTE:
341          The  OLD behavior of a policy is deprecated by definition and may be
342          removed in a future version of CMake.
343
344   CMP0078
345       UseSWIG generates standard target names.
346
347       Starting with CMake 3.13, UseSWIG generates now standard target  names.
348       This policy provides compatibility with projects that expect the legacy
349       behavior.
350
351       The OLD behavior for this policy relies on  UseSWIG_TARGET_NAME_PREFER‐
352       ENCE  variable that can be used to specify an explicit preference.  The
353       value may be one of:
354
355       · LEGACY:   legacy   strategy   is    applied.    Variable    SWIG_MOD‐
356         ULE_<name>_REAL_NAME  must  be used to get real target name.  This is
357         the default if not specified.
358
359       · STANDARD: target name matches specified name.
360
361       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
362       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
363       cmake_policy() command to set it to OLD or NEW explicitly.
364
365       NOTE:
366          The OLD behavior of a policy is deprecated by definition and may  be
367          removed in a future version of CMake.
368
369   CMP0077
370       option() honors normal variables.
371
372       The option() command is typically used to create a cache entry to allow
373       users to set the option.  However, there are cases in  which  a  normal
374       (non-cached)  variable of the same name as the option may be defined by
375       the project prior to calling the  option()  command.   For  example,  a
376       project  that  embeds  another  project  as  a subdirectory may want to
377       hard-code options of the subproject to build the way it needs.
378
379       For historical reasons in CMake 3.12 and  below  the  option()  command
380       removes a normal (non-cached) variable of the same name when:
381
382       · a cache entry of the specified name does not exist at all, or
383
384       · a  cache  entry of the specified name exists but has not been given a
385         type (e.g. via -D<name>=ON on the command line).
386
387       In both of these cases (typically on the  first  run  in  a  new  build
388       tree), the option() command gives the cache entry type BOOL and removes
389       any normal (non-cached) variable of the same name.   In  the  remaining
390       case  that the cache entry of the specified name already exists and has
391       a type (typically on later runs in a build tree), the option()  command
392       changes nothing and any normal variable of the same name remains set.
393
394       In CMake 3.13 and above the option() command prefers to do nothing when
395       a normal variable of the given name already exists.  It does not create
396       or  update a cache entry or remove the normal variable.  The new behav‐
397       ior is consistent between the first and later runs  in  a  build  tree.
398       This  policy  provides  compatibility  with projects that have not been
399       updated to expect the new behavior.
400
401       When the option() command sees a normal variable of the given name:
402
403       · The OLD behavior for this policy is to proceed  even  when  a  normal
404         variable  of  the  same  name  exists.   If  the cache entry does not
405         already exist and have a type then it is created and/or given a  type
406         and the normal variable is removed.
407
408       · The NEW behavior for this policy is to do nothing when a normal vari‐
409         able of the same name exists.  The normal variable  is  not  removed.
410         The  cache  entry  is  not  created  or  updated and is ignored if it
411         exists.
412
413       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
414       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
415       cmake_policy() command to set it to OLD or NEW explicitly.
416
417       NOTE:
418          The OLD behavior of a policy is deprecated by definition and may  be
419          removed in a future version of CMake.
420
421   CMP0076
422       The target_sources() command converts relative paths to absolute.
423
424       In CMake 3.13 and above, the target_sources() command now converts rel‐
425       ative source file paths to absolute paths in the following cases:
426
427       · Source files are added to the target’s INTERFACE_SOURCES property.
428
429       · The   target’s   SOURCE_DIR   property   differs   from    CMAKE_CUR‐
430         RENT_SOURCE_DIR.
431
432       A  path  that begins with a generator expression is always left unmodi‐
433       fied.
434
435       This policy provides compatibility with projects  that  have  not  been
436       updated  to  expect this behavior.  The OLD behavior for this policy is
437       to leave all relative source file paths unmodified.  The  NEW  behavior
438       of  this  policy  is to convert relative paths to absolute according to
439       above rules.
440
441       This policy was introduced in CMake version 3.13.  CMake version 3.14.5
442       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
443       cmake_policy() command to set it to OLD or NEW explicitly.
444
445       NOTE:
446          The OLD behavior of a policy is deprecated by definition and may  be
447          removed in a future version of CMake.
448

POLICIES INTRODUCED BY CMAKE 3.12

450   CMP0075
451       Include file check macros honor CMAKE_REQUIRED_LIBRARIES.
452
453       In CMake 3.12 and above, the
454
455       · check_include_file macro in the CheckIncludeFile module, the
456
457       · check_include_file_cxx  macro  in the CheckIncludeFileCXX module, and
458         the
459
460       · check_include_files macro in the CheckIncludeFiles module
461
462       now prefer to link the check executable to the libraries listed in  the
463       CMAKE_REQUIRED_LIBRARIES  variable.  This policy provides compatibility
464       with projects that have not been updated to expect this behavior.
465
466       The OLD behavior for this policy is to ignore  CMAKE_REQUIRED_LIBRARIES
467       in  the  include file check macros.  The NEW behavior of this policy is
468       to honor CMAKE_REQUIRED_LIBRARIES in the include file check macros.
469
470       This policy was introduced in CMake version 3.12.  CMake version 3.14.5
471       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
472       cmake_policy() command to set it to OLD or NEW explicitly.
473
474       NOTE:
475          The OLD behavior of a policy is deprecated by definition and may  be
476          removed in a future version of CMake.
477
478   CMP0074
479       find_package() uses <PackageName>_ROOT variables.
480
481       In  CMake  3.12  and  above the find_package(<PackageName>) command now
482       searches prefixes specified by the  <PackageName>_ROOT  CMake  variable
483       and  the  <PackageName>_ROOT  environment  variable.  Package roots are
484       maintained as a stack so nested calls to  all  find_*  commands  inside
485       find  modules  also search the roots as prefixes.  This policy provides
486       compatibility with projects that have not been updated to  avoid  using
487       <PackageName>_ROOT variables for other purposes.
488
489       The  OLD behavior for this policy is to ignore <PackageName>_ROOT vari‐
490       ables.  The NEW behavior for this policy is to  use  <PackageName>_ROOT
491       variables.
492
493       This policy was introduced in CMake version 3.12.  CMake version 3.14.5
494       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
495       cmake_policy() command to set it to OLD or NEW explicitly.
496
497       NOTE:
498          The  OLD behavior of a policy is deprecated by definition and may be
499          removed in a future version of CMake.
500
501   CMP0073
502       Do not produce legacy _LIB_DEPENDS cache entries.
503
504       Ancient CMake versions once used  <tgt>_LIB_DEPENDS  cache  entries  to
505       propagate  library link dependencies.  This has long been done by other
506       means, leaving the export_library_dependencies() command  as  the  only
507       user  of these values.  That command has long been disallowed by policy
508       CMP0033, but the <tgt>_LIB_DEPENDS cache entries were left for compati‐
509       bility with possible non-standard uses by projects.
510
511       CMake  3.12  and above now prefer to not produce these cache entries at
512       all.  This policy provides compatibility with projects  that  have  not
513       been updated to avoid using them.
514
515       The  OLD  behavior  for  this  policy is to set <tgt>_LIB_DEPENDS cache
516       entries.  The NEW behavior for this policy is to not set them.
517
518       This policy was introduced in CMake version 3.12.  Use  the  cmake_pol‐
519       icy()  command  to  set it to OLD or NEW explicitly.  Unlike most poli‐
520       cies, CMake version 3.14.5 does not warn when this policy  is  not  set
521       and simply uses OLD behavior.
522
523       NOTE:
524          The  OLD behavior of a policy is deprecated by definition and may be
525          removed in a future version of CMake.
526

POLICIES INTRODUCED BY CMAKE 3.11

528   CMP0072
529       FindOpenGL prefers GLVND by default when available.
530
531       The  FindOpenGL  module  provides   an   OpenGL::GL   target   and   an
532       OPENGL_LIBRARIES variable for projects to use for legacy GL interfaces.
533       When both a legacy GL library (e.g. libGL.so) and GLVND  libraries  for
534       OpenGL  and  GLX  (e.g.  libOpenGL.so and libGLX.so) are available, the
535       module must choose between them.  It documents an  OpenGL_GL_PREFERENCE
536       variable  that  can be used to specify an explicit preference.  When no
537       such preference is set, the module must choose a default preference.
538
539       CMake 3.11 and above prefer to choose  GLVND  libraries.   This  policy
540       provides  compatibility with projects that expect the legacy GL library
541       to be used.
542
543       The OLD behavior for this policy  is  to  set  OpenGL_GL_PREFERENCE  to
544       LEGACY.   The  NEW behavior for this policy is to set OpenGL_GL_PREFER‐
545       ENCE to GLVND.
546
547       This policy was introduced in CMake version 3.11.  CMake version 3.14.5
548       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
549       cmake_policy() command to set it to OLD or NEW explicitly.
550
551       NOTE:
552          The OLD behavior of a policy is deprecated by definition and may  be
553          removed in a future version of CMake.
554

POLICIES INTRODUCED BY CMAKE 3.10

556   CMP0071
557       Let AUTOMOC and AUTOUIC process GENERATED files.
558
559       Since  version 3.10, CMake processes regular and GENERATED source files
560       in AUTOMOC and AUTOUIC.  In earlier CMake versions, only regular source
561       files were processed.  GENERATED source files were ignored silently.
562
563       This  policy affects how source files that are GENERATED get treated in
564       AUTOMOC and AUTOUIC.
565
566       The OLD behavior for this policy is to ignore GENERATED source files in
567       AUTOMOC and AUTOUIC.
568
569       The  NEW  behavior for this policy is to process GENERATED source files
570       in AUTOMOC and AUTOUIC just like regular source files.
571
572       NOTE:
573          To silence the CMP0071 warning source files  can  be  excluded  from
574          AUTOMOC and AUTOUIC processing by setting the source file properties
575          SKIP_AUTOMOC, SKIP_AUTOUIC or SKIP_AUTOGEN.
576
577       Source skip example:
578
579          # ...
580          set_property(SOURCE /path/to/file1.h PROPERTY SKIP_AUTOMOC ON)
581          set_property(SOURCE /path/to/file2.h PROPERTY SKIP_AUTOUIC ON)
582          set_property(SOURCE /path/to/file3.h PROPERTY SKIP_AUTOGEN ON)
583          # ...
584
585       This policy was introduced in CMake version 3.10.  CMake version 3.14.5
586       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
587       cmake_policy() command to set it to OLD or NEW explicitly.
588
589       NOTE:
590          The OLD behavior of a policy is deprecated by definition and may  be
591          removed in a future version of CMake.
592
593   CMP0070
594       Define file(GENERATE) behavior for relative paths.
595
596       CMake 3.10 and newer define that relative paths given to INPUT and OUT‐
597       PUT arguments of file(GENERATE) are interpreted relative to the current
598       source  and  binary directories, respectively.  CMake 3.9 and lower did
599       not define any behavior for relative paths but did  not  diagnose  them
600       either  and  accidentally  treated them relative to the process working
601       directory.  Policy CMP0070 provides compatibility  with  projects  that
602       used the old undefined behavior.
603
604       This policy affects behavior of relative paths given to file(GENERATE).
605       The OLD behavior for this policy is to treat the paths relative to  the
606       working  directory  of  CMake.   The NEW behavior for this policy is to
607       interpret relative paths with respect to the current source  or  binary
608       directory of the caller.
609
610       This policy was introduced in CMake version 3.10.  CMake version 3.14.5
611       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
612       cmake_policy() command to set it to OLD or NEW explicitly.
613
614       NOTE:
615          The  OLD behavior of a policy is deprecated by definition and may be
616          removed in a future version of CMake.
617

POLICIES INTRODUCED BY CMAKE 3.9

619   CMP0069
620       INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.
621
622       CMake 3.9 and newer prefer to add IPO flags whenever the  INTERPROCEDU‐
623       RAL_OPTIMIZATION  target  property  is  enabled and produce an error if
624       flags are not known to CMake for the current compiler.  Since  a  given
625       compiler  may  not support IPO flags in all environments in which it is
626       used, it is now the project’s responsibility to  use  the  CheckIPOSup‐
627       ported  module  to  check for support before enabling the INTERPROCEDU‐
628       RAL_OPTIMIZATION target property.  This approach allows  a  project  to
629       conditionally  activate IPO when supported.  It also allows an end user
630       to set the CMAKE_INTERPROCEDURAL_OPTIMIZATION variable in  an  environ‐
631       ment known to support IPO even if the project does not enable the prop‐
632       erty.
633
634       Since CMake 3.8 and lower only honored INTERPROCEDURAL_OPTIMIZATION for
635       the  Intel  compiler on Linux, some projects may unconditionally enable
636       the target property.  Policy CMP0069 provides compatibility  with  such
637       projects.
638
639       This policy takes effect whenever the IPO property is enabled.  The OLD
640       behavior for this policy is to add IPO flags only for Intel compiler on
641       Linux.   The  NEW  behavior for this policy is to add IPO flags for the
642       current compiler or produce an error if CMake does not know the flags.
643
644       This policy was introduced in CMake version 3.9.  CMake version  3.14.5
645       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
646       cmake_policy() command to set it to OLD or NEW explicitly.
647
648       NOTE:
649          The OLD behavior of a policy is deprecated by definition and may  be
650          removed in a future version of CMake.
651
652   Examples
653       Behave  like  CMake 3.8 and do not apply any IPO flags except for Intel
654       compiler on Linux:
655
656          cmake_minimum_required(VERSION 3.8)
657          project(foo)
658
659          # ...
660
661          set_property(TARGET ... PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
662
663       Use the CheckIPOSupported module to detect whether IPO is supported  by
664       the  current compiler, environment, and CMake version.  Produce a fatal
665       error if support is not available:
666
667          cmake_minimum_required(VERSION 3.9) # CMP0069 NEW
668          project(foo)
669
670          include(CheckIPOSupported)
671          check_ipo_supported()
672
673          # ...
674
675          set_property(TARGET ... PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
676
677       Apply IPO flags only if compiler supports it:
678
679          cmake_minimum_required(VERSION 3.9) # CMP0069 NEW
680          project(foo)
681
682          include(CheckIPOSupported)
683
684          # ...
685
686          check_ipo_supported(RESULT result)
687          if(result)
688            set_property(TARGET ... PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
689          endif()
690
691       Apply IPO flags without any checks.  This may lead to build  errors  if
692       IPO  is not supported by the compiler in the current environment.  Pro‐
693       duce an error if CMake does not know IPO flags  for  the  current  com‐
694       piler:
695
696          cmake_minimum_required(VERSION 3.9) # CMP0069 NEW
697          project(foo)
698
699          # ...
700
701          set_property(TARGET ... PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
702
703   CMP0068
704       RPATH settings on macOS do not affect install_name.
705
706       CMake  3.9  and newer remove any effect the following settings may have
707       on the install_name of a target on macOS:
708
709       · BUILD_WITH_INSTALL_RPATH target property
710
711       · SKIP_BUILD_RPATH target property
712
713       · CMAKE_SKIP_RPATH variable
714
715       · CMAKE_SKIP_INSTALL_RPATH variable
716
717       Previously, setting BUILD_WITH_INSTALL_RPATH had the effect of  setting
718       both  the install_name of a target to INSTALL_NAME_DIR and the RPATH to
719       INSTALL_RPATH.  In CMake 3.9, it only affects setting of  RPATH.   How‐
720       ever, if one wants INSTALL_NAME_DIR to apply to the target in the build
721       tree, one may set BUILD_WITH_INSTALL_NAME_DIR.
722
723       If SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH or CMAKE_SKIP_INSTALL_RPATH  were
724       used  to  strip  the directory portion of the install_name of a target,
725       one may set INSTALL_NAME_DIR="" instead.
726
727       The OLD behavior of this policy  is  to  use  the  RPATH  settings  for
728       install_name  on  macOS.   The NEW behavior of this policy is to ignore
729       the RPATH settings for install_name on macOS.
730
731       This policy was introduced in CMake version 3.9.  CMake version  3.14.5
732       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
733       cmake_policy() command to set it to OLD or NEW explicitly.
734
735       NOTE:
736          The OLD behavior of a policy is deprecated by definition and may  be
737          removed in a future version of CMake.
738

POLICIES INTRODUCED BY CMAKE 3.8

740   CMP0067
741       Honor language standard in try_compile() source-file signature.
742
743       The try_compile() source file signature is intended to allow callers to
744       check whether they will be able to compile a given source file with the
745       current  toolchain.   In order to match compiler behavior, any language
746       standard mode should match.  However, CMake 3.7 and below  did  not  do
747       this.   CMake  3.8 and above prefer to honor the language standard set‐
748       tings for C, CXX (C++), and CUDA using the values of the variables:
749
750       · CMAKE_C_STANDARD
751
752       · CMAKE_C_STANDARD_REQUIRED
753
754       · CMAKE_C_EXTENSIONS
755
756       · CMAKE_CXX_STANDARD
757
758       · CMAKE_CXX_STANDARD_REQUIRED
759
760       · CMAKE_CXX_EXTENSIONS
761
762       · CMAKE_CUDA_STANDARD
763
764       · CMAKE_CUDA_STANDARD_REQUIRED
765
766       · CMAKE_CUDA_EXTENSIONS
767
768       This policy provides compatibility for projects that do not expect  the
769       language standard settings to be used automatically.
770
771       The  OLD behavior of this policy is to ignore language standard setting
772       variables when generating the try_compile test project.  The NEW behav‐
773       ior of this policy is to honor language standard setting variables.
774
775       This policy was introduced in CMake version 3.8.  Unlike most policies,
776       CMake version 3.14.5 does not warn by default when this policy  is  not
777       set  and simply uses OLD behavior.  See documentation of the CMAKE_POL‐
778       ICY_WARNING_CMP0067 variable to control the warning.
779
780       NOTE:
781          The OLD behavior of a policy is deprecated by definition and may  be
782          removed in a future version of CMake.
783

POLICIES INTRODUCED BY CMAKE 3.7

785   CMP0066
786       Honor per-config flags in try_compile() source-file signature.
787
788       The  source  file signature of the try_compile() command uses the value
789       of the CMAKE_<LANG>_FLAGS variable in the test project so that the test
790       compilation  works as it would in the main project.  However, CMake 3.6
791       and below do not also honor  config-specific  compiler  flags  such  as
792       those  in  the  CMAKE_<LANG>_FLAGS_DEBUG variable.  CMake 3.7 and above
793       prefer to honor config-specific compiler flags too.  This  policy  pro‐
794       vides  compatibility  for  projects  that do not expect config-specific
795       compiler flags to be used.
796
797       The OLD behavior of this policy is to ignore config-specific flag vari‐
798       ables  like  CMAKE_<LANG>_FLAGS_DEBUG  and  only  use  CMake’s built-in
799       defaults for the current compiler and platform.
800
801       The NEW behavior of this policy is to honor config-specific flag  vari‐
802       abldes like CMAKE_<LANG>_FLAGS_DEBUG.
803
804       This policy was introduced in CMake version 3.7.  Unlike most policies,
805       CMake version 3.14.5 does not warn by default when this policy  is  not
806       set  and simply uses OLD behavior.  See documentation of the CMAKE_POL‐
807       ICY_WARNING_CMP0066 variable to control the warning.
808
809       NOTE:
810          The OLD behavior of a policy is deprecated by definition and may  be
811          removed in a future version of CMake.
812

POLICIES INTRODUCED BY CMAKE 3.4

814   CMP0065
815       Do  not  add  flags  to  export  symbols  from  executables without the
816       ENABLE_EXPORTS target property.
817
818       CMake 3.3 and below, for historical reasons, always linked  executables
819       on  some platforms with flags like -rdynamic to export symbols from the
820       executables for use by any plugins they may load via dlopen.  CMake 3.4
821       and  above  prefer  to do this only for executables that are explicitly
822       marked with the ENABLE_EXPORTS target property.
823
824       The OLD behavior of this policy is to always use  the  additional  link
825       flags   when  linking  executables  regardless  of  the  value  of  the
826       ENABLE_EXPORTS target property.
827
828       The NEW behavior of this policy is to  only  use  the  additional  link
829       flags when linking executables if the ENABLE_EXPORTS target property is
830       set to True.
831
832       This policy was introduced in CMake version 3.4.  Unlike most policies,
833       CMake  version  3.14.5 does not warn by default when this policy is not
834       set and simply uses OLD behavior.  See documentation of the  CMAKE_POL‐
835       ICY_WARNING_CMP0065 variable to control the warning.
836
837       NOTE:
838          The  OLD behavior of a policy is deprecated by definition and may be
839          removed in a future version of CMake.
840
841   CMP0064
842       Recognize TEST as a operator for the if() command.
843
844       The TEST operator was added to the if() command to determine if a given
845       test name was created by the add_test() command.
846
847       The  OLD  behavior for this policy is to ignore the TEST operator.  The
848       NEW behavior is to interpret the TEST operator.
849
850       This policy was introduced in CMake version 3.4.  CMake version  3.14.5
851       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
852       cmake_policy() command to set it to OLD or NEW explicitly.
853
854       NOTE:
855          The OLD behavior of a policy is deprecated by definition and may  be
856          removed in a future version of CMake.
857

POLICIES INTRODUCED BY CMAKE 3.3

859   CMP0063
860       Honor visibility properties for all target types.
861
862       The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target prop‐
863       erties affect visibility of symbols during dynamic linking.  When first
864       introduced  these  properties  affected  compilation of sources only in
865       shared  libraries,  module  libraries,   and   executables   with   the
866       ENABLE_EXPORTS  property  set.   This  was sufficient for the basic use
867       cases of shared libraries and executables with plugins.  However,  some
868       sources may be compiled as part of static libraries or object libraries
869       and then linked into a shared library later.  CMake 3.3 and above  pre‐
870       fer to honor these properties for sources compiled in all target types.
871       This policy preserves compatibility for projects expecting the  proper‐
872       ties to work only for some target types.
873
874       The OLD behavior for this policy is to ignore the visibility properties
875       for  static  libraries,  object  libraries,  and  executables   without
876       exports.   The  NEW behavior for this policy is to honor the visibility
877       properties for all target types.
878
879       This policy was introduced in CMake version 3.3.  CMake version  3.14.5
880       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
881       cmake_policy() command to set it to OLD or NEW explicitly.
882
883       NOTE:
884          The OLD behavior of a policy is deprecated by definition and may  be
885          removed in a future version of CMake.
886
887   CMP0062
888       Disallow install() of export() result.
889
890       The  export()  command  generates  a  file containing Imported Targets,
891       which is suitable for use from the build directory.  It is not suitable
892       for  installation  because  it  contains  absolute paths to buildsystem
893       locations, and is particular to a single build configuration.
894
895       The install(EXPORT) generates and installs files which contain Imported
896       Targets.   These  files  are  generated with relative paths (unless the
897       user specifies absolute paths), and are designed  for  multi-configura‐
898       tion use.  See Creating Packages for more.
899
900       CMake  3.3  no longer allows the use of the install(FILES) command with
901       the result of the export() command.
902
903       The OLD behavior for this policy is to allow installing the  result  of
904       an  export() command.  The NEW behavior for this policy is not to allow
905       installing the result of an export() command.
906
907       This policy was introduced in CMake version 3.3.  CMake version  3.14.5
908       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
909       cmake_policy() command to set it to OLD or NEW explicitly.
910
911       NOTE:
912          The OLD behavior of a policy is deprecated by definition and may  be
913          removed in a future version of CMake.
914
915   CMP0061
916       CTest does not by default tell make to ignore errors (-i).
917
918       The ctest_build() and build_command() commands no longer generate build
919       commands for Makefile Generators with the -i option.   Previously  this
920       was  done  to  help build as much of tested projects as possible.  How‐
921       ever, this behavior is not consistent with other  generators  and  also
922       causes the return code of the make tool to be meaningless.
923
924       Of  course  users  may  still  add  this  option  manually  by  setting
925       CTEST_BUILD_COMMAND or the MAKECOMMAND  cache  entry.   See  the  CTest
926       Build Step MakeCommand setting documentation for their effects.
927
928       The  OLD  behavior for this policy is to add -i to make calls in CTest.
929       The NEW behavior for this policy is to not add -i.
930
931       This policy was introduced in CMake version 3.3.  Unlike most policies,
932       CMake version 3.14.5 does not warn when this policy is not set and sim‐
933       ply uses OLD behavior.
934
935       NOTE:
936          The OLD behavior of a policy is deprecated by definition and may  be
937          removed in a future version of CMake.
938
939   CMP0060
940       Link libraries by full path even in implicit directories.
941
942       Policy  CMP0003  was  introduced  with  the intention of always linking
943       library files by full path when a  full  path  is  given  to  the  tar‐
944       get_link_libraries()  command.  However, on some platforms (e.g. HP-UX)
945       the compiler front-end adds alternative library search  paths  for  the
946       current   architecture   (e.g.   /usr/lib/<arch>  has  alternatives  to
947       libraries in /usr/lib for the current architecture).  On such platforms
948       the  find_library()  may find a library such as /usr/lib/libfoo.so that
949       does not belong to the current architecture.
950
951       Prior to policy CMP0003  projects  would  still  build  in  such  cases
952       because  the  incorrect library path would be converted to -lfoo on the
953       link line and the linker would find the proper library in the arch-spe‐
954       cific  search  path  provided by the compiler front-end implicitly.  At
955       the time we chose to remain compatible with  such  projects  by  always
956       converting  library  files  found in implicit link directories to -lfoo
957       flags to ask the linker to search  for  them.   This  approach  allowed
958       existing projects to continue to build while still linking to libraries
959       outside implicit link directories via full path (such as those  in  the
960       build tree).
961
962       CMake  does  allow  projects  to  override  this  behavior  by using an
963       IMPORTED library target with its IMPORTED_LOCATION property set to  the
964       desired  full  path  to a library file.  In fact, many Find Modules are
965       learning to provide Imported Targets instead of  just  the  traditional
966       Foo_LIBRARIES  variable listing library files.  However, this makes the
967       link line generated for a library found by  a  Find  Module  depend  on
968       whether it is linked through an imported target or not, which is incon‐
969       sistent.  Furthermore, this behavior has been  a  source  of  confusion
970       because the generated link line for a library file depends on its loca‐
971       tion.  It is also problematic for projects trying  to  link  statically
972       because flags like -Wl,-Bstatic -lfoo -Wl,-Bdynamic may be used to help
973       the linker select libfoo.a instead of libfoo.so but then  leak  dynamic
974       linking to following libraries.  (See the LINK_SEARCH_END_STATIC target
975       property for a solution typically used for that problem.)
976
977       When the special case for libraries in implicit  link  directories  was
978       first  introduced  the  list  of  implicit  link directories was simply
979       hard-coded (e.g. /lib, /usr/lib, and a few others).  Since  that  time,
980       CMake  has  learned to detect the implicit link directories used by the
981       compiler front-end.  If necessary, the find_library() command could  be
982       taught  to  use  this  information to help find libraries of the proper
983       architecture.
984
985       For these reasons, CMake 3.3 and above prefer to drop the special  case
986       and  link  libraries  by  full path even when they are in implicit link
987       directories.   Policy  CMP0060  provides  compatibility  for   existing
988       projects.
989
990       The  OLD  behavior  for  this policy is to ask the linker to search for
991       libraries whose full paths are known to be in  implicit  link  directo‐
992       ries.   The  NEW  behavior for this policy is to link libraries by full
993       path even if they are in implicit link directories.
994
995       This policy was introduced in CMake version 3.3.  Unlike most policies,
996       CMake  version  3.14.5 does not warn by default when this policy is not
997       set and simply uses OLD behavior.  See documentation of the  CMAKE_POL‐
998       ICY_WARNING_CMP0060 variable to control the warning.
999
1000       NOTE:
1001          The  OLD behavior of a policy is deprecated by definition and may be
1002          removed in a future version of CMake.
1003
1004   CMP0059
1005       Do not treat DEFINITIONS as a built-in directory property.
1006
1007       CMake 3.3 and above no longer make  a  list  of  definitions  available
1008       through  the  DEFINITIONS  directory property.  The COMPILE_DEFINITIONS
1009       directory property may be used instead.
1010
1011       The OLD behavior for this policy is to provide the list of flags  given
1012       so far to the add_definitions() command.  The NEW behavior is to behave
1013       as a normal user-defined directory property.
1014
1015       This policy was introduced in CMake version 3.3.  CMake version  3.14.5
1016       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1017       cmake_policy() command to set it to OLD or NEW explicitly.
1018
1019       NOTE:
1020          The OLD behavior of a policy is deprecated by definition and may  be
1021          removed in a future version of CMake.
1022
1023   CMP0058
1024       Ninja requires custom command byproducts to be explicit.
1025
1026       When  an intermediate file generated during the build is consumed by an
1027       expensive operation or a large tree of dependents, one may  reduce  the
1028       work  needed  for an incremental rebuild by updating the file timestamp
1029       only when its content changes.  With this approach the generation  rule
1030       must  have  a  separate  output  file that is always updated with a new
1031       timestamp that is newer than any dependencies of the rule so  that  the
1032       build  tool  re-runs the rule only when the input changes.  We refer to
1033       the separate output file as a rule’s witness and the generated file  as
1034       a rule’s byproduct.
1035
1036       Byproducts  may  not  be listed as outputs because their timestamps are
1037       allowed to be older than the inputs.  No build tools (like  make)  that
1038       existed  when  CMake  was  designed  have  a way to express byproducts.
1039       Therefore CMake versions prior to 3.2  had  no  way  to  specify  them.
1040       Projects  typically left byproducts undeclared in the rules that gener‐
1041       ate them.  For example:
1042
1043          add_custom_command(
1044            OUTPUT witness.txt
1045            COMMAND ${CMAKE_COMMAND} -E copy_if_different
1046                    ${CMAKE_CURRENT_SOURCE_DIR}/input.txt
1047                    byproduct.txt # timestamp may not change
1048            COMMAND ${CMAKE_COMMAND} -E touch witness.txt
1049            DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/input.txt
1050            )
1051          add_custom_target(Provider DEPENDS witness.txt)
1052          add_custom_command(
1053            OUTPUT generated.c
1054            COMMAND expensive-task -i byproduct.txt -o generated.c
1055            DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/byproduct.txt
1056            )
1057          add_library(Consumer generated.c)
1058          add_dependencies(Consumer Provider)
1059
1060       This works well for all generators except Ninja.  The Ninja build  tool
1061       sees  a  rule listing byproduct.txt as a dependency and no rule listing
1062       it as an output.  Ninja then complains that there is no way to  satisfy
1063       the  dependency  and  stops  building  even though there are order-only
1064       dependencies that ensure byproduct.txt will exist before its  consumers
1065       need it.  See discussion of this problem in Ninja Issue 760 for further
1066       details on why Ninja works this way.
1067
1068       Instead of leaving byproducts undeclared in  the  rules  that  generate
1069       them,  Ninja  expects byproducts to be listed along with other outputs.
1070       Such rules may be marked with a restat option that tells Ninja to check
1071       the  timestamps  of outputs after the rules run.  This prevents byprod‐
1072       ucts whose timestamps do not change from causing  their  dependents  to
1073       re-build unnecessarily.
1074
1075       Since the above approach does not tell CMake what custom command gener‐
1076       ates byproduct.txt, the Ninja generator does not have  enough  informa‐
1077       tion  to  add the byproduct as an output of any rule.  CMake 2.8.12 and
1078       above work around this problem  and  allow  projects  using  the  above
1079       approach to build by generating phony build rules to tell Ninja to tol‐
1080       erate such missing files.  However, this workaround prevents Ninja from
1081       diagnosing  a  dependency that is really missing.  It also works poorly
1082       in in-source builds where every  custom  command  dependency,  even  on
1083       source  files, needs to be treated this way because CMake does not have
1084       enough information to know which files are generated as  byproducts  of
1085       custom commands.
1086
1087       CMake  3.2 introduced the BYPRODUCTS option to the add_custom_command()
1088       and add_custom_target() commands.  This option allows byproducts to  be
1089       specified explicitly:
1090
1091          add_custom_command(
1092            OUTPUT witness.txt
1093            BYPRODUCTS byproduct.txt # explicit byproduct specification
1094            COMMAND ${CMAKE_COMMAND} -E copy_if_different
1095                    ${CMAKE_CURRENT_SOURCE_DIR}/input.txt
1096                    byproduct.txt # timestamp may not change
1097          ...
1098
1099       The BYPRODUCTS option is used by the Ninja generator to list byproducts
1100       among the outputs of the custom commands that  generate  them,  and  is
1101       ignored by other generators.
1102
1103       CMake  3.3  and above prefer to require projects to specify custom com‐
1104       mand byproducts explicitly so that it can avoid using  the  phony  rule
1105       workaround  altogether.   Policy CMP0058 was introduced to provide com‐
1106       patibility with existing projects that still need the workaround.
1107
1108       This policy has no effect on generators  other  than  Ninja.   The  OLD
1109       behavior  for  this policy is to generate Ninja phony rules for unknown
1110       dependencies in the build tree.  The NEW behavior for this policy is to
1111       not  generate these and instead require projects to specify custom com‐
1112       mand BYPRODUCTS explicitly.
1113
1114       This policy was introduced in CMake version 3.3.  CMake version  3.14.5
1115       warns when it sees unknown dependencies in out-of-source build trees if
1116       the policy is not set and then uses OLD behavior.  Use  the  cmake_pol‐
1117       icy()  command  to set the policy to OLD or NEW explicitly.  The policy
1118       setting must be in scope at the end  of  the  top-level  CMakeLists.txt
1119       file of the project and has global effect.
1120
1121       NOTE:
1122          The  OLD behavior of a policy is deprecated by definition and may be
1123          removed in a future version of CMake.
1124
1125   CMP0057
1126       Support new if() IN_LIST operator.
1127
1128       CMake 3.3 adds support for the new IN_LIST operator.
1129
1130       The OLD behavior for this policy is to  ignore  the  IN_LIST  operator.
1131       The NEW behavior is to interpret the IN_LIST operator.
1132
1133       This  policy was introduced in CMake version 3.3.  CMake version 3.14.5
1134       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1135       cmake_policy() command to set it to OLD or NEW explicitly.
1136
1137       NOTE:
1138          The  OLD behavior of a policy is deprecated by definition and may be
1139          removed in a future version of CMake.
1140

POLICIES INTRODUCED BY CMAKE 3.2

1142   CMP0056
1143       Honor link flags in try_compile() source-file signature.
1144
1145       The try_compile() command  source-file  signature  generates  a  CMake‐
1146       Lists.txt  file  to build the source file into an executable.  In order
1147       to compile the source the same way as it might be compiled by the call‐
1148       ing   project,   the   generated   project   sets   the  value  of  the
1149       CMAKE_<LANG>_FLAGS variable to that in the calling project.  The  value
1150       of the CMAKE_EXE_LINKER_FLAGS variable may be needed in some cases too,
1151       but CMake 3.1 and lower did not set it in the generated project.  CMake
1152       3.2 and above prefer to set it so that linker flags are honored as well
1153       as compiler flags.  This policy provides compatibility with the pre-3.2
1154       behavior.
1155
1156       The  OLD  behavior  for  this  policy  is  to  not set the value of the
1157       CMAKE_EXE_LINKER_FLAGS variable in the generated test project.  The NEW
1158       behavior   for   this   policy   is   to   set   the   value   of   the
1159       CMAKE_EXE_LINKER_FLAGS variable in the test project to the same  as  it
1160       is in the calling project.
1161
1162       If  the  project code does not set the policy explicitly, users may set
1163       it on the command line  by  defining  the  CMAKE_POLICY_DEFAULT_CMP0056
1164       variable in the cache.
1165
1166       This policy was introduced in CMake version 3.2.  Unlike most policies,
1167       CMake version 3.14.5 does not warn by default when this policy  is  not
1168       set  and simply uses OLD behavior.  See documentation of the CMAKE_POL‐
1169       ICY_WARNING_CMP0056 variable to control the warning.
1170
1171       NOTE:
1172          The OLD behavior of a policy is deprecated by definition and may  be
1173          removed in a future version of CMake.
1174
1175   CMP0055
1176       Strict checking for the break() command.
1177
1178       CMake  3.1  and lower allowed calls to the break() command outside of a
1179       loop context and also ignored any given arguments.  This was  undefined
1180       behavior.
1181
1182       The  OLD behavior for this policy is to allow break() to be placed out‐
1183       side of loop contexts and ignores any arguments.  The NEW behavior  for
1184       this  policy is to issue an error if a misplaced break or any arguments
1185       are found.
1186
1187       This policy was introduced in CMake version 3.2.  CMake version  3.14.5
1188       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1189       cmake_policy command to set it to OLD or NEW explicitly.
1190
1191       NOTE:
1192          The OLD behavior of a policy is deprecated by definition and may  be
1193          removed in a future version of CMake.
1194

POLICIES INTRODUCED BY CMAKE 3.1

1196   CMP0054
1197       Only interpret if() arguments as variables or keywords when unquoted.
1198
1199       CMake  3.1  and  above  no  longer  implicitly dereference variables or
1200       interpret keywords in an if() command argument  when  it  is  a  Quoted
1201       Argument or a Bracket Argument.
1202
1203       The OLD behavior for this policy is to dereference variables and inter‐
1204       pret keywords even if they are quoted or bracketed.  The  NEW  behavior
1205       is  to  not  dereference variables or interpret keywords that have been
1206       quoted or bracketed.
1207
1208       Given the following partial example:
1209
1210          set(A E)
1211          set(E "")
1212
1213          if("${A}" STREQUAL "")
1214            message("Result is TRUE before CMake 3.1 or when CMP0054 is OLD")
1215          else()
1216            message("Result is FALSE in CMake 3.1 and above if CMP0054 is NEW")
1217          endif()
1218
1219       After explicit expansion of variables this gives:
1220
1221          if("E" STREQUAL "")
1222
1223       With the policy set to OLD implicit expansion reduces this semantically
1224       to:
1225
1226          if("" STREQUAL "")
1227
1228       With  the  policy  set  to NEW the quoted arguments will not be further
1229       dereferenced:
1230
1231          if("E" STREQUAL "")
1232
1233       This policy was introduced in CMake version 3.1.  CMake version  3.14.5
1234       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1235       cmake_policy() command to set it to OLD or NEW explicitly.
1236
1237       NOTE:
1238          The OLD behavior of a policy is deprecated by definition and may  be
1239          removed in a future version of CMake.
1240
1241   CMP0053
1242       Simplify variable reference and escape sequence evaluation.
1243
1244       CMake  3.1 introduced a much faster implementation of evaluation of the
1245       Variable References and Escape Sequences documented in  the  cmake-lan‐
1246       guage(7)  manual.  While the behavior is identical to the legacy imple‐
1247       mentation in most cases, some corner cases were cleaned up to  simplify
1248       the behavior.  Specifically:
1249
1250       · Expansion  of  @VAR@ reference syntax defined by the configure_file()
1251         and string(CONFIGURE) commands is no longer performed in  other  con‐
1252         texts.
1253
1254       · Literal ${VAR} reference syntax may contain only alphanumeric charac‐
1255         ters (A-Z, a-z, 0-9) and the characters _, ., /, -, and +.  Note that
1256         $  is technically allowed in the NEW behavior, but is invalid for OLD
1257         behavior.  This is due to an oversight during the  implementation  of
1258         CMP0053  and  its  use as a literal variable reference is discouraged
1259         for this reason.  Variables with other characters in their  name  may
1260         still be referenced indirectly, e.g.
1261
1262            set(varname "otherwise & disallowed $ characters")
1263            message("${${varname}}")
1264
1265       · The setting of policy CMP0010 is not considered, so improper variable
1266         reference syntax is always an error.
1267
1268       · More characters are allowed to be escaped in variable names.   Previ‐
1269         ously,  only  ()#"  \@^  were  valid  characters  to  escape. Now any
1270         non-alphanumeric, non-semicolon, non-NUL  character  may  be  escaped
1271         following the escape_identity production in the Escape Sequences sec‐
1272         tion of the cmake-language(7) manual.
1273
1274       The OLD behavior for this policy is to honor the  legacy  behavior  for
1275       variable  references  and escape sequences.  The NEW behavior is to use
1276       the simpler variable expansion and escape sequence evaluation rules.
1277
1278       This policy was introduced in CMake version 3.1.  CMake version  3.14.5
1279       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1280       cmake_policy() command to set it to OLD or NEW explicitly.
1281
1282       NOTE:
1283          The OLD behavior of a policy is deprecated by definition and may  be
1284          removed in a future version of CMake.
1285
1286   CMP0052
1287       Reject  source  and  build dirs in installed INTERFACE_INCLUDE_DIRECTO‐
1288       RIES.
1289
1290       CMake 3.0 and lower allowed subdirectories of the source  directory  or
1291       build directory to be in the INTERFACE_INCLUDE_DIRECTORIES of installed
1292       and exported targets, if the directory was also a subdirectory  of  the
1293       installation  prefix.   This makes the installation depend on the exis‐
1294       tence of the source dir or binary dir, and  the  installation  will  be
1295       broken if either are removed after installation.
1296
1297       See  Include  Directories and Usage Requirements for more on specifying
1298       include directories for targets.
1299
1300       The OLD behavior for this policy is to export the content of the INTER‐
1301       FACE_INCLUDE_DIRECTORIES  with the source or binary directory.  The NEW
1302       behavior for this policy is to issue an error if such  a  directory  is
1303       used.
1304
1305       This  policy was introduced in CMake version 3.1.  CMake version 3.14.5
1306       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1307       cmake_policy() command to set it to OLD or NEW explicitly.
1308
1309       NOTE:
1310          The  OLD behavior of a policy is deprecated by definition and may be
1311          removed in a future version of CMake.
1312
1313   CMP0051
1314       List TARGET_OBJECTS in SOURCES target property.
1315
1316       CMake 3.0 and  lower  did  not  include  the  TARGET_OBJECTS  generator
1317       expression when returning the SOURCES target property.
1318
1319       Configure-time  CMake code is not able to handle generator expressions.
1320       If using the SOURCES target property at configure time, it may be  nec‐
1321       essary    to    first    remove   generator   expressions   using   the
1322       string(GENEX_STRIP)  command.   Generate-time  CMake   code   such   as
1323       file(GENERATE) can handle the content without stripping.
1324
1325       The  OLD behavior for this policy is to omit TARGET_OBJECTS expressions
1326       from the SOURCES target property.  The NEW behavior for this policy  is
1327       to include TARGET_OBJECTS expressions in the output.
1328
1329       This  policy was introduced in CMake version 3.1.  CMake version 3.14.5
1330       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1331       cmake_policy() command to set it to OLD or NEW explicitly.
1332
1333       NOTE:
1334          The  OLD behavior of a policy is deprecated by definition and may be
1335          removed in a future version of CMake.
1336

POLICIES INTRODUCED BY CMAKE 3.0

1338   CMP0050
1339       Disallow add_custom_command SOURCE signatures.
1340
1341       CMake 2.8.12 and lower allowed  a  signature  for  add_custom_command()
1342       which specified an input to a command.  This was undocumented behavior.
1343       Modern use of CMake  associates  custom  commands  with  their  output,
1344       rather than their input.
1345
1346       The OLD behavior for this policy is to allow the use of add_custom_com‐
1347       mand() SOURCE signatures.  The NEW behavior for this policy is to issue
1348       an error if such a signature is used.
1349
1350       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1351       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1352       cmake_policy command to set it to OLD or NEW explicitly.
1353
1354       NOTE:
1355          The  OLD behavior of a policy is deprecated by definition and may be
1356          removed in a future version of CMake.
1357
1358   CMP0049
1359       Do not expand variables in target source entries.
1360
1361       CMake 2.8.12 and lower performed an extra layer of  variable  expansion
1362       when evaluating source file names:
1363
1364          set(a_source foo.c)
1365          add_executable(foo \${a_source})
1366
1367       This was undocumented behavior.
1368
1369       The  OLD behavior for this policy is to expand such variables when pro‐
1370       cessing the target sources.  The NEW behavior for  this  policy  is  to
1371       issue an error if such variables need to be expanded.
1372
1373       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1374       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1375       cmake_policy command to set it to OLD or NEW explicitly.
1376
1377       NOTE:
1378          The  OLD behavior of a policy is deprecated by definition and may be
1379          removed in a future version of CMake.
1380
1381   CMP0048
1382       The project() command manages VERSION variables.
1383
1384       CMake version 3.0 introduced the VERSION option of the  project()  com‐
1385       mand  to  specify  a  project version as well as the name.  In order to
1386       keep PROJECT_VERSION and related  variables  consistent  with  variable
1387       PROJECT_NAME  it is necessary to set the VERSION variables to the empty
1388       string when no VERSION is given to project().  However, this can change
1389       behavior  for  existing  projects that set VERSION variables themselves
1390       since project() may now clear them.  This policy controls the  behavior
1391       for compatibility with such projects.
1392
1393       The  OLD  behavior  for  this  policy  is  to  leave  VERSION variables
1394       untouched.  The NEW behavior for this policy is to set VERSION as docu‐
1395       mented by the project() command.
1396
1397       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1398       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1399       cmake_policy command to set it to OLD or NEW explicitly.
1400
1401       NOTE:
1402          The  OLD behavior of a policy is deprecated by definition and may be
1403          removed in a future version of CMake.
1404
1405   CMP0047
1406       Use QCC compiler id for the qcc drivers on QNX.
1407
1408       CMake 3.0 and above recognize that the QNX qcc compiler driver is  dif‐
1409       ferent  from  the  GNU  compiler.  CMake now prefers to present this to
1410       projects  by  setting  the  CMAKE_<LANG>_COMPILER_ID  variable  to  QCC
1411       instead  of GNU.  However, existing projects may assume the compiler id
1412       for QNX qcc is just GNU as it was  in  CMake  versions  prior  to  3.0.
1413       Therefore  this  policy  determines  for  QNX  qcc which compiler id to
1414       report in the CMAKE_<LANG>_COMPILER_ID variable after  language  <LANG>
1415       is  enabled  by the project() or enable_language() command.  The policy
1416       must be set prior to the invocation of either command.
1417
1418       The OLD behavior for this policy is to use the GNU compiler id for  the
1419       qcc  and  QCC  compiler drivers. The NEW behavior for this policy is to
1420       use the QCC compiler id for those drivers.
1421
1422       This policy was introduced in CMake version 3.0.   Use  the  cmake_pol‐
1423       icy() command to set this policy to OLD or NEW explicitly.  Unlike most
1424       policies, CMake version 3.14.5 does not warn by default when this  pol‐
1425       icy  is not set and simply uses OLD behavior.  See documentation of the
1426       CMAKE_POLICY_WARNING_CMP0047 variable to control the warning.
1427
1428       NOTE:
1429          The OLD behavior of a policy is deprecated by definition and may  be
1430          removed in a future version of CMake.
1431
1432   CMP0046
1433       Error on non-existent dependency in add_dependencies.
1434
1435       CMake  2.8.12  and  lower  silently  ignored  non-existent dependencies
1436       listed in the add_dependencies() command.
1437
1438       The OLD behavior for this policy is  to  silently  ignore  non-existent
1439       dependencies. The NEW behavior for this policy is to report an error if
1440       non-existent dependencies are listed in the add_dependencies() command.
1441
1442       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1443       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1444       cmake_policy command to set it to OLD or NEW explicitly.
1445
1446       NOTE:
1447          The OLD behavior of a policy is deprecated by definition and may  be
1448          removed in a future version of CMake.
1449
1450   CMP0045
1451       Error on non-existent target in get_target_property.
1452
1453       In CMake 2.8.12 and lower, the get_target_property() command accepted a
1454       non-existent target argument without issuing any error or warning.  The
1455       result variable is set to a -NOTFOUND value.
1456
1457       The  OLD  behavior  for  this policy is to issue no warning and set the
1458       result variable to a -NOTFOUND value.  The NEW behavior for this policy
1459       is  to issue a FATAL_ERROR if the command is called with a non-existent
1460       target.
1461
1462       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1463       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1464       cmake_policy command to set it to OLD or NEW explicitly.
1465
1466       NOTE:
1467          The OLD behavior of a policy is deprecated by definition and may  be
1468          removed in a future version of CMake.
1469
1470   CMP0044
1471       Case sensitive <LANG>_COMPILER_ID generator expressions
1472
1473       CMake 2.8.12 introduced the <LANG>_COMPILER_ID generator expressions to
1474       allow comparison of the CMAKE_<LANG>_COMPILER_ID  with  a  test  value.
1475       The  possible  valid  values are lowercase, but the comparison with the
1476       test value was performed case-insensitively.
1477
1478       The OLD behavior for this policy is to perform a case-insensitive  com‐
1479       parison  with  the  value in the <LANG>_COMPILER_ID expression. The NEW
1480       behavior for this policy is to perform a case-sensitive comparison with
1481       the value in the <LANG>_COMPILER_ID expression.
1482
1483       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1484       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1485       cmake_policy command to set it to OLD or NEW explicitly.
1486
1487       NOTE:
1488          The  OLD behavior of a policy is deprecated by definition and may be
1489          removed in a future version of CMake.
1490
1491   CMP0043
1492       Ignore COMPILE_DEFINITIONS_<Config> properties
1493
1494       CMake 2.8.12 and lower allowed setting the COMPILE_DEFINITIONS_<CONFIG>
1495       target  property and COMPILE_DEFINITIONS_<CONFIG> directory property to
1496       apply configuration-specific compile definitions.
1497
1498       Since CMake 2.8.10, the COMPILE_DEFINITIONS property has supported gen‐
1499       erator  expressions  for  setting configuration-dependent content.  The
1500       continued existence of the suffixed variables is redundant, and  causes
1501       a  maintenance  burden.   Population  of  the COMPILE_DEFINITIONS_DEBUG
1502       property may be  replaced  with  a  population  of  COMPILE_DEFINITIONS
1503       directly or via target_compile_definitions():
1504
1505          # Old Interfaces:
1506          set_property(TARGET tgt APPEND PROPERTY
1507            COMPILE_DEFINITIONS_DEBUG DEBUG_MODE
1508          )
1509          set_property(DIRECTORY APPEND PROPERTY
1510            COMPILE_DEFINITIONS_DEBUG DIR_DEBUG_MODE
1511          )
1512
1513          # New Interfaces:
1514          set_property(TARGET tgt APPEND PROPERTY
1515            COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG_MODE>
1516          )
1517          target_compile_definitions(tgt PRIVATE $<$<CONFIG:Debug>:DEBUG_MODE>)
1518          set_property(DIRECTORY APPEND PROPERTY
1519            COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DIR_DEBUG_MODE>
1520          )
1521
1522       The  OLD behavior for this policy is to consume the content of the suf‐
1523       fixed COMPILE_DEFINITIONS_<CONFIG> target property when generating  the
1524       compilation  command. The NEW behavior for this policy is to ignore the
1525       content of the COMPILE_DEFINITIONS_<CONFIG> target property .
1526
1527       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1528       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1529       cmake_policy command to set it to OLD or NEW explicitly.
1530
1531       NOTE:
1532          The OLD behavior of a policy is deprecated by definition and may  be
1533          removed in a future version of CMake.
1534
1535   CMP0042
1536       MACOSX_RPATH is enabled by default.
1537
1538       CMake  2.8.12  and  newer  has  support  for using @rpath in a target’s
1539       install  name.   This  was  enabled  by  setting  the  target  property
1540       MACOSX_RPATH.   The  @rpath  in  an install name is a more flexible and
1541       powerful mechanism than @executable_path or @loader_path  for  locating
1542       shared libraries.
1543
1544       CMake 3.0 and later prefer this property to be ON by default.  Projects
1545       wanting @rpath in a target’s install name may remove any setting of the
1546       INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables.
1547
1548       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1549       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1550       cmake_policy command to set it to OLD or NEW explicitly.
1551
1552       NOTE:
1553          The  OLD behavior of a policy is deprecated by definition and may be
1554          removed in a future version of CMake.
1555
1556   CMP0041
1557       Error on relative include with generator expression.
1558
1559       Diagnostics in CMake 2.8.12 and lower silently ignored an entry in  the
1560       INTERFACE_INCLUDE_DIRECTORIES  of  a target if it contained a generator
1561       expression at any position.
1562
1563       The path entries in  that  target  property  should  not  be  relative.
1564       High-level  API  should ensure that by adding either a source directory
1565       or a install directory prefix, as appropriate.
1566
1567       As an additional diagnostic, the  INTERFACE_INCLUDE_DIRECTORIES  gener‐
1568       ated  on an IMPORTED target for the install location should not contain
1569       paths in the source directory or the build directory.
1570
1571       The OLD behavior for this policy is to ignore relative path entries  if
1572       they  contain  a generator expression. The NEW behavior for this policy
1573       is to report an error if a  generator  expression  appears  in  another
1574       location and the path is relative.
1575
1576       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1577       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1578       cmake_policy command to set it to OLD or NEW explicitly.
1579
1580       NOTE:
1581          The  OLD behavior of a policy is deprecated by definition and may be
1582          removed in a future version of CMake.
1583
1584   CMP0040
1585       The target in the TARGET signature of add_custom_command()  must  exist
1586       and must be defined in the current directory.
1587
1588       CMake  2.8.12  and lower silently ignored a custom command created with
1589       the TARGET signature of add_custom_command() if the target  is  unknown
1590       or was defined outside the current directory.
1591
1592       The  OLD  behavior  for  this  policy  is to ignore custom commands for
1593       unknown targets.  The NEW behavior for this  policy  is  to  report  an
1594       error  if  the  target referenced in add_custom_command() is unknown or
1595       was defined outside the current directory.
1596
1597       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1598       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1599       cmake_policy() command to set it to OLD or NEW explicitly.
1600
1601       NOTE:
1602          The OLD behavior of a policy is deprecated by definition and may  be
1603          removed in a future version of CMake.
1604
1605   CMP0039
1606       Utility targets may not have link dependencies.
1607
1608       CMake  2.8.12  and lower allowed using utility targets in the left hand
1609       side position of the target_link_libraries() command. This is an  indi‐
1610       cator of a bug in user code.
1611
1612       The  OLD behavior for this policy is to ignore attempts to set the link
1613       libraries of utility targets.  The NEW behavior for this policy  is  to
1614       report  an  error  if an attempt is made to set the link libraries of a
1615       utility target.
1616
1617       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1618       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1619       cmake_policy command to set it to OLD or NEW explicitly.
1620
1621       NOTE:
1622          The OLD behavior of a policy is deprecated by definition and may  be
1623          removed in a future version of CMake.
1624
1625   CMP0038
1626       Targets may not link directly to themselves.
1627
1628       CMake  2.8.12  and  lower  allowed  a  build  target  to link to itself
1629       directly with a target_link_libraries() call. This is an indicator of a
1630       bug in user code.
1631
1632       The  OLD behavior for this policy is to ignore targets which list them‐
1633       selves in their own link implementation.  The  NEW  behavior  for  this
1634       policy is to report an error if a target attempts to link to itself.
1635
1636       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1637       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1638       cmake_policy command to set it to OLD or NEW explicitly.
1639
1640       NOTE:
1641          The  OLD behavior of a policy is deprecated by definition and may be
1642          removed in a future version of CMake.
1643
1644   CMP0037
1645       Target names should not be reserved and should match  a  validity  pat‐
1646       tern.
1647
1648       CMake  2.8.12  and  lower allowed creating targets using add_library(),
1649       add_executable() and add_custom_target() with unrestricted  choice  for
1650       the  target name.  Newer cmake features such as cmake-generator-expres‐
1651       sions(7) and some diagnostics expect target names to match a restricted
1652       pattern.
1653
1654       Target  names  may  contain  upper and lower case letters, numbers, the
1655       underscore character (_), dot(.), plus(+) and minus(-).  As  a  special
1656       case,  ALIAS  targets  and IMPORTED targets may contain two consecutive
1657       colons.
1658
1659       Target names reserved by one or more CMake generators are not  allowed.
1660       Among others these include “all”, “clean”, “help”, and “install”.
1661
1662       Target  names  associated  with  optional  features, such as “test” and
1663       “package”, may also be reserved.  CMake 3.10 and below  always  reserve
1664       them.   CMake  3.11  and above reserve them only when the corresponding
1665       feature is enabled (e.g. by including the CTest or CPack modules).
1666
1667       The OLD behavior for this policy is  to  allow  creating  targets  with
1668       reserved  names  or  which  do not match the validity pattern.  The NEW
1669       behavior for this policy is to report an error if an add_*  command  is
1670       used with an invalid target name.
1671
1672       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1673       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1674       cmake_policy command to set it to OLD or NEW explicitly.
1675
1676       NOTE:
1677          The  OLD behavior of a policy is deprecated by definition and may be
1678          removed in a future version of CMake.
1679
1680   CMP0036
1681       The build_name() command should not be called.
1682
1683       This command was added in May 2001 to compute a name  for  the  current
1684       operating  system  and compiler combination.  The command has long been
1685       documented  as  discouraged  and  replaced  by  the  CMAKE_SYSTEM   and
1686       CMAKE_<LANG>_COMPILER variables.
1687
1688       CMake  >= 3.0 prefer that this command never be called.  The OLD behav‐
1689       ior for this policy is to allow the command  to  be  called.   The  NEW
1690       behavior  for this policy is to issue a FATAL_ERROR when the command is
1691       called.
1692
1693       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1694       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1695       cmake_policy command to set it to OLD or NEW explicitly.
1696
1697       NOTE:
1698          The OLD behavior of a policy is deprecated by definition and may  be
1699          removed in a future version of CMake.
1700
1701   CMP0035
1702       The variable_requires() command should not be called.
1703
1704       This  command  was  introduced  in November 2001 to perform some condi‐
1705       tional logic.  It has long been replaced by the if() command.
1706
1707       CMake >= 3.0 prefer that this command never be called.  The OLD  behav‐
1708       ior  for  this  policy  is  to allow the command to be called.  The NEW
1709       behavior for this policy is to issue a FATAL_ERROR when the command  is
1710       called.
1711
1712       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1713       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1714       cmake_policy command to set it to OLD or NEW explicitly.
1715
1716       NOTE:
1717          The  OLD behavior of a policy is deprecated by definition and may be
1718          removed in a future version of CMake.
1719
1720   CMP0034
1721       The utility_source() command should not be called.
1722
1723       This command was introduced in March 2001  to  help  build  executables
1724       used  to generate other files.  This approach has long been replaced by
1725       add_executable() combined with add_custom_command().
1726
1727       CMake >= 3.0 prefer that this command never be called.  The OLD  behav‐
1728       ior  for  this  policy  is  to allow the command to be called.  The NEW
1729       behavior for this policy is to issue a FATAL_ERROR when the command  is
1730       called.
1731
1732       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1733       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1734       cmake_policy command to set it to OLD or NEW explicitly.
1735
1736       NOTE:
1737          The  OLD behavior of a policy is deprecated by definition and may be
1738          removed in a future version of CMake.
1739
1740   CMP0033
1741       The export_library_dependencies() command should not be called.
1742
1743       This command was added in  January  2003  to  export  <tgt>_LIB_DEPENDS
1744       internal CMake cache entries to a file for installation with a project.
1745       This was used at the time to allow transitive link dependencies to work
1746       for  applications outside of the original build tree of a project.  The
1747       functionality has been superseded by the export()  and  install(EXPORT)
1748       commands.
1749
1750       CMake  >= 3.0 prefer that this command never be called.  The OLD behav‐
1751       ior for this policy is to allow the command  to  be  called.   The  NEW
1752       behavior  for this policy is to issue a FATAL_ERROR when the command is
1753       called.
1754
1755       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1756       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1757       cmake_policy command to set it to OLD or NEW explicitly.
1758
1759       NOTE:
1760          The OLD behavior of a policy is deprecated by definition and may  be
1761          removed in a future version of CMake.
1762
1763   CMP0032
1764       The output_required_files() command should not be called.
1765
1766       This  command  was  added in June 2001 to expose the then-current CMake
1767       implicit dependency scanner.  CMake’s real implicit dependency  scanner
1768       has  evolved  since  then but is not exposed through this command.  The
1769       scanning capabilities of this command are very limited and  this  func‐
1770       tionality is better achieved through dedicated outside tools.
1771
1772       CMake  >= 3.0 prefer that this command never be called.  The OLD behav‐
1773       ior for this policy is to allow the command  to  be  called.   The  NEW
1774       behavior  for this policy is to issue a FATAL_ERROR when the command is
1775       called.
1776
1777       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1778       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1779       cmake_policy command to set it to OLD or NEW explicitly.
1780
1781       NOTE:
1782          The OLD behavior of a policy is deprecated by definition and may  be
1783          removed in a future version of CMake.
1784
1785   CMP0031
1786       The load_command() command should not be called.
1787
1788       This  command  was  added in August 2002 to allow projects to add arbi‐
1789       trary commands implemented in C or C++.  However, it does not work when
1790       the  toolchain  in use does not match the ABI of the CMake process.  It
1791       has been mostly superseded by the macro() and function() commands.
1792
1793       CMake >= 3.0 prefer that this command never be called.  The OLD  behav‐
1794       ior  for  this  policy  is  to allow the command to be called.  The NEW
1795       behavior for this policy is to issue a FATAL_ERROR when the command  is
1796       called.
1797
1798       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1799       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1800       cmake_policy command to set it to OLD or NEW explicitly.
1801
1802       NOTE:
1803          The  OLD behavior of a policy is deprecated by definition and may be
1804          removed in a future version of CMake.
1805
1806   CMP0030
1807       The use_mangled_mesa() command should not be called.
1808
1809       This command was created in September 2001 to support VTK before modern
1810       CMake language and custom command capabilities.  VTK has not used it in
1811       years.
1812
1813       CMake >= 3.0 prefer that this command never be called.  The OLD  behav‐
1814       ior  for  this  policy  is  to allow the command to be called.  The NEW
1815       behavior for this policy is to issue a FATAL_ERROR when the command  is
1816       called.
1817
1818       This  policy was introduced in CMake version 3.0.  CMake version 3.14.5
1819       warns when the policy is not  set  and  uses  OLD  behavior.   Use  the
1820       cmake_policy command to set it to OLD or NEW explicitly.
1821
1822       NOTE:
1823          The  OLD behavior of a policy is deprecated by definition and may be
1824          removed in a future version of CMake.
1825
1826   CMP0029
1827       The subdir_depends() command should not be called.
1828
1829       The implementation of this command has been empty since  December  2001
1830       but was kept in CMake for compatibility for a long time.
1831
1832       CMake  >= 3.0 prefer that this command never be called.  The OLD behav‐
1833       ior for this policy is to allow the command  to  be  called.   The  NEW
1834       behavior  for this policy is to issue a FATAL_ERROR when the command is
1835       called.
1836
1837       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1838       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1839       cmake_policy command to set it to OLD or NEW explicitly.
1840
1841       NOTE:
1842          The OLD behavior of a policy is deprecated by definition and may  be
1843          removed in a future version of CMake.
1844
1845   CMP0028
1846       Double colon in target name means ALIAS or IMPORTED target.
1847
1848       CMake 2.8.12 and lower allowed the use of targets and files with double
1849       colons in target_link_libraries, with some buildsystem generators.
1850
1851       The use of double-colons is a common pattern used to namespace IMPORTED
1852       targets  and  ALIAS targets.  When computing the link dependencies of a
1853       target, the name of each dependency could either be a target, or a file
1854       on  disk.   Previously, if a target was not found with a matching name,
1855       the name was considered to refer to a file on disk.  This can  lead  to
1856       confusing  error messages if there is a typo in what should be a target
1857       name.
1858
1859       The OLD behavior for this policy is to search for targets,  then  files
1860       on  disk,  even  if  the  search  term contains double-colons.  The NEW
1861       behavior for this policy is to issue a FATAL_ERROR if a link dependency
1862       contains  double-colons  but is not an IMPORTED target or an ALIAS tar‐
1863       get.
1864
1865       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1866       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1867       cmake_policy command to set it to OLD or NEW explicitly.
1868
1869       NOTE:
1870          The OLD behavior of a policy is deprecated by definition and may  be
1871          removed in a future version of CMake.
1872
1873   CMP0027
1874       Conditionally linked imported targets with missing include directories.
1875
1876       CMake    2.8.11   introduced   introduced   the   concept   of   INTER‐
1877       FACE_INCLUDE_DIRECTORIES, and a check at cmake time that the entries in
1878       the INTERFACE_INCLUDE_DIRECTORIES of an IMPORTED target actually exist.
1879       CMake 2.8.11 also introduced generator expression support in  the  tar‐
1880       get_link_libraries  command.   However, if an imported target is linked
1881       as a result of a generator expression evaluation, the  entries  in  the
1882       INTERFACE_INCLUDE_DIRECTORIES of that target were not checked for exis‐
1883       tence as they should be.
1884
1885       The OLD behavior of this policy is to report a warning if an  entry  in
1886       the  INTERFACE_INCLUDE_DIRECTORIES of a generator-expression condition‐
1887       ally linked IMPORTED target does not exist.
1888
1889       The NEW behavior of this policy is to report an error if  an  entry  in
1890       the  INTERFACE_INCLUDE_DIRECTORIES of a generator-expression condition‐
1891       ally linked IMPORTED target does not exist.
1892
1893       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1894       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1895       cmake_policy command to set it to OLD or NEW explicitly.
1896
1897       NOTE:
1898          The OLD behavior of a policy is deprecated by definition and may  be
1899          removed in a future version of CMake.
1900
1901   CMP0026
1902       Disallow use of the LOCATION property for build targets.
1903
1904       CMake  2.8.12  and  lower  allowed reading the LOCATION target property
1905       (and configuration-specific variants) to determine the  eventual  loca‐
1906       tion  of  build targets.  This relies on the assumption that all neces‐
1907       sary information is available at configure-time to determine the  final
1908       location  and  filename  of  the target.  However, this property is not
1909       fully determined until later at generate-time.  At generate  time,  the
1910       $<TARGET_FILE>  generator expression can be used to determine the even‐
1911       tual LOCATION of a target output.
1912
1913       Code which reads the LOCATION target property can be ported to use  the
1914       $<TARGET_FILE>  generator  expression  together with the file(GENERATE)
1915       subcommand to generate a file containing the target location.
1916
1917       The OLD behavior for this policy is to allow reading the LOCATION prop‐
1918       erties  from build-targets.  The NEW behavior for this policy is to not
1919       to allow reading the LOCATION properties from build-targets.
1920
1921       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1922       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1923       cmake_policy command to set it to OLD or NEW explicitly.
1924
1925       NOTE:
1926          The OLD behavior of a policy is deprecated by definition and may  be
1927          removed in a future version of CMake.
1928
1929   CMP0025
1930       Compiler id for Apple Clang is now AppleClang.
1931
1932       CMake  3.0 and above recognize that Apple Clang is a different compiler
1933       than upstream Clang and  that  they  have  different  version  numbers.
1934       CMake   now  prefers  to  present  this  to  projects  by  setting  the
1935       CMAKE_<LANG>_COMPILER_ID variable to AppleClang instead of Clang.  How‐
1936       ever,  existing  projects may assume the compiler id for Apple Clang is
1937       just Clang as it was in CMake versions prior to  3.0.   Therefore  this
1938       policy  determines  for  Apple Clang which compiler id to report in the
1939       CMAKE_<LANG>_COMPILER_ID variable after language <LANG> is  enabled  by
1940       the  project()  or  enable_language()  command.  The policy must be set
1941       prior to the invocation of either command.
1942
1943       The OLD behavior for this policy is to use compiler id Clang.  The  NEW
1944       behavior for this policy is to use compiler id AppleClang.
1945
1946       This  policy  was  introduced in CMake version 3.0.  Use the cmake_pol‐
1947       icy() command to set this policy to OLD or NEW explicitly.  Unlike most
1948       policies,  CMake version 3.14.5 does not warn by default when this pol‐
1949       icy is not set and simply uses OLD behavior.  See documentation of  the
1950       CMAKE_POLICY_WARNING_CMP0025 variable to control the warning.
1951
1952       NOTE:
1953          The  OLD behavior of a policy is deprecated by definition and may be
1954          removed in a future version of CMake.
1955
1956   CMP0024
1957       Disallow include export result.
1958
1959       CMake 2.8.12 and lower allowed use of the include()  command  with  the
1960       result of the export() command.  This relies on the assumption that the
1961       export() command has an immediate effect  at  configure-time  during  a
1962       cmake  run.   Certain  properties  of  targets are not fully determined
1963       until later at generate-time, such as the link  language  and  complete
1964       list  of  link libraries.  Future refactoring will change the effect of
1965       the export() command to be executed at generate-time.  Use  ALIAS  tar‐
1966       gets  instead in cases where the goal is to refer to targets by another
1967       name.
1968
1969       The OLD behavior for this policy is to allow including the result of an
1970       export()  command.   The  NEW  behavior for this policy is not to allow
1971       including the result of an export() command.
1972
1973       This policy was introduced in CMake version 3.0.  CMake version  3.14.5
1974       warns  when  the  policy  is  not  set  and uses OLD behavior.  Use the
1975       cmake_policy command to set it to OLD or NEW explicitly.
1976
1977       NOTE:
1978          The OLD behavior of a policy is deprecated by definition and may  be
1979          removed in a future version of CMake.
1980

POLICIES INTRODUCED BY CMAKE 2.8

1982   CMP0023
1983       Plain and keyword target_link_libraries signatures cannot be mixed.
1984
1985       CMake  2.8.12  introduced the target_link_libraries signature using the
1986       PUBLIC, PRIVATE, and INTERFACE keywords to generalize  the  LINK_PUBLIC
1987       and LINK_PRIVATE keywords introduced in CMake 2.8.7.  Use of signatures
1988       with any of these keywords sets the link interface of a target  explic‐
1989       itly,  even  if  empty.   This produces confusing behavior when used in
1990       combination  with  the  historical   behavior   of   the   plain   tar‐
1991       get_link_libraries signature.  For example, consider the code:
1992
1993          target_link_libraries(mylib A)
1994          target_link_libraries(mylib PRIVATE B)
1995
1996       After  the first line the link interface has not been set explicitly so
1997       CMake would use the link implementation,  A,  as  the  link  interface.
1998       However, the second line sets the link interface to empty.  In order to
1999       avoid this subtle behavior CMake now prefers  to  disallow  mixing  the
2000       plain and keyword signatures of target_link_libraries for a single tar‐
2001       get.
2002
2003       The OLD behavior for this policy is to allow  keyword  and  plain  tar‐
2004       get_link_libraries  signatures  to be mixed.  The NEW behavior for this
2005       policy is to not to allow mixing of the keyword and plain signatures.
2006
2007       This policy was introduced in  CMake  version  2.8.12.   CMake  version
2008       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2009       cmake_policy command to set it to OLD or NEW explicitly.
2010
2011       NOTE:
2012          The OLD behavior of a policy is deprecated by definition and may  be
2013          removed in a future version of CMake.
2014
2015   CMP0022
2016       INTERFACE_LINK_LIBRARIES defines the link interface.
2017
2018       CMake  2.8.11 constructed the ‘link interface’ of a target from proper‐
2019       ties  matching  (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.   The
2020       modern  way  to  specify  config-sensitive  content is to use generator
2021       expressions and the IMPORTED_ prefix makes uniform  processing  of  the
2022       link  interface  with  generator  expressions  impossible.   The INTER‐
2023       FACE_LINK_LIBRARIES target property was introduced as a replacement  in
2024       CMake  2.8.12.  This new property is named consistently with the INTER‐
2025       FACE_COMPILE_DEFINITIONS,  INTERFACE_INCLUDE_DIRECTORIES   and   INTER‐
2026       FACE_COMPILE_OPTIONS  properties.  For in-build targets, CMake will use
2027       the INTERFACE_LINK_LIBRARIES property as the source of the link  inter‐
2028       face  only if policy CMP0022 is NEW.  When exporting a target which has
2029       this policy set to NEW, only the INTERFACE_LINK_LIBRARIES property will
2030       be  processed  and generated for the IMPORTED target by default.  A new
2031       option to the install(EXPORT) and export commands allows export of  the
2032       old-style  properties  for compatibility with downstream users of CMake
2033       versions older than 2.8.12.  The target_link_libraries command will  no
2034       longer populate the properties matching LINK_INTERFACE_LIBRARIES(_<CON‐
2035       FIG>)? if this policy is NEW.
2036
2037       Warning-free  future-compatible  code  which  works  with  CMake  2.8.7
2038       onwards  can  be written by using the LINK_PRIVATE and LINK_PUBLIC key‐
2039       words of target_link_libraries().
2040
2041       The  OLD  behavior  for  this  policy   is   to   ignore   the   INTER‐
2042       FACE_LINK_LIBRARIES  property  for  in-build targets.  The NEW behavior
2043       for this policy is to use  the  INTERFACE_LINK_LIBRARIES  property  for
2044       in-build    targets,   and   ignore   the   old   properties   matching
2045       (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.
2046
2047       This policy was introduced in  CMake  version  2.8.12.   CMake  version
2048       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2049       cmake_policy command to set it to OLD or NEW explicitly.
2050
2051       NOTE:
2052          The OLD behavior of a policy is deprecated by definition and may  be
2053          removed in a future version of CMake.
2054
2055   CMP0021
2056       Fatal error on relative paths in INCLUDE_DIRECTORIES target property.
2057
2058       CMake  2.8.10.2  and lower allowed the INCLUDE_DIRECTORIES target prop‐
2059       erty to contain relative  paths.   The  base  path  for  such  relative
2060       entries  is not well defined.  CMake 2.8.12 issues a FATAL_ERROR if the
2061       INCLUDE_DIRECTORIES property contains a relative path.
2062
2063       The OLD behavior for this policy is not to warn about relative paths in
2064       the  INCLUDE_DIRECTORIES  target  property.   The NEW behavior for this
2065       policy is to issue a FATAL_ERROR if INCLUDE_DIRECTORIES contains a rel‐
2066       ative path.
2067
2068       This  policy  was  introduced  in  CMake version 2.8.12.  CMake version
2069       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2070       cmake_policy command to set it to OLD or NEW explicitly.
2071
2072       NOTE:
2073          The  OLD behavior of a policy is deprecated by definition and may be
2074          removed in a future version of CMake.
2075
2076   CMP0020
2077       Automatically link Qt executables to qtmain target on Windows.
2078
2079       CMake 2.8.10 and lower required users of Qt to always  specify  a  link
2080       dependency to the qtmain.lib static library manually on Windows.  CMake
2081       2.8.11 gained the  ability  to  evaluate  generator  expressions  while
2082       determining  the  link dependencies from IMPORTED targets.  This allows
2083       CMake itself to automatically link executables which link to Qt to  the
2084       qtmain.lib  library  when  using IMPORTED Qt targets.  For applications
2085       already linking to qtmain.lib, this should  have  little  impact.   For
2086       applications  which supply their own alternative WinMain implementation
2087       and for applications which use the QAxServer  library,  this  automatic
2088       linking will need to be disabled as per the documentation.
2089
2090       The  OLD  behavior  for  this  policy  is  not  to  link executables to
2091       qtmain.lib automatically when they link to the QtCore IMPORTED  target.
2092       The  NEW  behavior for this policy is to link executables to qtmain.lib
2093       automatically when they link to QtCore IMPORTED target.
2094
2095       This policy was introduced in  CMake  version  2.8.11.   CMake  version
2096       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2097       cmake_policy command to set it to OLD or NEW explicitly.
2098
2099       NOTE:
2100          The OLD behavior of a policy is deprecated by definition and may  be
2101          removed in a future version of CMake.
2102
2103   CMP0019
2104       Do not re-expand variables in include and link information.
2105
2106       CMake  2.8.10 and lower re-evaluated values given to the include_direc‐
2107       tories, link_directories, and link_libraries  commands  to  expand  any
2108       leftover  variable  references  at  the  end of the configuration step.
2109       This was for  strict  compatibility  with  VERY  early  CMake  versions
2110       because all variable references are now normally evaluated during CMake
2111       language processing.  CMake 2.8.11 and higher prefer to skip the  extra
2112       evaluation.
2113
2114       The  OLD  behavior  for  this  policy  is to re-evaluate the values for
2115       strict compatibility.  The NEW behavior for this policy is to leave the
2116       values untouched.
2117
2118       This  policy  was  introduced  in  CMake version 2.8.11.  CMake version
2119       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2120       cmake_policy command to set it to OLD or NEW explicitly.
2121
2122       NOTE:
2123          The  OLD behavior of a policy is deprecated by definition and may be
2124          removed in a future version of CMake.
2125
2126   CMP0018
2127       Ignore CMAKE_SHARED_LIBRARY_<Lang>_FLAGS variable.
2128
2129       CMake 2.8.8 and lower compiled sources in SHARED and  MODULE  libraries
2130       using  the  value of the undocumented CMAKE_SHARED_LIBRARY_<Lang>_FLAGS
2131       platform variable.   The  variable  contained  platform-specific  flags
2132       needed  to compile objects for shared libraries.  Typically it included
2133       a flag such as -fPIC for position independent code  but  also  included
2134       other flags needed on certain platforms.  CMake 2.8.9 and higher prefer
2135       instead to use the POSITION_INDEPENDENT_CODE target property to  deter‐
2136       mine  what targets should be position independent, and new undocumented
2137       platform    variables    to     select     flags     while     ignoring
2138       CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely.
2139
2140       The  default  for either approach produces identical compilation flags,
2141       but if a project modifies  CMAKE_SHARED_LIBRARY_<Lang>_FLAGS  from  its
2142       original value this policy determines which approach to use.
2143
2144       The  OLD  behavior  for  this policy is to ignore the POSITION_INDEPEN‐
2145       DENT_CODE property for all  targets  and  use  the  modified  value  of
2146       CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE libraries.
2147
2148       The     NEW     behavior    for    this    policy    is    to    ignore
2149       CMAKE_SHARED_LIBRARY_<Lang>_FLAGS whether it is  modified  or  not  and
2150       honor the POSITION_INDEPENDENT_CODE target property.
2151
2152       This  policy  was  introduced  in  CMake  version 2.8.9.  CMake version
2153       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2154       cmake_policy command to set it to OLD or NEW explicitly.
2155
2156       NOTE:
2157          The  OLD behavior of a policy is deprecated by definition and may be
2158          removed in a future version of CMake.
2159
2160   CMP0017
2161       Prefer files from the CMake module directory when including from there.
2162
2163       Starting with CMake 2.8.4, if a cmake-module shipped with  CMake  (i.e.
2164       located  in  the  CMake module directory) calls include() or find_pack‐
2165       age(), the files located in the CMake module  directory  are  preferred
2166       over  the files in CMAKE_MODULE_PATH.  This makes sure that the modules
2167       belonging to CMake always get those files included which  they  expect,
2168       and  against which they were developed and tested.  In all other cases,
2169       the files found in CMAKE_MODULE_PATH still  take  precedence  over  the
2170       ones in the CMake module directory.  The OLD behavior is to always pre‐
2171       fer files from CMAKE_MODULE_PATH over  files  from  the  CMake  modules
2172       directory.
2173
2174       This  policy  was  introduced  in  CMake  version 2.8.4.  CMake version
2175       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2176       cmake_policy command to set it to OLD or NEW explicitly.
2177
2178       NOTE:
2179          The  OLD behavior of a policy is deprecated by definition and may be
2180          removed in a future version of CMake.
2181
2182   CMP0016
2183       target_link_libraries() reports error if its only  argument  is  not  a
2184       target.
2185
2186       In  CMake  2.8.2 and lower the target_link_libraries() command silently
2187       ignored if it was called with only  one  argument,  and  this  argument
2188       wasn’t a valid target.  In CMake 2.8.3 and above it reports an error in
2189       this case.
2190
2191       This policy was introduced  in  CMake  version  2.8.3.   CMake  version
2192       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2193       cmake_policy command to set it to OLD or NEW explicitly.
2194
2195       NOTE:
2196          The OLD behavior of a policy is deprecated by definition and may  be
2197          removed in a future version of CMake.
2198
2199   CMP0015
2200       link_directories() treats paths relative to the source dir.
2201
2202       In CMake 2.8.0 and lower the link_directories() command passed relative
2203       paths  unchanged  to  the  linker.   In  CMake  2.8.1  and  above   the
2204       link_directories()  command  prefers  to  interpret relative paths with
2205       respect  to  CMAKE_CURRENT_SOURCE_DIR,   which   is   consistent   with
2206       include_directories()  and  other  commands.  The OLD behavior for this
2207       policy is to use relative paths verbatim in the  linker  command.   The
2208       NEW  behavior  for this policy is to convert relative paths to absolute
2209       paths by appending the relative path to CMAKE_CURRENT_SOURCE_DIR.
2210
2211       This policy was introduced  in  CMake  version  2.8.1.   CMake  version
2212       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2213       cmake_policy command to set it to OLD or NEW explicitly.
2214
2215       NOTE:
2216          The OLD behavior of a policy is deprecated by definition and may  be
2217          removed in a future version of CMake.
2218
2219   CMP0014
2220       Input directories must have CMakeLists.txt.
2221
2222       CMake versions before 2.8 silently ignored missing CMakeLists.txt files
2223       in directories referenced by add_subdirectory() or subdirs(),  treating
2224       them  as  if  present  but empty.  In CMake 2.8.0 and above this policy
2225       determines whether or not the case is an error.  The OLD  behavior  for
2226       this  policy  is  to silently ignore the problem.  The NEW behavior for
2227       this policy is to report an error.
2228
2229       This policy was introduced  in  CMake  version  2.8.0.   CMake  version
2230       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2231       cmake_policy command to set it to OLD or NEW explicitly.
2232
2233       NOTE:
2234          The OLD behavior of a policy is deprecated by definition and may  be
2235          removed in a future version of CMake.
2236
2237   CMP0013
2238       Duplicate binary directories are not allowed.
2239
2240       CMake  2.6.3  and  below silently permitted add_subdirectory() calls to
2241       create the same binary directory multiple times.  During  build  system
2242       generation  files  would  be  written and then overwritten in the build
2243       tree and could lead to strange behavior.  CMake 2.6.4 and above explic‐
2244       itly detect duplicate binary directories.  CMake 2.6.4 always considers
2245       this case an error.  In CMake 2.8.0 and above  this  policy  determines
2246       whether  or not the case is an error.  The OLD behavior for this policy
2247       is to allow duplicate binary directories.  The NEW  behavior  for  this
2248       policy is to disallow duplicate binary directories with an error.
2249
2250       This  policy  was  introduced  in  CMake  version 2.8.0.  CMake version
2251       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2252       cmake_policy command to set it to OLD or NEW explicitly.
2253
2254       NOTE:
2255          The  OLD behavior of a policy is deprecated by definition and may be
2256          removed in a future version of CMake.
2257
2258   CMP0012
2259       if() recognizes numbers and boolean constants.
2260
2261       In CMake versions 2.6.4 and lower the if() command implicitly  derefer‐
2262       enced  arguments corresponding to variables, even those named like num‐
2263       bers or boolean constants, except for 0 and  1.   Numbers  and  boolean
2264       constants such as true, false, yes, no, on, off, y, n, notfound, ignore
2265       (all case insensitive) were recognized in some cases but not all.   For
2266       example,  the  code  “if(TRUE)” might have evaluated as false.  Numbers
2267       such as 2 were recognized only in boolean expressions like “if(NOT  2)”
2268       (leading  to  false)  but  not  as a single-argument like “if(2)” (also
2269       leading to false).  Later versions of CMake prefer to treat numbers and
2270       boolean  constants  literally,  so  they should not be used as variable
2271       names.
2272
2273       The OLD behavior for this policy is to implicitly dereference variables
2274       named  like  numbers  and boolean constants.  The NEW behavior for this
2275       policy is to recognize numbers and boolean constants  without  derefer‐
2276       encing variables with such names.
2277
2278       This  policy  was  introduced  in  CMake  version 2.8.0.  CMake version
2279       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2280       cmake_policy command to set it to OLD or NEW explicitly.
2281
2282       NOTE:
2283          The  OLD behavior of a policy is deprecated by definition and may be
2284          removed in a future version of CMake.
2285

POLICIES INTRODUCED BY CMAKE 2.6

2287   CMP0011
2288       Included scripts do automatic cmake_policy PUSH and POP.
2289
2290       In CMake 2.6.2 and below, CMake Policy settings in  scripts  loaded  by
2291       the  include()  and  find_package() commands would affect the includer.
2292       Explicit invocations of cmake_policy(PUSH) and  cmake_policy(POP)  were
2293       required  to  isolate  policy  changes and protect the includer.  While
2294       some scripts intend to affect the policies of their includer,  most  do
2295       not.  In CMake 2.6.3 and above, include() and find_package() by default
2296       PUSH and POP an entry on the policy stack around  an  included  script,
2297       but provide a NO_POLICY_SCOPE option to disable it.  This policy deter‐
2298       mines whether or not to imply NO_POLICY_SCOPE for  compatibility.   The
2299       OLD  behavior for this policy is to imply NO_POLICY_SCOPE for include()
2300       and find_package() commands.  The NEW behavior for this  policy  is  to
2301       allow the commands to do their default cmake_policy PUSH and POP.
2302
2303       This  policy  was  introduced  in  CMake  version 2.6.3.  CMake version
2304       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2305       cmake_policy command to set it to OLD or NEW explicitly.
2306
2307       NOTE:
2308          The  OLD behavior of a policy is deprecated by definition and may be
2309          removed in a future version of CMake.
2310
2311   CMP0010
2312       Bad variable reference syntax is an error.
2313
2314       In CMake 2.6.2 and below, incorrect variable reference syntax such as a
2315       missing  close-brace (“${FOO”) was reported but did not stop processing
2316       of CMake code.  This policy determines whether a bad variable reference
2317       is  an  error.   The  OLD behavior for this policy is to warn about the
2318       error, leave the string untouched, and continue.  The NEW behavior  for
2319       this policy is to report an error.
2320
2321       If  CMP0053  is set to NEW, this policy has no effect and is treated as
2322       always being NEW.
2323
2324       This policy was introduced  in  CMake  version  2.6.3.   CMake  version
2325       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2326       cmake_policy command to set it to OLD or NEW explicitly.
2327
2328       NOTE:
2329          The OLD behavior of a policy is deprecated by definition and may  be
2330          removed in a future version of CMake.
2331
2332   CMP0009
2333       FILE GLOB_RECURSE calls should not follow symlinks by default.
2334
2335       In  CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow through
2336       symlinks, sometimes coming  up  with  unexpectedly  large  result  sets
2337       because  of  symlinks to top level directories that contain hundreds of
2338       thousands of files.
2339
2340       This policy determines whether or not to  follow  symlinks  encountered
2341       during  a  FILE GLOB_RECURSE call.  The OLD behavior for this policy is
2342       to follow the symlinks.  The NEW behavior for this  policy  is  not  to
2343       follow the symlinks by default, but only if FOLLOW_SYMLINKS is given as
2344       an additional argument to the FILE command.
2345
2346       This policy was introduced  in  CMake  version  2.6.2.   CMake  version
2347       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2348       cmake_policy command to set it to OLD or NEW explicitly.
2349
2350       NOTE:
2351          The OLD behavior of a policy is deprecated by definition and may  be
2352          removed in a future version of CMake.
2353
2354   CMP0008
2355       Libraries linked by full-path must have a valid library file name.
2356
2357       In CMake 2.4 and below it is possible to write code like
2358
2359          target_link_libraries(myexe /full/path/to/somelib)
2360
2361       where  “somelib”  is  supposed  to be a valid library file name such as
2362       “libsomelib.a” or “somelib.lib”.  For Makefile generators this produces
2363       an  error  at build time because the dependency on the full path cannot
2364       be found.  For VS IDE and Xcode generators this used to work  by  acci‐
2365       dent because CMake would always split off the library directory and ask
2366       the  linker  to  search  for  the  library  by   name   (-lsomelib   or
2367       somelib.lib).   Despite  the failure with Makefiles, some projects have
2368       code like this and build only with VS and/or Xcode.   This  version  of
2369       CMake  prefers to pass the full path directly to the native build tool,
2370       which will fail in this case because it does not name a  valid  library
2371       file.
2372
2373       This policy determines what to do with full paths that do not appear to
2374       name a valid library file.  The OLD behavior  for  this  policy  is  to
2375       split  the  library name from the path and ask the linker to search for
2376       it.  The NEW behavior for this policy is to trust the  given  path  and
2377       pass it directly to the native build tool unchanged.
2378
2379       This  policy  was  introduced  in  CMake  version 2.6.1.  CMake version
2380       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2381       cmake_policy command to set it to OLD or NEW explicitly.
2382
2383       NOTE:
2384          The  OLD behavior of a policy is deprecated by definition and may be
2385          removed in a future version of CMake.
2386
2387   CMP0007
2388       list command no longer ignores empty elements.
2389
2390       This policy determines whether the list command will ignore empty  ele‐
2391       ments in the list.  CMake 2.4 and below list commands ignored all empty
2392       elements in the list.  For example, a;b;;c would have length 3 and  not
2393       4.   The OLD behavior for this policy is to ignore empty list elements.
2394       The NEW behavior for this policy is to correctly count  empty  elements
2395       in a list.
2396
2397       This  policy  was  introduced  in  CMake  version 2.6.0.  CMake version
2398       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2399       cmake_policy command to set it to OLD or NEW explicitly.
2400
2401       NOTE:
2402          The  OLD behavior of a policy is deprecated by definition and may be
2403          removed in a future version of CMake.
2404
2405   CMP0006
2406       Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.
2407
2408       This policy determines whether the  install(TARGETS)  command  must  be
2409       given  a  BUNDLE  DESTINATION  when  asked to install a target with the
2410       MACOSX_BUNDLE property set.  CMake 2.4 and below  did  not  distinguish
2411       application  bundles  from  normal executables when installing targets.
2412       CMake 2.6 provides a BUNDLE option to the install(TARGETS) command that
2413       specifies  rules  specific to application bundles on the Mac.  Projects
2414       should use this option when installing a target with the  MACOSX_BUNDLE
2415       property set.
2416
2417       The  OLD behavior for this policy is to fall back to the RUNTIME DESTI‐
2418       NATION if a BUNDLE DESTINATION is not given.  The NEW behavior for this
2419       policy is to produce an error if a bundle target is installed without a
2420       BUNDLE DESTINATION.
2421
2422       This policy was introduced  in  CMake  version  2.6.0.   CMake  version
2423       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2424       cmake_policy command to set it to OLD or NEW explicitly.
2425
2426       NOTE:
2427          The OLD behavior of a policy is deprecated by definition and may  be
2428          removed in a future version of CMake.
2429
2430   CMP0005
2431       Preprocessor definition values are now escaped automatically.
2432
2433       This  policy  determines  whether  or not CMake should generate escaped
2434       preprocessor definition values added via add_definitions.   CMake  ver‐
2435       sions 2.4 and below assumed that only trivial values would be given for
2436       macros  in  add_definitions  calls.   It  did  not  attempt  to  escape
2437       non-trivial  values  such  as string literals in generated build rules.
2438       CMake versions 2.6 and above support escaping of most values, but  can‐
2439       not assume the user has not added escapes already in an attempt to work
2440       around limitations in earlier versions.
2441
2442       The OLD behavior for this policy is to place definition values given to
2443       add_definitions  directly in the generated build rules without attempt‐
2444       ing to escape anything.  The NEW behavior for this policy is to  gener‐
2445       ate correct escapes for all native build tools automatically.  See doc‐
2446       umentation of the COMPILE_DEFINITIONS target property  for  limitations
2447       of the escaping implementation.
2448
2449       This  policy  was  introduced  in  CMake  version 2.6.0.  CMake version
2450       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2451       cmake_policy command to set it to OLD or NEW explicitly.
2452
2453       NOTE:
2454          The  OLD behavior of a policy is deprecated by definition and may be
2455          removed in a future version of CMake.
2456
2457   CMP0004
2458       Libraries linked may not have leading or trailing whitespace.
2459
2460       CMake versions 2.4 and below  silently  removed  leading  and  trailing
2461       whitespace from libraries linked with code like
2462
2463          target_link_libraries(myexe " A ")
2464
2465       This could lead to subtle errors in user projects.
2466
2467       The  OLD  behavior  for  this  policy is to silently remove leading and
2468       trailing whitespace.  The NEW behavior for this policy is  to  diagnose
2469       the  existence  of  such  whitespace as an error.  The setting for this
2470       policy used when checking the library names is that in effect when  the
2471       target is created by an add_executable or add_library command.
2472
2473       This  policy  was  introduced  in  CMake  version 2.6.0.  CMake version
2474       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2475       cmake_policy command to set it to OLD or NEW explicitly.
2476
2477       NOTE:
2478          The  OLD behavior of a policy is deprecated by definition and may be
2479          removed in a future version of CMake.
2480
2481   CMP0003
2482       Libraries linked via full path no longer produce linker search paths.
2483
2484       This policy affects how libraries whose full paths are  NOT  known  are
2485       found  at link time, but was created due to a change in how CMake deals
2486       with libraries whose full paths are known.  Consider the code
2487
2488          target_link_libraries(myexe /path/to/libA.so)
2489
2490       CMake 2.4 and below implemented linking to libraries whose  full  paths
2491       are  known  by splitting them on the link line into separate components
2492       consisting of the linker search path and the library name.  The example
2493       code might have produced something like
2494
2495          ... -L/path/to -lA ...
2496
2497       in order to link to library A.  An analysis was performed to order mul‐
2498       tiple link directories such that the linker would find library A in the
2499       desired  location,  but  there  are  cases in which this does not work.
2500       CMake versions 2.6 and above use the more reliable approach of  passing
2501       the  full  path to libraries directly to the linker in most cases.  The
2502       example code now produces something like
2503
2504          ... /path/to/libA.so ....
2505
2506       Unfortunately this change can break code like
2507
2508          target_link_libraries(myexe /path/to/libA.so B)
2509
2510       where “B” is meant to find  “/path/to/libB.so”.   This  code  is  wrong
2511       because  the  user  is  asking the linker to find library B but has not
2512       provided a linker search path (which may be added with the  link_direc‐
2513       tories command).  However, with the old linking implementation the code
2514       would work accidentally  because  the  linker  search  path  added  for
2515       library A allowed library B to be found.
2516
2517       In  order to support projects depending on linker search paths added by
2518       linking to libraries with known full paths, the OLD behavior  for  this
2519       policy will add the linker search paths even though they are not needed
2520       for their own libraries.  When this policy is set to  OLD,  CMake  will
2521       produce a link line such as
2522
2523          ... -L/path/to /path/to/libA.so -lB ...
2524
2525       which will allow library B to be found as it was previously.  When this
2526       policy is set to NEW, CMake will produce a link line such as
2527
2528          ... /path/to/libA.so -lB ...
2529
2530       which more accurately matches what the project specified.
2531
2532       The setting for this policy used when generating the link line is  that
2533       in   effect  when  the  target  is  created  by  an  add_executable  or
2534       add_library command.  For the example described above, the code
2535
2536          cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)
2537          add_executable(myexe myexe.c)
2538          target_link_libraries(myexe /path/to/libA.so B)
2539
2540       will work and suppress the warning for this policy.   It  may  also  be
2541       updated to work with the corrected linking approach:
2542
2543          cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
2544          link_directories(/path/to) # needed to find library B
2545          add_executable(myexe myexe.c)
2546          target_link_libraries(myexe /path/to/libA.so B)
2547
2548       Even better, library B may be specified with a full path:
2549
2550          add_executable(myexe myexe.c)
2551          target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)
2552
2553       When  all  items on the link line have known paths CMake does not check
2554       this policy so it has no effect.
2555
2556       Note that the warning for this policy will be issued for  at  most  one
2557       target.  This avoids flooding users with messages for every target when
2558       setting the policy once will probably fix all targets.
2559
2560       This policy was introduced  in  CMake  version  2.6.0.   CMake  version
2561       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2562       cmake_policy command to set it to OLD or NEW explicitly.
2563
2564       NOTE:
2565          The OLD behavior of a policy is deprecated by definition and may  be
2566          removed in a future version of CMake.
2567
2568   CMP0002
2569       Logical target names must be globally unique.
2570
2571       Targets  names  created  with  add_executable, add_library, or add_cus‐
2572       tom_target are logical build target names.  Logical target  names  must
2573       be globally unique because:
2574
2575          - Unique names may be referenced unambiguously both in CMake
2576            code and on make tool command lines.
2577          - Logical names are used by Xcode and VS IDE generators
2578            to produce meaningful project names for the targets.
2579
2580       The  logical  name  of  executable and library targets does not have to
2581       correspond to the physical file names built.  Consider using  the  OUT‐
2582       PUT_NAME  target  property to create two targets with the same physical
2583       name while keeping logical names distinct.  Custom targets must  simply
2584       have  globally  unique  names  (unless  one  uses  the  global property
2585       ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).
2586
2587       This policy was introduced  in  CMake  version  2.6.0.   CMake  version
2588       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2589       cmake_policy command to set it to OLD or NEW explicitly.
2590
2591       NOTE:
2592          The OLD behavior of a policy is deprecated by definition and may  be
2593          removed in a future version of CMake.
2594
2595   CMP0001
2596       CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
2597
2598       The  OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present
2599       it to the user.  The NEW behavior is to ignore CMAKE_BACKWARDS_COMPATI‐
2600       BILITY completely.
2601
2602       In  CMake  2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was
2603       used to request compatibility with earlier versions of CMake.  In CMake
2604       2.6  and above all compatibility issues are handled by policies and the
2605       cmake_policy command.  However,  CMake  must  still  check  CMAKE_BACK‐
2606       WARDS_COMPATIBILITY for projects written for CMake 2.4 and below.
2607
2608       This  policy  was  introduced  in  CMake  version 2.6.0.  CMake version
2609       3.14.5 warns when the policy is not set and uses OLD behavior.  Use the
2610       cmake_policy command to set it to OLD or NEW explicitly.
2611
2612       NOTE:
2613          The  OLD behavior of a policy is deprecated by definition and may be
2614          removed in a future version of CMake.
2615
2616   CMP0000
2617       A minimum required CMake version must be specified.
2618
2619       CMake requires that projects specify the version of CMake to which they
2620       have  been  written.  This policy has been put in place so users trying
2621       to build the project may be told when they need to update their  CMake.
2622       Specifying  a  version also helps the project build with CMake versions
2623       newer than that specified.  Use the cmake_minimum_required  command  at
2624       the top of your main CMakeLists.txt file:
2625
2626          cmake_minimum_required(VERSION <major>.<minor>)
2627
2628       where  “<major>.<minor>”  is  the  version of CMake you want to support
2629       (such as “2.6”).  The command will ensure that at least the given  ver‐
2630       sion of CMake is running and help newer versions be compatible with the
2631       project.  See documentation of cmake_minimum_required for details.
2632
2633       Note that the command invocation must appear in the CMakeLists.txt file
2634       itself;  a  call  in  an included file is not sufficient.  However, the
2635       cmake_policy command may be called to set policy CMP0000 to OLD or  NEW
2636       behavior  explicitly.  The OLD behavior is to silently ignore the miss‐
2637       ing invocation.  The NEW behavior is to issue an  error  instead  of  a
2638       warning.   An  included  file  may set CMP0000 explicitly to affect how
2639       this policy is enforced for the main CMakeLists.txt file.
2640
2641       This policy was introduced in CMake version 2.6.0.
2642
2643       NOTE:
2644          The OLD behavior of a policy is deprecated by definition and may  be
2645          removed in a future version of CMake.
2646
2648       2000-2019 Kitware, Inc. and Contributors
2649
2650
2651
2652
26533.14.5                           Jun 01, 2019                CMAKE-POLICIES(7)
Impressum