1cmake(1)                    General Commands Manual                   cmake(1)
2
3
4

NAME

6         cmake - Cross-Platform Makefile Generator.
7
8

USAGE

10         cmake [options] <path-to-source>
11         cmake [options] <path-to-existing-build>
12
13

DESCRIPTION

15       The  "cmake" executable is the CMake command-line interface.  It may be
16       used to configure projects in scripts.  Project configuration  settings
17       may be specified on the command line with the -D option.  The -i option
18       will cause cmake to interactively prompt for such settings.
19
20
21       CMake is a cross-platform build  system  generator.   Projects  specify
22       their  build process with platform-independent CMake listfiles included
23       in each directory of a source tree with the name CMakeLists.txt.  Users
24       build  a project by using CMake to generate a build system for a native
25       tool on their platform.
26
27

OPTIONS

29       -C <initial-cache>
30              Pre-load a script to populate the cache.
31
32              When cmake is first run in an empty build  tree,  it  creates  a
33              CMakeCache.txt  file and populates it with customizable settings
34              for the project.  This option may be used to specify a file from
35              which  to  load  cache entries before the first pass through the
36              project's cmake listfiles.  The  loaded  entries  take  priority
37              over  the  project's default values.  The given file should be a
38              CMake script containing SET commands that use the CACHE  option,
39              not a cache-format file.
40
41
42       -D <var>:<type>=<value>
43              Create a cmake cache entry.
44
45              When  cmake  is  first  run in an empty build tree, it creates a
46              CMakeCache.txt file and populates it with customizable  settings
47              for  the  project.  This option may be used to specify a setting
48              that takes priority  over  the  project's  default  value.   The
49              option may be repeated for as many cache entries as desired.
50
51
52       -U <globbing_expr>
53              Remove matching entries from CMake cache.
54
55              This option may be used to remove one or more variables from the
56              CMakeCache.txt file, globbing expressions using * and ? are sup‐
57              ported.  The option may be repeated for as many cache entries as
58              desired.
59
60
61              Use with care, you can make your CMakeCache.txt non-working.
62
63
64       -G <generator-name>
65              Specify a makefile generator.
66
67              CMake may support multiple native build systems on certain plat‐
68              forms.   A  makefile  generator  is responsible for generating a
69              particular build system.  Possible generator names are specified
70              in the Generators section.
71
72
73       -Wno-dev
74              Suppress developer warnings.
75
76              Suppress  warnings  that  are meant for the author of the CMake‐
77              Lists.txt files.
78
79
80       -Wdev  Enable developer warnings.
81
82              Enable warnings that are meant for  the  author  of  the  CMake‐
83              Lists.txt files.
84
85
86       -E     CMake command mode.
87
88              For  true  platform  independence, CMake provides a list of com‐
89              mands that can be used on all systems. Run with -E help for  the
90              usage   information.   Commands   available  are:  chdir,  copy,
91              copy_if_different    copy_directory,    compare_files,     echo,
92              echo_append,  environment, make_directory, md5sum, remove_direc‐
93              tory, remove,  tar,  time,  touch,  touch_nocreate,  write_regv,
94              delete_regv, comspec, create_symlink.
95
96
97       -i     Run in wizard mode.
98
99              Wizard mode runs cmake interactively without a GUI.  The user is
100              prompted to answer questions about  the  project  configuration.
101              The answers are used to set cmake cache values.
102
103
104       -L[A][H]
105              List non-advanced cached variables.
106
107              List  cache  variables will run CMake and list all the variables
108              from the  CMake  cache  that  are  not  marked  as  INTERNAL  or
109              ADVANCED.  This will effectively display current CMake settings,
110              which can be then changed with -D option. Changing some  of  the
111              variable  may  result  in  more variables being created. If A is
112              specified, then it will display also advanced variables. If H is
113              specified, it will also display help for each variable.
114
115
116       --build <dir>
117              Build a CMake-generated project binary tree.
118
119              This abstracts a native build tool's command-line interface with
120              the following options:
121
122
123                <dir>          = Project binary directory to be built.
124                --target <tgt> = Build <tgt> instead of default targets.
125                --config <cfg> = For multi-configuration tools, choose <cfg>.
126                --clean-first  = Build target 'clean' first, then build.
127                                 (To clean only, use --target 'clean'.)
128                --             = Pass remaining options to the native tool.
129
130              Run cmake --build with no options for quick help.
131
132
133       -N     View mode only.
134
135              Only load the cache. Do not actually run configure and  generate
136              steps.
137
138
139       -P <file>
140              Process script mode.
141
142              Process  the  given  cmake file as a script written in the CMake
143              language.  No configure or generate step is  performed  and  the
144              cache  is  not modified. If variables are defined using -D, this
145              must be done before the -P argument.
146
147
148       --graphviz=[file]
149              Generate graphviz of dependencies.
150
151              Generate a graphviz input file that will contain all the library
152              and executable dependencies in the project.
153
154
155       --system-information [file]
156              Dump information about this system.
157
158              Dump  a  wide  range of information about the current system. If
159              run from the top of a binary tree for a CMake  project  it  will
160              dump additional information such as the cache, log files etc.
161
162
163       --debug-trycompile
164              Do not delete the try compile directories..
165
166              Do  not delete the files and directories created for try_compile
167              calls. This is useful in debugging failed try_compiles.  It  may
168              however  change the results of the try-compiles as old junk from
169              a previous try-compile may cause a different test to either pass
170              or  fail incorrectly.  This option is best used for one try-com‐
171              pile at a time, and only when debugging.
172
173
174       --debug-output
175              Put cmake in a debug mode.
176
177              Print extra stuff during the cmake run like  stack  traces  with
178              message(send_error ) calls.
179
180
181       --trace
182              Put cmake in trace mode.
183
184              Print  a  trace  of  all  calls  made  and  from where with mes‐
185              sage(send_error ) calls.
186
187
188       --warn-uninitialized
189              Warn about uninitialized values.
190
191              Print a warning when an uninitialized variable is used.
192
193
194       --warn-unused-vars
195              Warn about unused variables.
196
197              Find variables that are declared or set, but not used.
198
199
200       --no-warn-unused-cli
201              Don't warn about command line options.
202
203              Don't find variables that are declared on the command line,  but
204              not used.
205
206
207       --check-system-vars
208              Find problems with variable usage in system files.
209
210              Normally,  unused  and  uninitialized variables are searched for
211              only in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. This  flag  tells
212              CMake to warn about other files as well.
213
214
215       --help-command cmd [file]
216              Print help for a single command and exit.
217
218              Full  documentation  specific to the given command is displayed.
219              If a file is specified, the documentation is  written  into  and
220              the  output  format is determined depending on the filename suf‐
221              fix. Supported are man page, HTML, DocBook and plain text.
222
223
224       --help-command-list [file]
225              List available listfile commands and exit.
226
227              The list contains all commands for which help may be obtained by
228              using the --help-command argument followed by a command name. If
229              a file is specified, the documentation is written into  and  the
230              output  format  is  determined depending on the filename suffix.
231              Supported are man page, HTML, DocBook and plain text.
232
233
234       --help-commands [file]
235              Print help for all commands and exit.
236
237              Full documentation specific for  all  current  command  is  dis‐
238              played.If a file is specified, the documentation is written into
239              and the output format is determined depending  on  the  filename
240              suffix. Supported are man page, HTML, DocBook and plain text.
241
242
243       --help-compatcommands [file]
244              Print help for compatibility commands.
245
246              Full  documentation  specific  for all compatibility commands is
247              displayed.If a file is specified, the documentation  is  written
248              into  and the output format is determined depending on the file‐
249              name suffix. Supported are man page,  HTML,  DocBook  and  plain
250              text.
251
252
253       --help-module module [file]
254              Print help for a single module and exit.
255
256              Full  documentation specific to the given module is displayed.If
257              a file is specified, the documentation is written into  and  the
258              output  format  is  determined depending on the filename suffix.
259              Supported are man page, HTML, DocBook and plain text.
260
261
262       --help-module-list [file]
263              List available modules and exit.
264
265              The list contains all modules for which help may be obtained  by
266              using the --help-module argument followed by a module name. If a
267              file is specified, the documentation is  written  into  and  the
268              output  format  is  determined depending on the filename suffix.
269              Supported are man page, HTML, DocBook and plain text.
270
271
272       --help-modules [file]
273              Print help for all modules and exit.
274
275              Full documentation for all modules is displayed. If  a  file  is
276              specified, the documentation is written into and the output for‐
277              mat is determined depending on the  filename  suffix.  Supported
278              are man page, HTML, DocBook and plain text.
279
280
281       --help-custom-modules [file]
282              Print help for all custom modules and exit.
283
284              Full  documentation  for  all  custom modules is displayed. If a
285              file is specified, the documentation is  written  into  and  the
286              output  format  is  determined depending on the filename suffix.
287              Supported are man page, HTML, DocBook and plain text.
288
289
290       --help-policy cmp [file]
291              Print help for a single policy and exit.
292
293              Full documentation specific to the given policy is  displayed.If
294              a  file  is specified, the documentation is written into and the
295              output format is determined depending on  the  filename  suffix.
296              Supported are man page, HTML, DocBook and plain text.
297
298
299       --help-policies [file]
300              Print help for all policies and exit.
301
302              Full  documentation  for  all policies is displayed.If a file is
303              specified, the documentation is written into and the output for‐
304              mat  is  determined  depending on the filename suffix. Supported
305              are man page, HTML, DocBook and plain text.
306
307
308       --help-property prop [file]
309              Print help for a single property and exit.
310
311              Full documentation  specific  to  the  given  property  is  dis‐
312              played.If a file is specified, the documentation is written into
313              and the output format is determined depending  on  the  filename
314              suffix. Supported are man page, HTML, DocBook and plain text.
315
316
317       --help-property-list [file]
318              List available properties and exit.
319
320              The  list contains all properties for which help may be obtained
321              by using the --help-property argument  followed  by  a  property
322              name.   If a file is specified, the help is written into it.If a
323              file is specified, the documentation is  written  into  and  the
324              output  format  is  determined depending on the filename suffix.
325              Supported are man page, HTML, DocBook and plain text.
326
327
328       --help-properties [file]
329              Print help for all properties and exit.
330
331              Full documentation for all properties is displayed.If a file  is
332              specified, the documentation is written into and the output for‐
333              mat is determined depending on the  filename  suffix.  Supported
334              are man page, HTML, DocBook and plain text.
335
336
337       --help-variable var [file]
338              Print help for a single variable and exit.
339
340              Full  documentation  specific  to  the  given  variable  is dis‐
341              played.If a file is specified, the documentation is written into
342              and  the  output  format is determined depending on the filename
343              suffix. Supported are man page, HTML, DocBook and plain text.
344
345
346       --help-variable-list [file]
347              List documented variables and exit.
348
349              The list contains all variables for which help may  be  obtained
350              by  using  the  --help-variable  argument followed by a variable
351              name.  If a file is specified, the help is written into it.If  a
352              file  is  specified,  the  documentation is written into and the
353              output format is determined depending on  the  filename  suffix.
354              Supported are man page, HTML, DocBook and plain text.
355
356
357       --help-variables [file]
358              Print help for all variables and exit.
359
360              Full  documentation  for all variables is displayed.If a file is
361              specified, the documentation is written into and the output for‐
362              mat  is  determined  depending on the filename suffix. Supported
363              are man page, HTML, DocBook and plain text.
364
365
366       --copyright [file]
367              Print the CMake copyright and exit.
368
369              If a file is specified, the copyright is written into it.
370
371
372       --help Print usage information and exit.
373
374              Usage  describes  the  basic  command  line  interface  and  its
375              options.
376
377
378       --help-full [file]
379              Print full help and exit.
380
381              Full  help  displays  most  of the documentation provided by the
382              UNIX man page.  It is provided for use  on  non-UNIX  platforms,
383              but  is  also convenient if the man page is not installed.  If a
384              file is specified, the help is written into it.
385
386
387       --help-html [file]
388              Print full help in HTML format.
389
390              This option is used by CMake authors to help produce web  pages.
391              If a file is specified, the help is written into it.
392
393
394       --help-man [file]
395              Print full help as a UNIX man page and exit.
396
397              This  option is used by the cmake build to generate the UNIX man
398              page.  If a file is specified, the help is written into it.
399
400
401       --version [file]
402              Show program name/version banner and exit.
403
404              If a file is specified, the version is written into it.
405
406

GENERATORS

408       The following generators are available on this platform:
409
410
411       Unix Makefiles
412              Generates standard UNIX makefiles.
413
414              A hierarchy of UNIX makefiles is generated into the build  tree.
415              Any  standard  UNIX-style  make  program  can  build the project
416              through the default make target.  A  "make  install"  target  is
417              also provided.
418
419
420       CodeBlocks - Unix Makefiles
421              Generates CodeBlocks project files.
422
423              Project  files  for CodeBlocks will be created in the top direc‐
424              tory and in every subdirectory which features  a  CMakeLists.txt
425              file  containing  a  PROJECT() call. Additionally a hierarchy of
426              makefiles is generated into the  build  tree.   The  appropriate
427              make program can build the project through the default make tar‐
428              get.  A "make install" target is also provided.
429
430
431       Eclipse CDT4 - Unix Makefiles
432              Generates Eclipse CDT 4.0 project files.
433
434              Project files for Eclipse will be created in the top  directory.
435              In  out  of  source  builds,  a linked resource to the top level
436              source directory will be  created.Additionally  a  hierarchy  of
437              makefiles is generated into the build tree. The appropriate make
438              program can build the project through the default make target. A
439              "make install" target is also provided.
440
441
442       KDevelop3
443              Generates KDevelop 3 project files.
444
445              Project  files  for KDevelop 3 will be created in the top direc‐
446              tory and in every subdirectory which features  a  CMakeLists.txt
447              file  containing  a  PROJECT()  call. If you change the settings
448              using KDevelop cmake will try its best to keep your changes when
449              regenerating the project files. Additionally a hierarchy of UNIX
450              makefiles is  generated  into  the  build  tree.   Any  standard
451              UNIX-style  make  program  can  build  the  project  through the
452              default make target.  A "make install" target is also provided.
453
454
455       KDevelop3 - Unix Makefiles
456              Generates KDevelop 3 project files.
457
458              Project files for KDevelop 3 will be created in the  top  direc‐
459              tory  and  in every subdirectory which features a CMakeLists.txt
460              file containing a PROJECT() call. If  you  change  the  settings
461              using KDevelop cmake will try its best to keep your changes when
462              regenerating the project files. Additionally a hierarchy of UNIX
463              makefiles  is  generated  into  the  build  tree.   Any standard
464              UNIX-style make  program  can  build  the  project  through  the
465              default make target.  A "make install" target is also provided.
466
467

COMMANDS

469       add_custom_command
470              Add a custom build rule to the generated build system.
471
472              There  are  two main signatures for add_custom_command The first
473              signature is for adding a custom command to produce an output.
474
475
476                add_custom_command(OUTPUT output1 [output2 ...]
477                                   COMMAND command1 [ARGS] [args1...]
478                                   [COMMAND command2 [ARGS] [args2...] ...]
479                                   [MAIN_DEPENDENCY depend]
480                                   [DEPENDS [depends...]]
481                                   [IMPLICIT_DEPENDS <lang1> depend1 ...]
482                                   [WORKING_DIRECTORY dir]
483                                   [COMMENT comment] [VERBATIM] [APPEND])
484
485              This defines a command to generate specified OUTPUT file(s).   A
486              target  created in the same directory (CMakeLists.txt file) that
487              specifies any output of the custom command as a source  file  is
488              given  a  rule  to  generate the file using the command at build
489              time.  If an output name is a relative path it  will  be  inter‐
490              preted relative to the build tree directory corresponding to the
491              current source directory.  Note  that  MAIN_DEPENDENCY  is  com‐
492              pletely  optional  and  is used as a suggestion to visual studio
493              about where to hang the custom command. In makefile  terms  this
494              creates a new target in the following form:
495
496
497                OUTPUT: MAIN_DEPENDENCY DEPENDS
498                        COMMAND
499
500              If  more  than one command is specified they will be executed in
501              order. The optional ARGS argument is for backward  compatibility
502              and will be ignored.
503
504
505              The second signature adds a custom command to a target such as a
506              library or executable. This is useful for performing  an  opera‐
507              tion  before  or  after building the target. The command becomes
508              part of the target and will only execute when the target  itself
509              is  built.  If the target is already built, the command will not
510              execute.
511
512
513                add_custom_command(TARGET target
514                                   PRE_BUILD | PRE_LINK | POST_BUILD
515                                   COMMAND command1 [ARGS] [args1...]
516                                   [COMMAND command2 [ARGS] [args2...] ...]
517                                   [WORKING_DIRECTORY dir]
518                                   [COMMENT comment] [VERBATIM])
519
520              This defines a new command that will be associated with building
521              the specified target. When the command will happen is determined
522              by which of the following is specified:
523
524
525                PRE_BUILD - run before all other dependencies
526                PRE_LINK - run after other dependencies
527                POST_BUILD - run after the target has been built
528
529              Note that the PRE_BUILD option is only supported on Visual  Stu‐
530              dio  7  or  later.  For  all  other generators PRE_BUILD will be
531              treated as PRE_LINK.
532
533
534              If WORKING_DIRECTORY is specified the command will  be  executed
535              in  the  directory  given.  If COMMENT is set, the value will be
536              displayed as a message before the commands are executed at build
537              time. If APPEND is specified the COMMAND and DEPENDS option val‐
538              ues are appended to the custom  command  for  the  first  output
539              specified.  There must have already been a previous call to this
540              command with the same output.  The  COMMENT,  WORKING_DIRECTORY,
541              and MAIN_DEPENDENCY options are currently ignored when APPEND is
542              given, but may be used in the future.
543
544
545              If VERBATIM is given then all arguments to the commands will  be
546              escaped  properly for the build tool so that the invoked command
547              receives each  argument  unchanged.   Note  that  one  level  of
548              escapes  is  still  used  by the CMake language processor before
549              add_custom_command even sees the arguments. Use of  VERBATIM  is
550              recommended as it enables correct behavior. When VERBATIM is not
551              given the behavior is platform specific because there is no pro‐
552              tection of tool-specific special characters.
553
554
555              If the output of the custom command is not actually created as a
556              file  on  disk  it   should   be   marked   as   SYMBOLIC   with
557              SET_SOURCE_FILES_PROPERTIES.
558
559
560              The IMPLICIT_DEPENDS option requests scanning of implicit depen‐
561              dencies of an input file.  The language given specifies the pro‐
562              gramming  language whose corresponding dependency scanner should
563              be used.  Currently only C and CXX language  scanners  are  sup‐
564              ported.  Dependencies  discovered from the scanning are added to
565              those of the custom  command  at  build  time.   Note  that  the
566              IMPLICIT_DEPENDS option is currently supported only for Makefile
567              generators and will be ignored by other generators.
568
569
570              If COMMAND specifies an executable target (created  by  ADD_EXE‐
571              CUTABLE)  it  will  automatically be replaced by the location of
572              the executable created  at  build  time.   Additionally  a  tar‐
573              get-level dependency will be added so that the executable target
574              will be built before any target using this custom command.  How‐
575              ever  this does NOT add a file-level dependency that would cause
576              the custom command to re-run whenever the executable  is  recom‐
577              piled.
578
579
580              Arguments  to  COMMAND  may use "generator expressions" with the
581              syntax "$<...>".   Generator  expressions  are  evaluted  during
582              build  system generation to produce information specific to each
583              build configuration.  Valid expressions are:
584
585
586                $<CONFIGURATION>          = configuration name
587                $<TARGET_FILE:tgt>        = main file (.exe, .so.1.2, .a)
588                $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)
589                $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)
590
591              where "tgt" is the name of a target.   Target  file  expressions
592              produce a full path, but _DIR and _NAME versions can produce the
593              directory and file name components:
594
595
596                $<TARGET_FILE_DIR:tgt>/$<TARGET_FILE_NAME:tgt>
597                $<TARGET_LINKER_FILE_DIR:tgt>/$<TARGET_LINKER_FILE_NAME:tgt>
598                $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>
599
600              References to target names in generator expressions  imply  tar‐
601              get-level  dependencies,  but NOT file-level dependencies.  List
602              target names with the DEPENDS option to add file dependencies.
603
604
605              The DEPENDS option specifies files on which the command depends.
606              If  any dependency is an OUTPUT of another custom command in the
607              same directory (CMakeLists.txt file) CMake automatically  brings
608              the  other  custom command into the target in which this command
609              is built.  If DEPENDS is not  specified  the  command  will  run
610              whenever the OUTPUT is missing; if the command does not actually
611              create the OUTPUT then the rule will  always  run.   If  DEPENDS
612              specifies  any  target  (created  by  an  ADD_*  command) a tar‐
613              get-level dependency is created to make sure the target is built
614              before  any  target using this custom command.  Additionally, if
615              the target is an executable or library a  file-level  dependency
616              is  created  to  cause the custom command to re-run whenever the
617              target is recompiled.
618
619
620
621       add_custom_target
622              Add a target with no output so it will always be built.
623
624                add_custom_target(Name [ALL] [command1 [args1...]]
625                                  [COMMAND command2 [args2...] ...]
626                                  [DEPENDS depend depend depend ... ]
627                                  [WORKING_DIRECTORY dir]
628                                  [COMMENT comment] [VERBATIM]
629                                  [SOURCES src1 [src2...]])
630
631              Adds a target with the given name that executes the  given  com‐
632              mands.  The  target  has no output file and is ALWAYS CONSIDERED
633              OUT OF DATE even if the commands try to create a file  with  the
634              name  of  the  target. Use ADD_CUSTOM_COMMAND to generate a file
635              with dependencies. By default nothing depends on the custom tar‐
636              get.  Use  ADD_DEPENDENCIES to add dependencies to or from other
637              targets. If the ALL option is specified it indicates  that  this
638              target  should  be  added to the default build target so that it
639              will be run every time (the command cannot be called  ALL).  The
640              command and arguments are optional and if not specified an empty
641              target will be created. If WORKING_DIRECTORY is  set,  then  the
642              command  will  be  run in that directory. If COMMENT is set, the
643              value will be displayed as a message  before  the  commands  are
644              executed  at  build  time.  Dependencies listed with the DEPENDS
645              argument may reference files and outputs of custom commands cre‐
646              ated  with  add_custom_command()  in  the same directory (CMake‐
647              Lists.txt file).
648
649
650              If VERBATIM is given then all arguments to the commands will  be
651              escaped  properly for the build tool so that the invoked command
652              receives each  argument  unchanged.   Note  that  one  level  of
653              escapes  is  still  used  by the CMake language processor before
654              add_custom_target even sees the arguments. Use  of  VERBATIM  is
655              recommended as it enables correct behavior. When VERBATIM is not
656              given the behavior is platform specific because there is no pro‐
657              tection of tool-specific special characters.
658
659
660              The  SOURCES  option  specifies  additional  source  files to be
661              included in the custom target.  Specified source files  will  be
662              added  to  IDE  project files for convenience in editing even if
663              they have not build rules.
664
665
666       add_definitions
667              Adds -D define flags to the compilation of source files.
668
669                add_definitions(-DFOO -DBAR ...)
670
671              Adds flags to the compiler command line for sources in the  cur‐
672              rent  directory  and below.  This command can be used to add any
673              flags, but it was originally intended to add preprocessor  defi‐
674              nitions.   Flags beginning in -D or /D that look like preproces‐
675              sor definitions are automatically added to  the  COMPILE_DEFINI‐
676              TIONS  property  for  the  current  directory.  Definitions with
677              non-trival values may be left in the set  of  flags  instead  of
678              being  converted  for  reasons  of backwards compatibility.  See
679              documentation of the directory, target,  and  source  file  COM‐
680              PILE_DEFINITIONS  properties  for details on adding preprocessor
681              definitions to specific scopes and configurations.
682
683
684       add_dependencies
685              Add a dependency between top-level targets.
686
687                add_dependencies(target-name depend-target1
688                                 depend-target2 ...)
689
690              Make a top-level target depend on other  top-level  targets.   A
691              top-level  target is one created by ADD_EXECUTABLE, ADD_LIBRARY,
692              or ADD_CUSTOM_TARGET.  Adding dependencies with this command can
693              be  used to make sure one target is built before another target.
694              Dependencies added to an IMPORTED target  are  followed  transi‐
695              tively in its place since the target itself does not build.  See
696              the DEPENDS option of ADD_CUSTOM_TARGET  and  ADD_CUSTOM_COMMAND
697              for  adding  file-level  dependencies  in custom rules.  See the
698              OBJECT_DEPENDS  option  in  SET_SOURCE_FILES_PROPERTIES  to  add
699              file-level dependencies to object files.
700
701
702       add_executable
703              Add  an  executable  to  the  project using the specified source
704              files.
705
706                add_executable(<name> [WIN32] [MACOSX_BUNDLE]
707                               [EXCLUDE_FROM_ALL]
708                               source1 source2 ... sourceN)
709
710              Adds an executable target called <name> to  be  built  from  the
711              source  files listed in the command invocation.  The <name> cor‐
712              responds to the logical target name and must be globally  unique
713              within  a project.  The actual file name of the executable built
714              is constructed based on conventions of the native platform (such
715              as <name>.exe or just <name>).
716
717
718              By default the executable file will be created in the build tree
719              directory corresponding to the source tree  directory  in  which
720              the  command was invoked.  See documentation of the RUNTIME_OUT‐
721              PUT_DIRECTORY target property to change this location.  See doc‐
722              umentation  of  the  OUTPUT_NAME  target  property to change the
723              <name> part of the final file name.
724
725
726              If WIN32 is given the property WIN32_EXECUTABLE will be  set  on
727              the  target  created.  See documentation of that target property
728              for details.
729
730
731              If MACOSX_BUNDLE is given the corresponding property will be set
732              on  the  created target.  See documentation of the MACOSX_BUNDLE
733              target property for details.
734
735
736              If EXCLUDE_FROM_ALL is given the corresponding property will  be
737              set   on   the   created   target.   See  documentation  of  the
738              EXCLUDE_FROM_ALL target property for details.
739
740
741              The add_executable command can also create  IMPORTED  executable
742              targets using this signature:
743
744
745                add_executable(<name> IMPORTED)
746
747              An  IMPORTED  executable  target  references  an executable file
748              located outside the project.  No rules are  generated  to  build
749              it.   The  target name has scope in the directory in which it is
750              created and below.  It may be referenced like any  target  built
751              within  the project.  IMPORTED executables are useful for conve‐
752              nient reference from commands like add_custom_command.   Details
753              about  the  imported executable are specified by setting proper‐
754              ties whose names begin in "IMPORTED_".  The most important  such
755              property is IMPORTED_LOCATION (and its per-configuration version
756              IMPORTED_LOCATION_<CONFIG>) which specifies the location of  the
757              main   executable  file  on  disk.   See  documentation  of  the
758              IMPORTED_* properties for more information.
759
760
761       add_library
762              Add a library to the project using the specified source files.
763
764                add_library(<name> [STATIC | SHARED | MODULE]
765                            [EXCLUDE_FROM_ALL]
766                            source1 source2 ... sourceN)
767
768              Adds a library target called <name> to be built from the  source
769              files  listed in the command invocation.  The <name> corresponds
770              to the logical target name and must be globally unique within  a
771              project.   The  actual  file  name  of the library built is con‐
772              structed based on conventions of the native  platform  (such  as
773              lib<name>.a or <name>.lib).
774
775
776              STATIC,  SHARED,  or  MODULE may be given to specify the type of
777              library to be created.  STATIC libraries are archives of  object
778              files  for use when linking other targets.  SHARED libraries are
779              linked dynamically and loaded at runtime.  MODULE libraries  are
780              plugins that are not linked into other targets but may be loaded
781              dynamically at runtime using dlopen-like functionality.   If  no
782              type  is  given explicitly the type is STATIC or SHARED based on
783              whether the current value of the variable  BUILD_SHARED_LIBS  is
784              true.
785
786
787              By  default  the  library file will be created in the build tree
788              directory corresponding to the source tree  directory  in  which
789              the  command was invoked.  See documentation of the ARCHIVE_OUT‐
790              PUT_DIRECTORY,   LIBRARY_OUTPUT_DIRECTORY,   and    RUNTIME_OUT‐
791              PUT_DIRECTORY  target  properties  to change this location.  See
792              documentation of the OUTPUT_NAME target property to  change  the
793              <name> part of the final file name.
794
795
796              If  EXCLUDE_FROM_ALL is given the corresponding property will be
797              set  on  the  created  target.    See   documentation   of   the
798              EXCLUDE_FROM_ALL target property for details.
799
800
801              The add_library command can also create IMPORTED library targets
802              using this signature:
803
804
805                add_library(<name> <SHARED|STATIC|MODULE|UNKNOWN> IMPORTED)
806
807              An IMPORTED library target references  a  library  file  located
808              outside  the  project.  No rules are generated to build it.  The
809              target name has scope in the directory in which  it  is  created
810              and  below.   It  may be referenced like any target built within
811              the project.  IMPORTED libraries are useful for convenient  ref‐
812              erence  from commands like target_link_libraries.  Details about
813              the imported library are specified by setting  properties  whose
814              names begin in "IMPORTED_".  The most important such property is
815              IMPORTED_LOCATION    (and    its    per-configuration    version
816              IMPORTED_LOCATION_<CONFIG>)  which specifies the location of the
817              main library file on disk.  See documentation of the  IMPORTED_*
818              properties for more information.
819
820
821       add_subdirectory
822              Add a subdirectory to the build.
823
824                add_subdirectory(source_dir [binary_dir]
825                                 [EXCLUDE_FROM_ALL])
826
827              Add  a  subdirectory  to the build. The source_dir specifies the
828              directory in which the source CmakeLists.txt and code files  are
829              located.  If  it  is  a  relative path it will be evaluated with
830              respect to the current directory (the typical usage), but it may
831              also be an absolute path. The binary_dir specifies the directory
832              in which to place the output files. If it is a relative path  it
833              will  be evaluated with respect to the current output directory,
834              but it may also be an absolute path. If binary_dir is not speci‐
835              fied,  the  value  of  source_dir, before expanding any relative
836              path, will be used (the typical usage). The CMakeLists.txt  file
837              in  the specified source directory will be processed immediately
838              by CMake before processing in the current input  file  continues
839              beyond this command.
840
841
842              If the EXCLUDE_FROM_ALL argument is provided then targets in the
843              subdirectory will not be included in the ALL target of the  par‐
844              ent  directory by default, and will be excluded from IDE project
845              files.  Users must explicitly build targets in the subdirectory.
846              This  is meant for use when the subdirectory contains a separate
847              part of the project that is useful but not necessary, such as  a
848              set  of examples.  Typically the subdirectory should contain its
849              own project() command invocation so that  a  full  build  system
850              will be generated in the subdirectory (such as a VS IDE solution
851              file).   Note  that  inter-target  dependencies  supercede  this
852              exclusion.  If a target built by the parent project depends on a
853              target in the subdirectory, the dependee target will be included
854              in the parent project build system to satisfy the dependency.
855
856
857       add_test
858              Add a test to the project with the specified arguments.
859
860                add_test(testname Exename arg1 arg2 ... )
861
862              If  the ENABLE_TESTING command has been run, this command adds a
863              test target to the current directory. If ENABLE_TESTING has  not
864              been  run,  this command does nothing.  The tests are run by the
865              testing subsystem by executing Exename with the specified  argu‐
866              ments.   Exename  can  be  either  an  executable  built by this
867              project or an arbitrary executable on the system  (like  tclsh).
868              The  test  will be run with the current working directory set to
869              the CMakeList.txt files corresponding directory  in  the  binary
870              tree.
871
872
873
874
875
876                add_test(NAME <name> [CONFIGURATIONS [Debug|Release|...]]
877                         [WORKING_DIRECTORY dir]
878                         COMMAND <command> [arg1 [arg2 ...]])
879
880              If  COMMAND  specifies an executable target (created by add_exe‐
881              cutable) it will automatically be replaced by  the  location  of
882              the  executable  created  at  build  time.   If a CONFIGURATIONS
883              option is given then the test will be executed only when testing
884              under  one  of the named configurations.  If a WORKING_DIRECTORY
885              option is given then the test will  be  executed  in  the  given
886              directory.
887
888
889              Arguments after COMMAND may use "generator expressions" with the
890              syntax "$<...>".   Generator  expressions  are  evaluted  during
891              build  system generation to produce information specific to each
892              build configuration.  Valid expressions are:
893
894
895                $<CONFIGURATION>          = configuration name
896                $<TARGET_FILE:tgt>        = main file (.exe, .so.1.2, .a)
897                $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)
898                $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)
899
900              where "tgt" is the name of a target.   Target  file  expressions
901              produce a full path, but _DIR and _NAME versions can produce the
902              directory and file name components:
903
904
905                $<TARGET_FILE_DIR:tgt>/$<TARGET_FILE_NAME:tgt>
906                $<TARGET_LINKER_FILE_DIR:tgt>/$<TARGET_LINKER_FILE_NAME:tgt>
907                $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>
908
909              Example usage:
910
911
912                add_test(NAME mytest
913                         COMMAND testDriver --config $<CONFIGURATION>
914                                            --exe $<TARGET_FILE:myexe>)
915
916              This creates a test "mytest" whose  command  runs  a  testDriver
917              tool  passing  the  configuration  name and the full path to the
918              executable file produced by target "myexe".
919
920
921       aux_source_directory
922              Find all source files in a directory.
923
924                aux_source_directory(<dir> <variable>)
925
926              Collects the names of all the  source  files  in  the  specified
927              directory  and stores the list in the <variable> provided.  This
928              command is intended to be used by  projects  that  use  explicit
929              template  instantiation.   Template  instantiation  files can be
930              stored in a "Templates" subdirectory and collected automatically
931              using this command to avoid manually listing all instantiations.
932
933
934              It  is tempting to use this command to avoid writing the list of
935              source files for a library or  executable  target.   While  this
936              seems  to  work,  there  is no way for CMake to generate a build
937              system that knows when a new source file has been  added.   Nor‐
938              mally  the  generated  build system knows when it needs to rerun
939              CMake because the CMakeLists.txt file is modified to add  a  new
940              source.   When the source is just added to the directory without
941              modifying this file, one would have to manually rerun  CMake  to
942              generate a build system incorporating the new file.
943
944
945       break  Break from an enclosing foreach or while loop.
946
947                break()
948
949              Breaks from an enclosing foreach loop or while loop
950
951
952       build_command
953              Get the command line to build this project.
954
955                build_command(<variable>
956                              [CONFIGURATION <config>]
957                              [PROJECT_NAME <projname>]
958                              [TARGET <target>])
959
960              Sets  the  given  <variable>  to a string containing the command
961              line for building one configuration of a  target  in  a  project
962              using  the  build tool appropriate for the current CMAKE_GENERA‐
963              TOR.
964
965
966              If CONFIGURATION is omitted, CMake chooses a reasonable  default
967              value   for  multi-configuration  generators.   CONFIGURATION is
968              ignored for single-configuration generators.
969
970
971              If PROJECT_NAME is omitted,  the  resulting  command  line  will
972              build the top level PROJECT in the current build tree.
973
974
975              If  TARGET  is  omitted,  the  resulting command line will build
976              everything, effectively using build target 'all' or 'ALL_BUILD'.
977
978
979                build_command(<cachevariable> <makecommand>)
980
981              This second signature is deprecated,  but  still  available  for
982              backwards compatibility. Use the first signature instead.
983
984
985              Sets  the  given <cachevariable> to a string containing the com‐
986              mand to build this project from the root of the build tree using
987              the  build tool given by <makecommand>.  <makecommand> should be
988              the full path to msdev, devenv, nmake, make or one  of  the  end
989              user build tools.
990
991
992       cmake_minimum_required
993              Set the minimum required version of cmake for a project.
994
995                cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]
996                                       [FATAL_ERROR])
997
998              If  the  current version of CMake is lower than that required it
999              will stop processing the project and report an  error.   When  a
1000              version  higher  than  2.4  is  specified the command implicitly
1001              invokes
1002
1003
1004                cmake_policy(VERSION major[.minor[.patch[.tweak]]])
1005
1006              which sets the cmake policy version level to the version  speci‐
1007              fied.  When version 2.4 or lower is given the command implicitly
1008              invokes
1009
1010
1011                cmake_policy(VERSION 2.4)
1012
1013              which enables compatibility features for CMake 2.4 and lower.
1014
1015
1016              The FATAL_ERROR option is accepted but ignored by CMake 2.6  and
1017              higher.   It should be specified so CMake versions 2.4 and lower
1018              fail with an error instead of just a warning.
1019
1020
1021       cmake_policy
1022              Manage CMake Policy settings.
1023
1024              As CMake evolves it is sometimes necessary  to  change  existing
1025              behavior  in  order  to  fix  bugs or improve implementations of
1026              existing features.  The CMake Policy mechanism  is  designed  to
1027              help  keep  existing  projects building as new versions of CMake
1028              introduce changes in  behavior.   Each  new  policy  (behavioral
1029              change)  is  given  an  identifier of the form "CMP<NNNN>" where
1030              "<NNNN>" is an integer  index.   Documentation  associated  with
1031              each  policy  describes  the OLD and NEW behavior and the reason
1032              the policy was introduced.  Projects  may  set  each  policy  to
1033              select  the  desired  behavior.   When CMake needs to know which
1034              behavior to use  it  checks  for  a  setting  specified  by  the
1035              project.  If no setting is available the OLD behavior is assumed
1036              and a warning is produced requesting that the policy be set.
1037
1038
1039              The cmake_policy command is used to set policies to OLD  or  NEW
1040              behavior.   While setting policies individually is supported, we
1041              encourage projects to set policies based on CMake versions.
1042
1043
1044                cmake_policy(VERSION major.minor[.patch[.tweak]])
1045
1046              Specify that the current CMake list  file  is  written  for  the
1047              given  version  of CMake.  All policies introduced in the speci‐
1048              fied version or earlier will be set to use  NEW  behavior.   All
1049              policies  introduced  after  the specified version will be unset
1050              (unless variable CMAKE_POLICY_DEFAULT_CMP<NNNN> sets a default).
1051              This effectively requests behavior preferred as of a given CMake
1052              version and tells newer CMake versions to warn about  their  new
1053              policies.   The policy version specified must be at least 2.4 or
1054              the command will report an error.  In order to get compatibility
1055              features  supporting versions earlier than 2.4 see documentation
1056              of policy CMP0001.
1057
1058
1059                cmake_policy(SET CMP<NNNN> NEW)
1060                cmake_policy(SET CMP<NNNN> OLD)
1061
1062              Tell CMake to use the OLD or NEW behavior for  a  given  policy.
1063              Projects  depending  on  the  old behavior of a given policy may
1064              silence a policy warning by setting the  policy  state  to  OLD.
1065              Alternatively  one  may  fix  the  project  to work with the new
1066              behavior and set the policy state to NEW.
1067
1068
1069                cmake_policy(GET CMP<NNNN> <variable>)
1070
1071              Check whether a given policy is set to OLD or NEW behavior.  The
1072              output  variable  value  will be "OLD" or "NEW" if the policy is
1073              set, and empty otherwise.
1074
1075
1076              CMake keeps policy settings on a stack, so changes made  by  the
1077              cmake_policy  command  affect  only the top of the stack.  A new
1078              entry on the policy stack is managed automatically for each sub‐
1079              directory  to protect its parents and siblings.  CMake also man‐
1080              ages a new entry for scripts loaded by include() and  find_pack‐
1081              age()  commands  except  when  invoked  with the NO_POLICY_SCOPE
1082              option (see also policy CMP0011).  The cmake_policy command pro‐
1083              vides an interface to manage custom entries on the policy stack:
1084
1085
1086                cmake_policy(PUSH)
1087                cmake_policy(POP)
1088
1089              Each  PUSH  must have a matching POP to erase any changes.  This
1090              is useful to make temporary changes to policy settings.
1091
1092
1093              Functions and macros record policy settings when they  are  cre‐
1094              ated  and use the pre-record policies when they are invoked.  If
1095              the function or macro implementation sets policies, the  changes
1096              automatically  propagate up through callers until they reach the
1097              closest nested policy stack entry.
1098
1099
1100       configure_file
1101              Copy a file to another location and modify its contents.
1102
1103                configure_file(<input> <output>
1104                               [COPYONLY] [ESCAPE_QUOTES] [@ONLY])
1105
1106              Copies a file <input> to file <output> and substitutes  variable
1107              values referenced in the file content.  If <input> is a relative
1108              path it is evaluated with respect to the current  source  direc‐
1109              tory.  The <input> must be a file, not a directory.  If <output>
1110              is a relative path it is evaluated with respect to  the  current
1111              binary  directory.   If <output> names an existing directory the
1112              input file is placed in that directory with its original name.
1113
1114
1115              This command replaces any variables in the input file referenced
1116              as ${VAR} or @VAR@ with their values as determined by CMake.  If
1117              a variable is not defined, it will be replaced with nothing.  If
1118              COPYONLY  is  specified,  then  no  variable expansion will take
1119              place.  If  ESCAPE_QUOTES  is  specified  then  any  substituted
1120              quotes  will  be  C-style  escaped.  The file will be configured
1121              with the current values of CMake variables. If @ONLY  is  speci‐
1122              fied,  only  variables  of  the  form @VAR@ will be replaces and
1123              ${VAR} will be ignored.  This is useful for configuring  scripts
1124              that  use  ${VAR}.  Any  occurrences of #cmakedefine VAR will be
1125              replaced with either #define VAR or /* #undef VAR  */  depending
1126              on  the  setting  of  VAR in CMake. Any occurrences of #cmakede‐
1127              fine01 VAR will be replaced with either #define VAR 1 or #define
1128              VAR  0  depending  on  whether VAR evaluates to TRUE or FALSE in
1129              CMake
1130
1131
1132       create_test_sourcelist
1133              Create a test driver and source list for building test programs.
1134
1135                create_test_sourcelist(sourceListName driverName
1136                                       test1 test2 test3
1137                                       EXTRA_INCLUDE include.h
1138                                       FUNCTION function)
1139
1140              A test driver is a program that links together many small  tests
1141              into  a  single executable.  This is useful when building static
1142              executables with large libraries to shrink  the  total  required
1143              size.   The list of source files needed to build the test driver
1144              will be in sourceListName.  DriverName is the name of  the  test
1145              driver  program.  The rest of the arguments consist of a list of
1146              test source files, can be semicolon separated.  Each test source
1147              file  should  have a function in it that is the same name as the
1148              file  with  no  extension  (foo.cxx  should  have  int  foo(int,
1149              char*[]);)  DriverName will be able to call each of the tests by
1150              name on the command line. If EXTRA_INCLUDE  is  specified,  then
1151              the  next argument is included into the generated file. If FUNC‐
1152              TION is specified, then the next argument is taken as a function
1153              name that is passed a pointer to ac and av.  This can be used to
1154              add extra command line processing to each test. The cmake  vari‐
1155              able  CMAKE_TESTDRIVER_BEFORE_TESTMAIN  can  be set to have code
1156              that will be placed directly before calling the test main  func‐
1157              tion.    CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code
1158              that will be placed directly after the call  to  the  test  main
1159              function.
1160
1161
1162       define_property
1163              Define and document custom properties.
1164
1165                define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |
1166                                 TEST | VARIABLE | CACHED_VARIABLE>
1167                                 PROPERTY <name> [INHERITED]
1168                                 BRIEF_DOCS <brief-doc> [docs...]
1169                                 FULL_DOCS <full-doc> [docs...])
1170
1171              Define one property in a scope for use with the set_property and
1172              get_property commands.  This is primarily  useful  to  associate
1173              documentation with property names that may be retrieved with the
1174              get_property command.  The first argument determines the kind of
1175              scope  in  which the property should be used.  It must be one of
1176              the following:
1177
1178
1179                GLOBAL    = associated with the global namespace
1180                DIRECTORY = associated with one directory
1181                TARGET    = associated with one target
1182                SOURCE    = associated with one source file
1183                TEST      = associated with a test named with add_test
1184                VARIABLE  = documents a CMake language variable
1185                CACHED_VARIABLE = documents a CMake cache variable
1186
1187              Note that unlike set_property and get_property no  actual  scope
1188              needs to be given; only the kind of scope is important.
1189
1190
1191              The required PROPERTY option is immediately followed by the name
1192              of the property being defined.
1193
1194
1195              If the INHERITED option then the get_property command will chain
1196              up  to  the next higher scope when the requested property is not
1197              set in the scope given to the command.  DIRECTORY  scope  chains
1198              to GLOBAL.  TARGET, SOURCE, and TEST chain to DIRECTORY.
1199
1200
1201              The  BRIEF_DOCS and FULL_DOCS options are followed by strings to
1202              be associated with the property as its brief and full documenta‐
1203              tion.   Corresponding  options  to the get_property command will
1204              retrieve the documentation.
1205
1206
1207       else   Starts the else portion of an if block.
1208
1209                else(expression)
1210
1211              See the if command.
1212
1213
1214       elseif Starts the elseif portion of an if block.
1215
1216                elseif(expression)
1217
1218              See the if command.
1219
1220
1221       enable_language
1222              Enable a language (CXX/C/Fortran/etc)
1223
1224                enable_language(languageName [OPTIONAL] )
1225
1226              This command enables support for the named  language  in  CMake.
1227              This  is the same as the project command but does not create any
1228              of the extra variables that are created by the project  command.
1229              Example  languages are CXX, C, Fortran. If OPTIONAL is used, use
1230              the  CMAKE_<languageName>_COMPILER_WORKS   variable   to   check
1231              whether the language has been enabled successfully.
1232
1233
1234       enable_testing
1235              Enable testing for current directory and below.
1236
1237                enable_testing()
1238
1239              Enables  testing  for  this  directory  and below.  See also the
1240              add_test command.  Note that ctest expects to find a  test  file
1241              in  the build directory root.  Therefore, this command should be
1242              in the source directory root.
1243
1244
1245       endforeach
1246              Ends a list of commands in a FOREACH block.
1247
1248                endforeach(expression)
1249
1250              See the FOREACH command.
1251
1252
1253       endfunction
1254              Ends a list of commands in a function block.
1255
1256                endfunction(expression)
1257
1258              See the function command.
1259
1260
1261       endif  Ends a list of commands in an if block.
1262
1263                endif(expression)
1264
1265              See the if command.
1266
1267
1268       endmacro
1269              Ends a list of commands in a macro block.
1270
1271                endmacro(expression)
1272
1273              See the macro command.
1274
1275
1276       endwhile
1277              Ends a list of commands in a while block.
1278
1279                endwhile(expression)
1280
1281              See the while command.
1282
1283
1284       execute_process
1285              Execute one or more child processes.
1286
1287                execute_process(COMMAND <cmd1> [args1...]]
1288                                [COMMAND <cmd2> [args2...] [...]]
1289                                [WORKING_DIRECTORY <directory>]
1290                                [TIMEOUT <seconds>]
1291                                [RESULT_VARIABLE <variable>]
1292                                [OUTPUT_VARIABLE <variable>]
1293                                [ERROR_VARIABLE <variable>]
1294                                [INPUT_FILE <file>]
1295                                [OUTPUT_FILE <file>]
1296                                [ERROR_FILE <file>]
1297                                [OUTPUT_QUIET]
1298                                [ERROR_QUIET]
1299                                [OUTPUT_STRIP_TRAILING_WHITESPACE]
1300                                [ERROR_STRIP_TRAILING_WHITESPACE])
1301
1302              Runs the given sequence of one or more commands with  the  stan‐
1303              dard  output  of each process piped to the standard input of the
1304              next.  A single standard error pipe is used for  all  processes.
1305              If WORKING_DIRECTORY is given the named directory will be set as
1306              the current working directory of the child processes.  If  TIME‐
1307              OUT  is  given the child processes will be terminated if they do
1308              not finish in the specified number  of  seconds  (fractions  are
1309              allowed).   If RESULT_VARIABLE is given the variable will be set
1310              to contain the result of running the processes.  This will be an
1311              integer  return  code from the last child or a string describing
1312              an error condition.  If OUTPUT_VARIABLE  or  ERROR_VARIABLE  are
1313              given  the  variable  named will be set with the contents of the
1314              standard output and standard error pipes respectively.   If  the
1315              same  variable  is  named  for  both  pipes their output will be
1316              merged in the order produced.  If  INPUT_FILE,  OUTPUT_FILE,  or
1317              ERROR_FILE is given the file named will be attached to the stan‐
1318              dard input of the first process, standard  output  of  the  last
1319              process,  or  standard  error of all processes respectively.  If
1320              OUTPUT_QUIET or ERROR_QUIET is given then the standard output or
1321              standard  error  results  will be quietly ignored.  If more than
1322              one OUTPUT_* or ERROR_* option is given for the  same  pipe  the
1323              precedence  is not specified.  If no OUTPUT_* or ERROR_* options
1324              are given the output will be shared with the corresponding pipes
1325              of the CMake process itself.
1326
1327
1328              The  execute_process command is a newer more powerful version of
1329              exec_program, but the old command has been kept for  compatibil‐
1330              ity.
1331
1332
1333       export Export targets from the build tree for use by outside projects.
1334
1335                export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]
1336                       [APPEND] FILE <filename>)
1337
1338              Create  a  file  <filename>  that  may  be  included  by outside
1339              projects to import targets  from  the  current  project's  build
1340              tree.   This  is  useful during cross-compiling to build utility
1341              executables that can run on the host platform in one project and
1342              then  import  them  into  another project being compiled for the
1343              target platform.  If the NAMESPACE option is given  the  <names‐
1344              pace>  string  will  be prepended to all target names written to
1345              the file.  If the APPEND option is given the generated code will
1346              be appended to the file instead of overwriting it.  If a library
1347              target is included in the export but a target to which it  links
1348              is not included the behavior is unspecified.
1349
1350
1351              The  file  created by this command is specific to the build tree
1352              and should never be installed.  See the install(EXPORT)  command
1353              to export targets from an installation tree.
1354
1355
1356                export(PACKAGE <name>)
1357
1358              Store the current build directory in the CMake user package reg‐
1359              istry for package <name>.  The find_package command may consider
1360              the  directory  while  searching for package <name>.  This helps
1361              dependent projects find and  use  a  package  from  the  current
1362              project's  build tree without help from the user.  Note that the
1363              entry in the package registry that this  command  creates  works
1364              only   in   conjunction   with   a  package  configuration  file
1365              (<name>Config.cmake) that works with the build tree.
1366
1367
1368       file   File manipulation command.
1369
1370                file(WRITE filename "message to write"... )
1371                file(APPEND filename "message to write"... )
1372                file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])
1373                file(STRINGS filename variable [LIMIT_COUNT num]
1374                     [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]
1375                     [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]
1376                     [NEWLINE_CONSUME] [REGEX regex]
1377                     [NO_HEX_CONVERSION])
1378                file(GLOB variable [RELATIVE path] [globbing expressions]...)
1379                file(GLOB_RECURSE variable [RELATIVE path]
1380                     [FOLLOW_SYMLINKS] [globbing expressions]...)
1381                file(RENAME <oldname> <newname>)
1382                file(REMOVE [file1 ...])
1383                file(REMOVE_RECURSE [file1 ...])
1384                file(MAKE_DIRECTORY [directory1 directory2 ...])
1385                file(RELATIVE_PATH variable directory file)
1386                file(TO_CMAKE_PATH path result)
1387                file(TO_NATIVE_PATH path result)
1388                file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log]
1389                     [EXPECTED_MD5 sum] [SHOW_PROGRESS])
1390
1391              WRITE will write a message into a  file  called  'filename'.  It
1392              overwrites  the  file if it already exists, and creates the file
1393              if it does not exist.
1394
1395
1396              APPEND will write a message into a file same as WRITE, except it
1397              will append it to the end of the file
1398
1399
1400              READ will read the content of a file and store it into the vari‐
1401              able. It will start at the given offset and read up to numBytes.
1402              If  the argument HEX is given, the binary data will be converted
1403              to hexadecimal representation and this will  be  stored  in  the
1404              variable.
1405
1406
1407              STRINGS will parse a list of ASCII strings from a file and store
1408              it in a variable. Binary data in the file are ignored.  Carriage
1409              return  (CR) characters are ignored. It works also for Intel Hex
1410              and Motorola S-record files, which are  automatically  converted
1411              to   binary   format  when  reading  them.  Disable  this  using
1412              NO_HEX_CONVERSION.
1413
1414
1415              LIMIT_COUNT sets  the  maximum  number  of  strings  to  return.
1416              LIMIT_INPUT  sets  the  maximum number of bytes to read from the
1417              input file. LIMIT_OUTPUT sets the maximum  number  of  bytes  to
1418              store  in  the  output variable. LENGTH_MINIMUM sets the minimum
1419              length of a string  to  return.  Shorter  strings  are  ignored.
1420              LENGTH_MAXIMUM  sets  the  maximum length of a string to return.
1421              Longer strings are split into strings no longer than the maximum
1422              length.  NEWLINE_CONSUME  allows  newlines  to  be  included  in
1423              strings instead of terminating them.
1424
1425
1426              REGEX specifies a regular expression that a string must match to
1427              be returned. Typical usage
1428
1429
1430                file(STRINGS myfile.txt myfile)
1431
1432              stores  a  list in the variable "myfile" in which each item is a
1433              line from the input file.
1434
1435
1436              GLOB will generate a list of all files that match  the  globbing
1437              expressions and store it into the variable. Globbing expressions
1438              are similar to regular expressions, but much simpler.  If  RELA‐
1439              TIVE  flag  is  specified for an expression, the results will be
1440              returned as a relative path to the given path.  (We do not  rec‐
1441              ommend  using  GLOB  to collect a list of source files from your
1442              source tree.  If no CMakeLists.txt file changes when a source is
1443              added  or  removed  then  the generated build system cannot know
1444              when to ask CMake to regenerate.)
1445
1446
1447              Examples of globbing expressions include:
1448
1449
1450                 *.cxx      - match all files with extension cxx
1451                 *.vt?      - match all files with extension vta,...,vtz
1452                 f[3-5].txt - match files f3.txt, f4.txt, f5.txt
1453
1454              GLOB_RECURSE will generate a list similar to the  regular  GLOB,
1455              except  it  will  traverse all the subdirectories of the matched
1456              directory and match the files. Subdirectories that are  symlinks
1457              are  only  traversed if FOLLOW_SYMLINKS is given or cmake policy
1458              CMP0009 is not set to NEW. See cmake --help-policy  CMP0009  for
1459              more information.
1460
1461
1462              Examples of recursive globbing include:
1463
1464
1465                 /dir/*.py  - match all python files in /dir and subdirectories
1466
1467              MAKE_DIRECTORY  will create the given directories, also if their
1468              parent directories don't exist yet
1469
1470
1471              RENAME moves a file or directory within a filesystem,  replacing
1472              the destination atomically.
1473
1474
1475              REMOVE will remove the given files, also in subdirectories
1476
1477
1478              REMOVE_RECURSE will remove the given files and directories, also
1479              non-empty directories
1480
1481
1482              RELATIVE_PATH will determine relative path from directory to the
1483              given file.
1484
1485
1486              TO_CMAKE_PATH  will  convert  path  into a cmake style path with
1487              unix /.  The input can be a single path or a  system  path  like
1488              "$ENV{PATH}".   Note  the  double  quotes  around  the  ENV call
1489              TO_CMAKE_PATH only takes  one argument.
1490
1491
1492              TO_NATIVE_PATH works just like TO_CMAKE_PATH, but  will  convert
1493              from   a  cmake style path into the native path style \ for win‐
1494              dows and / for UNIX.
1495
1496
1497              DOWNLOAD will download the given URL to the given file.  If  LOG
1498              var  is  specified  a log of the download will be put in var. If
1499              STATUS var is specified the status of the operation will be  put
1500              in  var. The status is returned in a list of length 2. The first
1501              element is the numeric return value for the operation,  and  the
1502              second  element  is  a  string  value for the error. A 0 numeric
1503              error means no error in the operation. If TIMEOUT time is speci‐
1504              fied, the operation will timeout after time seconds, time should
1505              be specified as an integer. If EXPECTED_MD5  sum  is  specified,
1506              the  operation will verify that the downloaded file's actual md5
1507              sum matches the expected value. If it does not match, the opera‐
1508              tion  fails  with  an  error.  If  SHOW_PROGRESS  is  specified,
1509              progress information will be printed as  status  messages  until
1510              the operation is complete.
1511
1512
1513              The file() command also provides COPY and INSTALL signatures:
1514
1515
1516                file(<COPY|INSTALL> files... DESTINATION <dir>
1517                     [FILE_PERMISSIONS permissions...]
1518                     [DIRECTORY_PERMISSIONS permissions...]
1519                     [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
1520                     [FILES_MATCHING]
1521                     [[PATTERN <pattern> | REGEX <regex>]
1522                      [EXCLUDE] [PERMISSIONS permissions...]] [...])
1523
1524              The  COPY signature copies files, directories, and symlinks to a
1525              destination folder.  Relative input  paths  are  evaluated  with
1526              respect to the current source directory, and a relative destina‐
1527              tion is evaluated with respect to the current  build  directory.
1528              Copying  preserves  input  file  timestamps, and optimizes out a
1529              file if it exists at the destination with  the  same  timestamp.
1530              Copying  preserves input permissions unless explicit permissions
1531              or NO_SOURCE_PERMISSIONS are given (default  is  USE_SOURCE_PER‐
1532              MISSIONS).  See the install(DIRECTORY) command for documentation
1533              of permissions, PATTERN, REGEX, and EXCLUDE options.
1534
1535
1536              The INSTALL signature differs slightly from COPY: it prints sta‐
1537              tus  messages,  and NO_SOURCE_PERMISSIONS is default.  Installa‐
1538              tion scripts generated by the install() command use this  signa‐
1539              ture (with some undocumented options for internal use).
1540
1541
1542       find_file
1543              Find the full path to a file.
1544
1545                 find_file(<VAR> name1 [path1 path2 ...])
1546
1547              This  is the short-hand signature for the command that is suffi‐
1548              cient in many cases.  It is the same  as  find_file(<VAR>  name1
1549              [PATHS path1 path2 ...])
1550
1551
1552                 find_file(
1553                           <VAR>
1554                           name | NAMES name1 [name2 ...]
1555                           [HINTS path1 [path2 ... ENV var]]
1556                           [PATHS path1 [path2 ... ENV var]]
1557                           [PATH_SUFFIXES suffix1 [suffix2 ...]]
1558                           [DOC "cache documentation string"]
1559                           [NO_DEFAULT_PATH]
1560                           [NO_CMAKE_ENVIRONMENT_PATH]
1561                           [NO_CMAKE_PATH]
1562                           [NO_SYSTEM_ENVIRONMENT_PATH]
1563                           [NO_CMAKE_SYSTEM_PATH]
1564                           [CMAKE_FIND_ROOT_PATH_BOTH |
1565                            ONLY_CMAKE_FIND_ROOT_PATH |
1566                            NO_CMAKE_FIND_ROOT_PATH]
1567                          )
1568
1569              This  command is used to find a full path to named file. A cache
1570              entry named by <VAR> is created to store the result of this com‐
1571              mand.   If the full path to a file is found the result is stored
1572              in the variable and the search will not be repeated  unless  the
1573              variable  is  cleared.   If nothing is found, the result will be
1574              <VAR>-NOTFOUND, and the search will be attempted again the  next
1575              time  find_file  is invoked with the same variable.  The name of
1576              the full path to a file that is searched for is specified by the
1577              names listed after the NAMES argument.   Additional search loca‐
1578              tions can be specified after the PATHS argument.  If ENV var  is
1579              found in the HINTS or PATHS section the environment variable var
1580              will be read and converted from a system environment variable to
1581              a  cmake  style  list of paths.  For example ENV PATH would be a
1582              way to list the system path variable.  The  argument  after  DOC
1583              will  be  used  for  the  documentation  string  in  the  cache.
1584              PATH_SUFFIXES specifies additional subdirectories to check below
1585              each search path.
1586
1587
1588              If  NO_DEFAULT_PATH  is  specified, then no additional paths are
1589              added to the search. If NO_DEFAULT_PATH is  not  specified,  the
1590              search process is as follows:
1591
1592
1593              1.  Search  paths  specified  in cmake-specific cache variables.
1594              These are intended to  be  used  on  the  command  line  with  a
1595              -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
1596
1597
1598                 <prefix>/include for each <prefix> in CMAKE_PREFIX_PATH
1599                 CMAKE_INCLUDE_PATH
1600                 CMAKE_FRAMEWORK_PATH
1601
1602              2.  Search  paths  specified in cmake-specific environment vari‐
1603              ables.  These are intended to be set in the user's shell config‐
1604              uration.   This  can  be skipped if NO_CMAKE_ENVIRONMENT_PATH is
1605              passed.
1606
1607
1608                 <prefix>/include for each <prefix> in CMAKE_PREFIX_PATH
1609                 CMAKE_INCLUDE_PATH
1610                 CMAKE_FRAMEWORK_PATH
1611
1612              3. Search the paths specified by the HINTS option.  These should
1613              be  paths  computed by system introspection, such as a hint pro‐
1614              vided by the location of another item already found.  Hard-coded
1615              guesses should be specified with the PATHS option.
1616
1617
1618              4. Search the standard system environment variables. This can be
1619              skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
1620
1621
1622                 PATH
1623                 INCLUDE
1624
1625              5. Search cmake variables defined in the Platform files for  the
1626              current  system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is
1627              passed.
1628
1629
1630                 <prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH
1631                 CMAKE_SYSTEM_INCLUDE_PATH
1632                 CMAKE_SYSTEM_FRAMEWORK_PATH
1633
1634              6. Search the paths specified by the  PATHS  option  or  in  the
1635              short-hand   version   of  the  command.   These  are  typically
1636              hard-coded guesses.
1637
1638
1639              On Darwin or systems supporting OS X Frameworks, the cmake vari‐
1640              able     CMAKE_FIND_FRAMEWORK  can be set to empty or one of the
1641              following:
1642
1643
1644                 "FIRST"  - Try to find frameworks before standard
1645                            libraries or headers. This is the default on Darwin.
1646                 "LAST"   - Try to find frameworks after standard
1647                            libraries or headers.
1648                 "ONLY"   - Only try to find frameworks.
1649                 "NEVER" - Never try to find frameworks.
1650
1651              On Darwin or systems supporting OS X  Application  Bundles,  the
1652              cmake  variable  CMAKE_FIND_APPBUNDLE can be set to empty or one
1653              of the following:
1654
1655
1656                 "FIRST"  - Try to find application bundles before standard
1657                            programs. This is the default on Darwin.
1658                 "LAST"   - Try to find application bundles after standard
1659                            programs.
1660                 "ONLY"   - Only try to find application bundles.
1661                 "NEVER" - Never try to find application bundles.
1662
1663              The CMake variable CMAKE_FIND_ROOT_PATH specifies  one  or  more
1664              directories  to  be  prepended  to all other search directories.
1665              This effectively "re-roots" the entire search under given  loca‐
1666              tions.  By  default  it  is  empty. It is especially useful when
1667              cross-compiling to point to the root  directory  of  the  target
1668              environment and CMake will search there too. By default at first
1669              the directories listed  in  CMAKE_FIND_ROOT_PATH  and  then  the
1670              non-rooted  directories  will  be searched. The default behavior
1671              can be adjusted  by  setting  CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.
1672              This behavior can be manually overridden on a per-call basis. By
1673              using CMAKE_FIND_ROOT_PATH_BOTH the  search  order  will  be  as
1674              described   above.   If  NO_CMAKE_FIND_ROOT_PATH  is  used  then
1675              CMAKE_FIND_ROOT_PATH     will     not      be      used.      If
1676              ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted direc‐
1677              tories will be searched.
1678
1679
1680              The default search order is  designed  to  be  most-specific  to
1681              least-specific  for common use cases.  Projects may override the
1682              order by simply calling the command multiple times and using the
1683              NO_* options:
1684
1685
1686                 find_file(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH)
1687                 find_file(<VAR> NAMES name)
1688
1689              Once  one  of the calls succeeds the result variable will be set
1690              and stored in the cache so that no call will search again.
1691
1692
1693       find_library
1694              Find a library.
1695
1696                 find_library(<VAR> name1 [path1 path2 ...])
1697
1698              This is the short-hand signature for the command that is  suffi‐
1699              cient in many cases.  It is the same as find_library(<VAR> name1
1700              [PATHS path1 path2 ...])
1701
1702
1703                 find_library(
1704                           <VAR>
1705                           name | NAMES name1 [name2 ...]
1706                           [HINTS path1 [path2 ... ENV var]]
1707                           [PATHS path1 [path2 ... ENV var]]
1708                           [PATH_SUFFIXES suffix1 [suffix2 ...]]
1709                           [DOC "cache documentation string"]
1710                           [NO_DEFAULT_PATH]
1711                           [NO_CMAKE_ENVIRONMENT_PATH]
1712                           [NO_CMAKE_PATH]
1713                           [NO_SYSTEM_ENVIRONMENT_PATH]
1714                           [NO_CMAKE_SYSTEM_PATH]
1715                           [CMAKE_FIND_ROOT_PATH_BOTH |
1716                            ONLY_CMAKE_FIND_ROOT_PATH |
1717                            NO_CMAKE_FIND_ROOT_PATH]
1718                          )
1719
1720              This command is used to find a library. A cache entry  named  by
1721              <VAR>  is  created  to store the result of this command.  If the
1722              library is found the result is stored in the  variable  and  the
1723              search  will not be repeated unless the variable is cleared.  If
1724              nothing is found, the result will  be  <VAR>-NOTFOUND,  and  the
1725              search  will  be  attempted  again the next time find_library is
1726              invoked with the same variable.  The name of the library that is
1727              searched  for  is  specified by the names listed after the NAMES
1728              argument.   Additional search locations can be  specified  after
1729              the  PATHS  argument.  If ENV var is found in the HINTS or PATHS
1730              section the environment variable var will be read and  converted
1731              from  a  system  environment  variable  to a cmake style list of
1732              paths.  For example ENV PATH would be a way to list  the  system
1733              path variable. The argument after DOC will be used for the docu‐
1734              mentation string in the cache.   PATH_SUFFIXES  specifies  addi‐
1735              tional subdirectories to check below each search path.
1736
1737
1738              If  NO_DEFAULT_PATH  is  specified, then no additional paths are
1739              added to the search. If NO_DEFAULT_PATH is  not  specified,  the
1740              search process is as follows:
1741
1742
1743              1.  Search  paths  specified  in cmake-specific cache variables.
1744              These are intended to  be  used  on  the  command  line  with  a
1745              -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
1746
1747
1748                 <prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH
1749                 CMAKE_LIBRARY_PATH
1750                 CMAKE_FRAMEWORK_PATH
1751
1752              2.  Search  paths  specified in cmake-specific environment vari‐
1753              ables.  These are intended to be set in the user's shell config‐
1754              uration.   This  can  be skipped if NO_CMAKE_ENVIRONMENT_PATH is
1755              passed.
1756
1757
1758                 <prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH
1759                 CMAKE_LIBRARY_PATH
1760                 CMAKE_FRAMEWORK_PATH
1761
1762              3. Search the paths specified by the HINTS option.  These should
1763              be  paths  computed by system introspection, such as a hint pro‐
1764              vided by the location of another item already found.  Hard-coded
1765              guesses should be specified with the PATHS option.
1766
1767
1768              4. Search the standard system environment variables. This can be
1769              skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
1770
1771
1772                 PATH
1773                 LIB
1774
1775              5. Search cmake variables defined in the Platform files for  the
1776              current  system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is
1777              passed.
1778
1779
1780                 <prefix>/lib for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH
1781                 CMAKE_SYSTEM_LIBRARY_PATH
1782                 CMAKE_SYSTEM_FRAMEWORK_PATH
1783
1784              6. Search the paths specified by the  PATHS  option  or  in  the
1785              short-hand   version   of  the  command.   These  are  typically
1786              hard-coded guesses.
1787
1788
1789              On Darwin or systems supporting OS X Frameworks, the cmake vari‐
1790              able     CMAKE_FIND_FRAMEWORK  can be set to empty or one of the
1791              following:
1792
1793
1794                 "FIRST"  - Try to find frameworks before standard
1795                            libraries or headers. This is the default on Darwin.
1796                 "LAST"   - Try to find frameworks after standard
1797                            libraries or headers.
1798                 "ONLY"   - Only try to find frameworks.
1799                 "NEVER" - Never try to find frameworks.
1800
1801              On Darwin or systems supporting OS X  Application  Bundles,  the
1802              cmake  variable  CMAKE_FIND_APPBUNDLE can be set to empty or one
1803              of the following:
1804
1805
1806                 "FIRST"  - Try to find application bundles before standard
1807                            programs. This is the default on Darwin.
1808                 "LAST"   - Try to find application bundles after standard
1809                            programs.
1810                 "ONLY"   - Only try to find application bundles.
1811                 "NEVER" - Never try to find application bundles.
1812
1813              The CMake variable CMAKE_FIND_ROOT_PATH specifies  one  or  more
1814              directories  to  be  prepended  to all other search directories.
1815              This effectively "re-roots" the entire search under given  loca‐
1816              tions.  By  default  it  is  empty. It is especially useful when
1817              cross-compiling to point to the root  directory  of  the  target
1818              environment and CMake will search there too. By default at first
1819              the directories listed  in  CMAKE_FIND_ROOT_PATH  and  then  the
1820              non-rooted  directories  will  be searched. The default behavior
1821              can be adjusted  by  setting  CMAKE_FIND_ROOT_PATH_MODE_LIBRARY.
1822              This behavior can be manually overridden on a per-call basis. By
1823              using CMAKE_FIND_ROOT_PATH_BOTH the  search  order  will  be  as
1824              described   above.   If  NO_CMAKE_FIND_ROOT_PATH  is  used  then
1825              CMAKE_FIND_ROOT_PATH     will     not      be      used.      If
1826              ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted direc‐
1827              tories will be searched.
1828
1829
1830              The default search order is  designed  to  be  most-specific  to
1831              least-specific  for common use cases.  Projects may override the
1832              order by simply calling the command multiple times and using the
1833              NO_* options:
1834
1835
1836                 find_library(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH)
1837                 find_library(<VAR> NAMES name)
1838
1839              Once  one  of the calls succeeds the result variable will be set
1840              and stored in the cache so that no call will search again.
1841
1842
1843              If the library found is a framework, then VAR will be set to the
1844              full  path  to the framework <fullPath>/A.framework. When a full
1845              path to a framework is used as  a  library,  CMake  will  use  a
1846              -framework  A,  and  a -F<fullPath> to link the framework to the
1847              target.
1848
1849
1850       find_package
1851              Load settings for an external project.
1852
1853                find_package(<package> [version] [EXACT] [QUIET]
1854                             [[REQUIRED|COMPONENTS] [components...]]
1855                             [NO_POLICY_SCOPE])
1856
1857              Finds and loads  settings  from  an  external  project.   <pack‐
1858              age>_FOUND  will  be  set  to  indicate  whether the package was
1859              found.  When the package is found  package-specific  information
1860              is  provided through variables documented by the package itself.
1861              The QUIET option disables messages  if  the  package  cannot  be
1862              found.   The REQUIRED option stops processing with an error mes‐
1863              sage if the package cannot be found.  A package-specific list of
1864              components  may be listed after the REQUIRED option or after the
1865              COMPONENTS option if no REQUIRED option is given.  The [version]
1866              argument  requests a version with which the package found should
1867              be compatible (format  is  major[.minor[.patch[.tweak]]]).   The
1868              EXACT  option  requests that the version be matched exactly.  If
1869              no [version]  is  given  to  a  recursive  invocation  inside  a
1870              find-module,  the  [version]  and  EXACT arguments are forwarded
1871              automatically from the outer call.  Version support is currently
1872              provided only on a package-by-package basis (details below).
1873
1874
1875              User  code  should  generally  look for packages using the above
1876              simple signature.  The remainder of this  command  documentation
1877              specifies  the  full command signature and details of the search
1878              process.  Project maintainers wishing to provide a package to be
1879              found by this command are encouraged to read on.
1880
1881
1882              The  command  has  two  modes by which it searches for packages:
1883              "Module" mode and "Config" mode.  Module mode is available  when
1884              the  command is invoked with the above reduced signature.  CMake
1885              searches  for  a  file  called  "Find<package>.cmake"   in   the
1886              CMAKE_MODULE_PATH  followed  by  the CMake installation.  If the
1887              file is found, it is read and processed by CMake.  It is respon‐
1888              sible for finding the package, checking the version, and produc‐
1889              ing any needed messages.  Many find-modules provide  limited  or
1890              no  support  for versioning; check the module documentation.  If
1891              no module is found the command proceeds to Config mode.
1892
1893
1894              The complete Config mode command signature is:
1895
1896
1897                find_package(<package> [version] [EXACT] [QUIET]
1898                             [[REQUIRED|COMPONENTS] [components...]] [NO_MODULE]
1899                             [NO_POLICY_SCOPE]
1900                             [NAMES name1 [name2 ...]]
1901                             [CONFIGS config1 [config2 ...]]
1902                             [HINTS path1 [path2 ... ]]
1903                             [PATHS path1 [path2 ... ]]
1904                             [PATH_SUFFIXES suffix1 [suffix2 ...]]
1905                             [NO_DEFAULT_PATH]
1906                             [NO_CMAKE_ENVIRONMENT_PATH]
1907                             [NO_CMAKE_PATH]
1908                             [NO_SYSTEM_ENVIRONMENT_PATH]
1909                             [NO_CMAKE_PACKAGE_REGISTRY]
1910                             [NO_CMAKE_BUILDS_PATH]
1911                             [NO_CMAKE_SYSTEM_PATH]
1912                             [CMAKE_FIND_ROOT_PATH_BOTH |
1913                              ONLY_CMAKE_FIND_ROOT_PATH |
1914                              NO_CMAKE_FIND_ROOT_PATH])
1915
1916              The NO_MODULE option may be used to skip Module mode explicitly.
1917              It  is  also  implied  by  use  of  options not specified in the
1918              reduced signature.
1919
1920
1921              Config mode attempts to locate a configuration file provided  by
1922              the  package to be found.  A cache entry called <package>_DIR is
1923              created to hold the directory containing the file.   By  default
1924              the  command searches for a package with the name <package>.  If
1925              the NAMES option is  given  the  names  following  it  are  used
1926              instead  of  <package>.   The command searches for a file called
1927              "<name>Config.cmake"  or  "<lower-case-name>-config.cmake"   for
1928              each  name  specified.  A replacement set of possible configura‐
1929              tion file names may be given  using  the  CONFIGS  option.   The
1930              search procedure is specified below.  Once found, the configura‐
1931              tion file is read and processed by CMake.   Since  the  file  is
1932              provided by the package it already knows the location of package
1933              contents.  The full path to the configuration file is stored  in
1934              the cmake variable <package>_CONFIG.
1935
1936
1937              All  configuration  files  which  have  been considered by CMake
1938              while searching for an  installation  of  the  package  with  an
1939              appropriate  version  are  stored  in  the cmake variable <pack‐
1940              age>_CONSIDERED_CONFIGS,  the  associated  versions  in   <pack‐
1941              age>_CONSIDERED_VERSIONS.
1942
1943
1944              If  the  package  configuration  file cannot be found CMake will
1945              generate an error describing the problem unless the QUIET  argu‐
1946              ment  is specified.  If REQUIRED is specified and the package is
1947              not found a fatal error is  generated  and  the  configure  step
1948              stops  executing.   If <package>_DIR has been set to a directory
1949              not containing a configuration file CMake  will  ignore  it  and
1950              search from scratch.
1951
1952
1953              When  the [version] argument is given Config mode will only find
1954              a version of the package  that  claims  compatibility  with  the
1955              requested version (format is major[.minor[.patch[.tweak]]]).  If
1956              the EXACT option is given only a version of the package claiming
1957              an  exact  match  of  the requested version may be found.  CMake
1958              does not establish any convention for  the  meaning  of  version
1959              numbers.  Package version numbers are checked by "version" files
1960              provided by the packages themselves.  For  a  candidate  package
1961              configuration  file "<config-file>.cmake" the corresponding ver‐
1962              sion file  is  located  next  to  it  and  named  either  "<con‐
1963              fig-file>-version.cmake" or "<config-file>Version.cmake".  If no
1964              such version file is available then the  configuration  file  is
1965              assumed to not be compatible with any requested version.  When a
1966              version file is found it is loaded to check the  requested  ver‐
1967              sion  number.   The  version file is loaded in a nested scope in
1968              which the following variables have been defined:
1969
1970
1971                PACKAGE_FIND_NAME          = the <package> name
1972                PACKAGE_FIND_VERSION       = full requested version string
1973                PACKAGE_FIND_VERSION_MAJOR = major version if requested, else 0
1974                PACKAGE_FIND_VERSION_MINOR = minor version if requested, else 0
1975                PACKAGE_FIND_VERSION_PATCH = patch version if requested, else 0
1976                PACKAGE_FIND_VERSION_TWEAK = tweak version if requested, else 0
1977                PACKAGE_FIND_VERSION_COUNT = number of version components, 0 to 4
1978
1979              The version file checks whether it satisfies the requested  ver‐
1980              sion and sets these variables:
1981
1982
1983                PACKAGE_VERSION            = full provided version string
1984                PACKAGE_VERSION_EXACT      = true if version is exact match
1985                PACKAGE_VERSION_COMPATIBLE = true if version is compatible
1986                PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version
1987
1988              These  variables  are  checked  by  the  find_package command to
1989              determine whether the configuration file provides an  acceptable
1990              version.   They  are  not  available after the find_package call
1991              returns.  If the version is acceptable the  following  variables
1992              are set:
1993
1994
1995                <package>_VERSION       = full provided version string
1996                <package>_VERSION_MAJOR = major version if provided, else 0
1997                <package>_VERSION_MINOR = minor version if provided, else 0
1998                <package>_VERSION_PATCH = patch version if provided, else 0
1999                <package>_VERSION_TWEAK = tweak version if provided, else 0
2000                <package>_VERSION_COUNT = number of version components, 0 to 4
2001
2002              and  the  corresponding  package  configuration  file is loaded.
2003              When multiple package configuration files  are  available  whose
2004              version  files claim compatibility with the version requested it
2005              is unspecified which one is  chosen.   No  attempt  is  made  to
2006              choose a highest or closest version number.
2007
2008
2009              Config  mode  provides  an elaborate interface and search proce‐
2010              dure.  Much of the interface is provided  for  completeness  and
2011              for  use internally by find-modules loaded by Module mode.  Most
2012              user code should simply call
2013
2014
2015                find_package(<package> [major[.minor]] [EXACT] [REQUIRED|QUIET])
2016
2017              in order to find a package.  Package maintainers providing CMake
2018              package  configuration  files are encouraged to name and install
2019              them such that the procedure outlined below will find them with‐
2020              out requiring use of additional options.
2021
2022
2023              CMake constructs a set of possible installation prefixes for the
2024              package.  Under each prefix several directories are searched for
2025              a  configuration  file.   The  tables below show the directories
2026              searched.  Each entry is meant for installation trees  following
2027              Windows (W), UNIX (U), or Apple (A) conventions.
2028
2029
2030                <prefix>/                                               (W)
2031                <prefix>/(cmake|CMake)/                                 (W)
2032                <prefix>/<name>*/                                       (W)
2033                <prefix>/<name>*/(cmake|CMake)/                         (W)
2034                <prefix>/(share|lib)/cmake/<name>*/                     (U)
2035                <prefix>/(share|lib)/<name>*/                           (U)
2036                <prefix>/(share|lib)/<name>*/(cmake|CMake)/             (U)
2037
2038              On  systems  supporting  OS X Frameworks and Application Bundles
2039              the following directories are searched for frameworks or bundles
2040              containing a configuration file:
2041
2042
2043                <prefix>/<name>.framework/Resources/                    (A)
2044                <prefix>/<name>.framework/Resources/CMake/              (A)
2045                <prefix>/<name>.framework/Versions/*/Resources/         (A)
2046                <prefix>/<name>.framework/Versions/*/Resources/CMake/   (A)
2047                <prefix>/<name>.app/Contents/Resources/                 (A)
2048                <prefix>/<name>.app/Contents/Resources/CMake/           (A)
2049
2050              In  all cases the <name> is treated as case-insensitive and cor‐
2051              responds to any of the names specified (<package> or names given
2052              by  NAMES).   If  PATH_SUFFIXES  is  specified  the suffixes are
2053              appended to each (W) or (U) directory entry one-by-one.
2054
2055
2056              This set of directories is intended to work in cooperation  with
2057              projects  that provide configuration files in their installation
2058              trees.  Directories above  marked  with  (W)  are  intended  for
2059              installations  on  Windows where the prefix may point at the top
2060              of an application's installation directory.  Those  marked  with
2061              (U)  are  intended for installations on UNIX platforms where the
2062              prefix is shared by multiple packages.  This is merely a conven‐
2063              tion,  so  all (W) and (U) directories are still searched on all
2064              platforms.  Directories marked with (A) are intended for instal‐
2065              lations    on    Apple    platforms.     The   cmake   variables
2066              CMAKE_FIND_FRAMEWORK  and  CMAKE_FIND_APPBUNDLE  determine   the
2067              order of preference as specified below.
2068
2069
2070              The  set  of installation prefixes is constructed using the fol‐
2071              lowing steps.  If NO_DEFAULT_PATH is specified all NO_*  options
2072              are enabled.
2073
2074
2075              1.  Search  paths  specified  in cmake-specific cache variables.
2076              These are intended to  be  used  on  the  command  line  with  a
2077              -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
2078
2079
2080                 CMAKE_PREFIX_PATH
2081                 CMAKE_FRAMEWORK_PATH
2082                 CMAKE_APPBUNDLE_PATH
2083
2084              2.  Search  paths  specified in cmake-specific environment vari‐
2085              ables.  These are intended to be set in the user's shell config‐
2086              uration.   This  can  be skipped if NO_CMAKE_ENVIRONMENT_PATH is
2087              passed.
2088
2089
2090                 <package>_DIR
2091                 CMAKE_PREFIX_PATH
2092                 CMAKE_FRAMEWORK_PATH
2093                 CMAKE_APPBUNDLE_PATH
2094
2095              3. Search paths specified by the HINTS option.  These should  be
2096              paths  computed by system introspection, such as a hint provided
2097              by the location  of  another  item  already  found.   Hard-coded
2098              guesses should be specified with the PATHS option.
2099
2100
2101              4. Search the standard system environment variables. This can be
2102              skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed.   Path  entries
2103              ending in "/bin" or "/sbin" are automatically converted to their
2104              parent directories.
2105
2106
2107                 PATH
2108
2109              5. Search project build trees recently  configured  in  a  CMake
2110              GUI.  This can be skipped if NO_CMAKE_BUILDS_PATH is passed.  It
2111              is intended for the case when a user is building multiple depen‐
2112              dent projects one after another.
2113
2114
2115              6. Search paths stored in the CMake user package registry.  This
2116              can be skipped if NO_CMAKE_PACKAGE_REGISTRY  is  passed.   Paths
2117              are  stored in the registry when CMake configures a project that
2118              invokes export(PACKAGE <name>).  See the export(PACKAGE) command
2119              documentation for more details.
2120
2121
2122              7.  Search cmake variables defined in the Platform files for the
2123              current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH  is
2124              passed.
2125
2126
2127                 CMAKE_SYSTEM_PREFIX_PATH
2128                 CMAKE_SYSTEM_FRAMEWORK_PATH
2129                 CMAKE_SYSTEM_APPBUNDLE_PATH
2130
2131              8.  Search paths specified by the PATHS option.  These are typi‐
2132              cally hard-coded guesses.
2133
2134
2135              On Darwin or systems supporting OS X Frameworks, the cmake vari‐
2136              able     CMAKE_FIND_FRAMEWORK  can be set to empty or one of the
2137              following:
2138
2139
2140                 "FIRST"  - Try to find frameworks before standard
2141                            libraries or headers. This is the default on Darwin.
2142                 "LAST"   - Try to find frameworks after standard
2143                            libraries or headers.
2144                 "ONLY"   - Only try to find frameworks.
2145                 "NEVER" - Never try to find frameworks.
2146
2147              On Darwin or systems supporting OS X  Application  Bundles,  the
2148              cmake  variable  CMAKE_FIND_APPBUNDLE can be set to empty or one
2149              of the following:
2150
2151
2152                 "FIRST"  - Try to find application bundles before standard
2153                            programs. This is the default on Darwin.
2154                 "LAST"   - Try to find application bundles after standard
2155                            programs.
2156                 "ONLY"   - Only try to find application bundles.
2157                 "NEVER" - Never try to find application bundles.
2158
2159              The CMake variable CMAKE_FIND_ROOT_PATH specifies  one  or  more
2160              directories  to  be  prepended  to all other search directories.
2161              This effectively "re-roots" the entire search under given  loca‐
2162              tions.  By  default  it  is  empty. It is especially useful when
2163              cross-compiling to point to the root  directory  of  the  target
2164              environment and CMake will search there too. By default at first
2165              the directories listed  in  CMAKE_FIND_ROOT_PATH  and  then  the
2166              non-rooted  directories  will  be searched. The default behavior
2167              can be adjusted  by  setting  CMAKE_FIND_ROOT_PATH_MODE_PACKAGE.
2168              This behavior can be manually overridden on a per-call basis. By
2169              using CMAKE_FIND_ROOT_PATH_BOTH the  search  order  will  be  as
2170              described   above.   If  NO_CMAKE_FIND_ROOT_PATH  is  used  then
2171              CMAKE_FIND_ROOT_PATH     will     not      be      used.      If
2172              ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted direc‐
2173              tories will be searched.
2174
2175
2176              The default search order is  designed  to  be  most-specific  to
2177              least-specific  for common use cases.  Projects may override the
2178              order by simply calling the command multiple times and using the
2179              NO_* options:
2180
2181
2182                 find_package(<package> PATHS paths... NO_DEFAULT_PATH)
2183                 find_package(<package>)
2184
2185              Once  one  of the calls succeeds the result variable will be set
2186              and stored in the cache so that no call will search again.
2187
2188
2189              See the cmake_policy() command documentation for  discussion  of
2190              the NO_POLICY_SCOPE option.
2191
2192
2193       find_path
2194              Find the directory containing a file.
2195
2196                 find_path(<VAR> name1 [path1 path2 ...])
2197
2198              This  is the short-hand signature for the command that is suffi‐
2199              cient in many cases.  It is the same  as  find_path(<VAR>  name1
2200              [PATHS path1 path2 ...])
2201
2202
2203                 find_path(
2204                           <VAR>
2205                           name | NAMES name1 [name2 ...]
2206                           [HINTS path1 [path2 ... ENV var]]
2207                           [PATHS path1 [path2 ... ENV var]]
2208                           [PATH_SUFFIXES suffix1 [suffix2 ...]]
2209                           [DOC "cache documentation string"]
2210                           [NO_DEFAULT_PATH]
2211                           [NO_CMAKE_ENVIRONMENT_PATH]
2212                           [NO_CMAKE_PATH]
2213                           [NO_SYSTEM_ENVIRONMENT_PATH]
2214                           [NO_CMAKE_SYSTEM_PATH]
2215                           [CMAKE_FIND_ROOT_PATH_BOTH |
2216                            ONLY_CMAKE_FIND_ROOT_PATH |
2217                            NO_CMAKE_FIND_ROOT_PATH]
2218                          )
2219
2220              This  command  is  used to find a directory containing the named
2221              file. A cache entry named by  <VAR>  is  created  to  store  the
2222              result of this command.  If the file in a directory is found the
2223              result is stored in the variable and  the  search  will  not  be
2224              repeated  unless  the variable is cleared.  If nothing is found,
2225              the result will  be  <VAR>-NOTFOUND,  and  the  search  will  be
2226              attempted again the next time find_path is invoked with the same
2227              variable.  The name of the file in a directory that is  searched
2228              for  is  specified by the names listed after the NAMES argument.
2229              Additional search locations can be  specified  after  the  PATHS
2230              argument.  If ENV var is found in the HINTS or PATHS section the
2231              environment variable var will be read and converted from a  sys‐
2232              tem  environment  variable  to a cmake style list of paths.  For
2233              example ENV PATH would be a way to list the  system  path  vari‐
2234              able.  The argument after DOC will be used for the documentation
2235              string in the cache.  PATH_SUFFIXES specifies additional  subdi‐
2236              rectories to check below each search path.
2237
2238
2239              If  NO_DEFAULT_PATH  is  specified, then no additional paths are
2240              added to the search. If NO_DEFAULT_PATH is  not  specified,  the
2241              search process is as follows:
2242
2243
2244              1.  Search  paths  specified  in cmake-specific cache variables.
2245              These are intended to  be  used  on  the  command  line  with  a
2246              -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
2247
2248
2249                 <prefix>/include for each <prefix> in CMAKE_PREFIX_PATH
2250                 CMAKE_INCLUDE_PATH
2251                 CMAKE_FRAMEWORK_PATH
2252
2253              2.  Search  paths  specified in cmake-specific environment vari‐
2254              ables.  These are intended to be set in the user's shell config‐
2255              uration.   This  can  be skipped if NO_CMAKE_ENVIRONMENT_PATH is
2256              passed.
2257
2258
2259                 <prefix>/include for each <prefix> in CMAKE_PREFIX_PATH
2260                 CMAKE_INCLUDE_PATH
2261                 CMAKE_FRAMEWORK_PATH
2262
2263              3. Search the paths specified by the HINTS option.  These should
2264              be  paths  computed by system introspection, such as a hint pro‐
2265              vided by the location of another item already found.  Hard-coded
2266              guesses should be specified with the PATHS option.
2267
2268
2269              4. Search the standard system environment variables. This can be
2270              skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
2271
2272
2273                 PATH
2274                 INCLUDE
2275
2276              5. Search cmake variables defined in the Platform files for  the
2277              current  system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is
2278              passed.
2279
2280
2281                 <prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH
2282                 CMAKE_SYSTEM_INCLUDE_PATH
2283                 CMAKE_SYSTEM_FRAMEWORK_PATH
2284
2285              6. Search the paths specified by the  PATHS  option  or  in  the
2286              short-hand   version   of  the  command.   These  are  typically
2287              hard-coded guesses.
2288
2289
2290              On Darwin or systems supporting OS X Frameworks, the cmake vari‐
2291              able     CMAKE_FIND_FRAMEWORK  can be set to empty or one of the
2292              following:
2293
2294
2295                 "FIRST"  - Try to find frameworks before standard
2296                            libraries or headers. This is the default on Darwin.
2297                 "LAST"   - Try to find frameworks after standard
2298                            libraries or headers.
2299                 "ONLY"   - Only try to find frameworks.
2300                 "NEVER" - Never try to find frameworks.
2301
2302              On Darwin or systems supporting OS X  Application  Bundles,  the
2303              cmake  variable  CMAKE_FIND_APPBUNDLE can be set to empty or one
2304              of the following:
2305
2306
2307                 "FIRST"  - Try to find application bundles before standard
2308                            programs. This is the default on Darwin.
2309                 "LAST"   - Try to find application bundles after standard
2310                            programs.
2311                 "ONLY"   - Only try to find application bundles.
2312                 "NEVER" - Never try to find application bundles.
2313
2314              The CMake variable CMAKE_FIND_ROOT_PATH specifies  one  or  more
2315              directories  to  be  prepended  to all other search directories.
2316              This effectively "re-roots" the entire search under given  loca‐
2317              tions.  By  default  it  is  empty. It is especially useful when
2318              cross-compiling to point to the root  directory  of  the  target
2319              environment and CMake will search there too. By default at first
2320              the directories listed  in  CMAKE_FIND_ROOT_PATH  and  then  the
2321              non-rooted  directories  will  be searched. The default behavior
2322              can be adjusted  by  setting  CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.
2323              This behavior can be manually overridden on a per-call basis. By
2324              using CMAKE_FIND_ROOT_PATH_BOTH the  search  order  will  be  as
2325              described   above.   If  NO_CMAKE_FIND_ROOT_PATH  is  used  then
2326              CMAKE_FIND_ROOT_PATH     will     not      be      used.      If
2327              ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted direc‐
2328              tories will be searched.
2329
2330
2331              The default search order is  designed  to  be  most-specific  to
2332              least-specific  for common use cases.  Projects may override the
2333              order by simply calling the command multiple times and using the
2334              NO_* options:
2335
2336
2337                 find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH)
2338                 find_path(<VAR> NAMES name)
2339
2340              Once  one  of the calls succeeds the result variable will be set
2341              and stored in the cache so that no call will search again.
2342
2343
2344              When searching for frameworks,  if  the  file  is  specified  as
2345              A/b.h, then the framework search will look for A.framework/Head‐
2346              ers/b.h. If that is found the path will be set to  the  path  to
2347              the  framework. CMake will convert this to the correct -F option
2348              to include the file.
2349
2350
2351       find_program
2352              Find an executable program.
2353
2354                 find_program(<VAR> name1 [path1 path2 ...])
2355
2356              This is the short-hand signature for the command that is  suffi‐
2357              cient in many cases.  It is the same as find_program(<VAR> name1
2358              [PATHS path1 path2 ...])
2359
2360
2361                 find_program(
2362                           <VAR>
2363                           name | NAMES name1 [name2 ...]
2364                           [HINTS path1 [path2 ... ENV var]]
2365                           [PATHS path1 [path2 ... ENV var]]
2366                           [PATH_SUFFIXES suffix1 [suffix2 ...]]
2367                           [DOC "cache documentation string"]
2368                           [NO_DEFAULT_PATH]
2369                           [NO_CMAKE_ENVIRONMENT_PATH]
2370                           [NO_CMAKE_PATH]
2371                           [NO_SYSTEM_ENVIRONMENT_PATH]
2372                           [NO_CMAKE_SYSTEM_PATH]
2373                           [CMAKE_FIND_ROOT_PATH_BOTH |
2374                            ONLY_CMAKE_FIND_ROOT_PATH |
2375                            NO_CMAKE_FIND_ROOT_PATH]
2376                          )
2377
2378              This command is used to find a program. A cache entry  named  by
2379              <VAR>  is  created  to store the result of this command.  If the
2380              program is found the result is stored in the  variable  and  the
2381              search  will not be repeated unless the variable is cleared.  If
2382              nothing is found, the result will  be  <VAR>-NOTFOUND,  and  the
2383              search  will  be  attempted  again the next time find_program is
2384              invoked with the same variable.  The name of the program that is
2385              searched  for  is  specified by the names listed after the NAMES
2386              argument.   Additional search locations can be  specified  after
2387              the  PATHS  argument.  If ENV var is found in the HINTS or PATHS
2388              section the environment variable var will be read and  converted
2389              from  a  system  environment  variable  to a cmake style list of
2390              paths.  For example ENV PATH would be a way to list  the  system
2391              path variable. The argument after DOC will be used for the docu‐
2392              mentation string in the cache.   PATH_SUFFIXES  specifies  addi‐
2393              tional subdirectories to check below each search path.
2394
2395
2396              If  NO_DEFAULT_PATH  is  specified, then no additional paths are
2397              added to the search. If NO_DEFAULT_PATH is  not  specified,  the
2398              search process is as follows:
2399
2400
2401              1.  Search  paths  specified  in cmake-specific cache variables.
2402              These are intended to  be  used  on  the  command  line  with  a
2403              -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
2404
2405
2406                 <prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH
2407                 CMAKE_PROGRAM_PATH
2408                 CMAKE_APPBUNDLE_PATH
2409
2410              2.  Search  paths  specified in cmake-specific environment vari‐
2411              ables.  These are intended to be set in the user's shell config‐
2412              uration.   This  can  be skipped if NO_CMAKE_ENVIRONMENT_PATH is
2413              passed.
2414
2415
2416                 <prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH
2417                 CMAKE_PROGRAM_PATH
2418                 CMAKE_APPBUNDLE_PATH
2419
2420              3. Search the paths specified by the HINTS option.  These should
2421              be  paths  computed by system introspection, such as a hint pro‐
2422              vided by the location of another item already found.  Hard-coded
2423              guesses should be specified with the PATHS option.
2424
2425
2426              4. Search the standard system environment variables. This can be
2427              skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
2428
2429
2430                 PATH
2431
2432
2433              5. Search cmake variables defined in the Platform files for  the
2434              current  system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is
2435              passed.
2436
2437
2438                 <prefix>/[s]bin for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH
2439                 CMAKE_SYSTEM_PROGRAM_PATH
2440                 CMAKE_SYSTEM_APPBUNDLE_PATH
2441
2442              6. Search the paths specified by the  PATHS  option  or  in  the
2443              short-hand   version   of  the  command.   These  are  typically
2444              hard-coded guesses.
2445
2446
2447              On Darwin or systems supporting OS X Frameworks, the cmake vari‐
2448              able     CMAKE_FIND_FRAMEWORK  can be set to empty or one of the
2449              following:
2450
2451
2452                 "FIRST"  - Try to find frameworks before standard
2453                            libraries or headers. This is the default on Darwin.
2454                 "LAST"   - Try to find frameworks after standard
2455                            libraries or headers.
2456                 "ONLY"   - Only try to find frameworks.
2457                 "NEVER" - Never try to find frameworks.
2458
2459              On Darwin or systems supporting OS X  Application  Bundles,  the
2460              cmake  variable  CMAKE_FIND_APPBUNDLE can be set to empty or one
2461              of the following:
2462
2463
2464                 "FIRST"  - Try to find application bundles before standard
2465                            programs. This is the default on Darwin.
2466                 "LAST"   - Try to find application bundles after standard
2467                            programs.
2468                 "ONLY"   - Only try to find application bundles.
2469                 "NEVER" - Never try to find application bundles.
2470
2471              The CMake variable CMAKE_FIND_ROOT_PATH specifies  one  or  more
2472              directories  to  be  prepended  to all other search directories.
2473              This effectively "re-roots" the entire search under given  loca‐
2474              tions.  By  default  it  is  empty. It is especially useful when
2475              cross-compiling to point to the root  directory  of  the  target
2476              environment and CMake will search there too. By default at first
2477              the directories listed  in  CMAKE_FIND_ROOT_PATH  and  then  the
2478              non-rooted  directories  will  be searched. The default behavior
2479              can be adjusted  by  setting  CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.
2480              This behavior can be manually overridden on a per-call basis. By
2481              using CMAKE_FIND_ROOT_PATH_BOTH the  search  order  will  be  as
2482              described   above.   If  NO_CMAKE_FIND_ROOT_PATH  is  used  then
2483              CMAKE_FIND_ROOT_PATH     will     not      be      used.      If
2484              ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted direc‐
2485              tories will be searched.
2486
2487
2488              The default search order is  designed  to  be  most-specific  to
2489              least-specific  for common use cases.  Projects may override the
2490              order by simply calling the command multiple times and using the
2491              NO_* options:
2492
2493
2494                 find_program(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH)
2495                 find_program(<VAR> NAMES name)
2496
2497              Once  one  of the calls succeeds the result variable will be set
2498              and stored in the cache so that no call will search again.
2499
2500
2501       fltk_wrap_ui
2502              Create FLTK user interfaces Wrappers.
2503
2504                fltk_wrap_ui(resultingLibraryName source1
2505                             source2 ... sourceN )
2506
2507              Produce .h and .cxx files for all the .fl and .fld files listed.
2508              The  resulting  .h  and  .cxx  files will be added to a variable
2509              named resultingLibraryName_FLTK_UI_SRCS which should be added to
2510              your library.
2511
2512
2513       foreach
2514              Evaluate a group of commands for each value in a list.
2515
2516                foreach(loop_var arg1 arg2 ...)
2517                  COMMAND1(ARGS ...)
2518                  COMMAND2(ARGS ...)
2519                  ...
2520                endforeach(loop_var)
2521
2522              All  commands  between  foreach  and the matching endforeach are
2523              recorded without being invoked.  Once the endforeach  is  evalu‐
2524              ated,  the  recorded  list  of commands is invoked once for each
2525              argument listed in the original foreach  command.   Before  each
2526              iteration  of  the  loop "${loop_var}" will be set as a variable
2527              with the current value in the list.
2528
2529
2530                foreach(loop_var RANGE total)
2531                foreach(loop_var RANGE start stop [step])
2532
2533              Foreach can also iterate over  a  generated  range  of  numbers.
2534              There are three types of this iteration:
2535
2536
2537              *  When specifying single number, the range will have elements 0
2538              to "total".
2539
2540
2541              * When specifying two numbers, the range will have elements from
2542              the first number to the second number.
2543
2544
2545              *  The  third  optional  number is the increment used to iterate
2546              from the first number to the second number.
2547
2548
2549                foreach(loop_var IN [LISTS [list1 [...]]]
2550                                    [ITEMS [item1 [...]]])
2551
2552              Iterates over a precise list of items.  The LISTS  option  names
2553              list-valued  variables to be traversed, including empty elements
2554              (an empty string is a zero-length list).  The ITEMS option  ends
2555              argument  parsing and includes all arguments following it in the
2556              iteration.
2557
2558
2559       function
2560              Start recording a function for later invocation as a command.
2561
2562                function(<name> [arg1 [arg2 [arg3 ...]]])
2563                  COMMAND1(ARGS ...)
2564                  COMMAND2(ARGS ...)
2565                  ...
2566                endfunction(<name>)
2567
2568              Define a function named <name> that takes arguments  named  arg1
2569              arg2 arg3 (...).  Commands listed after function, but before the
2570              matching endfunction, are not  invoked  until  the  function  is
2571              invoked.  When it is invoked, the commands recorded in the func‐
2572              tion are first modified by replacing formal parameters (${arg1})
2573              with  the arguments passed, and then invoked as normal commands.
2574              In addition to referencing the formal parameters you can  refer‐
2575              ence  the variable ARGC which will be set to the number of argu‐
2576              ments passed into the function as well as ARGV0 ARGV1 ARGV2  ...
2577              which  will  have  the actual values of the arguments passed in.
2578              This facilitates creating  functions  with  optional  arguments.
2579              Additionally  ARGV  holds the list of all arguments given to the
2580              function and ARGN holds the  list  of  argument  past  the  last
2581              expected argument.
2582
2583
2584              See the cmake_policy() command documentation for the behavior of
2585              policies inside functions.
2586
2587
2588       get_cmake_property
2589              Get a property of the CMake instance.
2590
2591                get_cmake_property(VAR property)
2592
2593              Get a property from the CMake instance.  The value of the  prop‐
2594              erty  is  stored  in  the  variable VAR.  If the property is not
2595              found, VAR will be set to "NOTFOUND".  Some supported properties
2596              include:  VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and COM‐
2597              PONENTS.
2598
2599
2600              See also the more general get_property() command.
2601
2602
2603       get_directory_property
2604              Get a property of DIRECTORY scope.
2605
2606                get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)
2607
2608              Store a property of directory scope in the named  variable.   If
2609              the  property  is not defined the empty-string is returned.  The
2610              DIRECTORY argument specifies another  directory  from  which  to
2611              retrieve  the property value.  The specified directory must have
2612              already been traversed by CMake.
2613
2614
2615                get_directory_property(<variable> [DIRECTORY <dir>]
2616                                       DEFINITION <var-name>)
2617
2618              Get a variable definition from a directory.  This form is useful
2619              to get a variable definition from another directory.
2620
2621
2622              See also the more general get_property() command.
2623
2624
2625       get_filename_component
2626              Get a specific component of a full filename.
2627
2628                get_filename_component(<VAR> FileName
2629                                       PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH
2630                                       [CACHE])
2631
2632              Set  <VAR>  to be the path (PATH), file name (NAME), file exten‐
2633              sion (EXT), file name without extension (NAME_WE)  of  FileName,
2634              the  full  path  (ABSOLUTE),  or the full path with all symlinks
2635              resolved (REALPATH).  Note that the path is  converted  to  Unix
2636              slashes  format  and  has  no trailing slashes. The longest file
2637              extension is always considered. If the optional  CACHE  argument
2638              is specified, the result variable is added to the cache.
2639
2640
2641                get_filename_component(<VAR> FileName
2642                                       PROGRAM [PROGRAM_ARGS <ARG_VAR>]
2643                                       [CACHE])
2644
2645              The  program in FileName will be found in the system search path
2646              or left as a full path.  If PROGRAM_ARGS is  present  with  PRO‐
2647              GRAM,  then  any  command-line arguments present in the FileName
2648              string are split from the program name and stored in  <ARG_VAR>.
2649              This  is used to separate a program name from its arguments in a
2650              command line string.
2651
2652
2653       get_property
2654              Get a property.
2655
2656                get_property(<variable>
2657                             <GLOBAL             |
2658                              DIRECTORY [dir]    |
2659                              TARGET    <target> |
2660                              SOURCE    <source> |
2661                              TEST      <test>   |
2662                              CACHE     <entry>  |
2663                              VARIABLE>
2664                             PROPERTY <name>
2665                             [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])
2666
2667              Get one property from one object in a scope.  The first argument
2668              specifies the variable in which to store the result.  The second
2669              argument determines the scope from which to  get  the  property.
2670              It must be one of the following:
2671
2672
2673              GLOBAL scope is unique and does not accept a name.
2674
2675
2676              DIRECTORY  scope  defaults  to the current directory but another
2677              directory (already processed by CMake) may be named by  full  or
2678              relative path.
2679
2680
2681              TARGET scope must name one existing target.
2682
2683
2684              SOURCE scope must name one source file.
2685
2686
2687              TEST scope must name one existing test.
2688
2689
2690              CACHE scope must name one cache entry.
2691
2692
2693              VARIABLE scope is unique and does not accept a name.
2694
2695
2696              The required PROPERTY option is immediately followed by the name
2697              of the property to get.  If the property is  not  set  an  empty
2698              value  is  returned.  If the SET option is given the variable is
2699              set to a boolean value indicating whether the property has  been
2700              set.   If  the  DEFINED option is given the variable is set to a
2701              boolean value indicating whether the property has  been  defined
2702              such  as  with  define_property.  If  BRIEF_DOCS or FULL_DOCS is
2703              given then the variable is set to a string containing documenta‐
2704              tion  for the requested property.  If documentation is requested
2705              for a property that has not been defined NOTFOUND is returned.
2706
2707
2708       get_source_file_property
2709              Get a property for a source file.
2710
2711                get_source_file_property(VAR file property)
2712
2713              Get a property from a source file.  The value of the property is
2714              stored  in  the variable VAR.  If the property is not found, VAR
2715              will be set to "NOTFOUND".  Use  set_source_files_properties  to
2716              set property values.  Source file properties usually control how
2717              the file is built. One property that is always there is LOCATION
2718
2719
2720              See also the more general get_property() command.
2721
2722
2723       get_target_property
2724              Get a property from a target.
2725
2726                get_target_property(VAR target property)
2727
2728              Get a property from a target.   The value  of  the  property  is
2729              stored  in  the variable VAR.  If the property is not found, VAR
2730              will be set to "NOTFOUND".   Use  set_target_properties  to  set
2731              property  values.   Properties are usually used to control how a
2732              target is built, but some query the target instead.   This  com‐
2733              mand  can get properties for any target so far created. The tar‐
2734              gets do not need to be in the current CMakeLists.txt file.
2735
2736
2737              See also the more general get_property() command.
2738
2739
2740       get_test_property
2741              Get a property of the test.
2742
2743                get_test_property(test property VAR)
2744
2745              Get a property from the Test.  The  value  of  the  property  is
2746              stored  in  the variable VAR.  If the property is not found, VAR
2747              will be set to "NOTFOUND". For a list of standard properties you
2748              can type cmake --help-property-list
2749
2750
2751              See also the more general get_property() command.
2752
2753
2754       if     Conditionally execute a group of commands.
2755
2756                if(expression)
2757                  # then section.
2758                  COMMAND1(ARGS ...)
2759                  COMMAND2(ARGS ...)
2760                  ...
2761                elseif(expression2)
2762                  # elseif section.
2763                  COMMAND1(ARGS ...)
2764                  COMMAND2(ARGS ...)
2765                  ...
2766                else(expression)
2767                  # else section.
2768                  COMMAND1(ARGS ...)
2769                  COMMAND2(ARGS ...)
2770                  ...
2771                endif(expression)
2772
2773              Evaluates the given expression.  If the result is true, the com‐
2774              mands in the THEN section are invoked.  Otherwise, the  commands
2775              in  the  else section are invoked.  The elseif and else sections
2776              are optional. You may have multiple elseif  clauses.  Note  that
2777              the  expression  in  the else and endif clause is optional. Long
2778              expressions can be used and there  is  a  traditional  order  of
2779              precedence.  Parenthetical  expressions are evaluated first fol‐
2780              lowed by unary operators such as EXISTS, COMMAND,  and  DEFINED.
2781              Then  any  EQUAL,  LESS, GREATER, STRLESS, STRGREATER, STREQUAL,
2782              MATCHES will be evaluated. Then NOT operators and  finally  AND,
2783              OR operators will be evaluated. Possible expressions are:
2784
2785
2786                if(<constant>)
2787
2788              True  if the constant is 1, ON, YES, TRUE, Y, or a non-zero num‐
2789              ber.  False if the constant is 0, OFF, NO, FALSE, N, IGNORE, "",
2790              or  ends in the suffix '-NOTFOUND'.  Named boolean constants are
2791              case-insensitive.  If the argument is  not  one  of  these  con‐
2792              stants, it is treated as a variable:
2793
2794
2795                if(<variable>)
2796
2797              True  if  the variable is defined to a value that is not a false
2798              constant.  False otherwise.
2799
2800
2801                if(NOT <expression>)
2802
2803              True if the expression is not true.
2804
2805
2806                if(<expr1> AND <expr2>)
2807
2808              True if both expressions would be considered true individually.
2809
2810
2811                if(<expr1> OR <expr2>)
2812
2813              True if either expression would be considered true individually.
2814
2815
2816                if(COMMAND command-name)
2817
2818              True if the given name is a command, macro or function that  can
2819              be invoked.
2820
2821
2822                if(POLICY policy-id)
2823
2824              True  if  the  given  name  is  an  existing policy (of the form
2825              CMP<NNNN>).
2826
2827
2828                if(TARGET target-name)
2829
2830              True if the given name is an existing target, built or imported.
2831
2832
2833                if(EXISTS file-name)
2834                if(EXISTS directory-name)
2835
2836              True if  the  named  file  or  directory  exists.   Behavior  is
2837              well-defined only for full paths.
2838
2839
2840                if(file1 IS_NEWER_THAN file2)
2841
2842              True  if  file1  is  newer than file2 or if one of the two files
2843              doesn't exist. Behavior is well-defined only for full paths.
2844
2845
2846                if(IS_DIRECTORY directory-name)
2847
2848              True if the given name is a directory.  Behavior is well-defined
2849              only for full paths.
2850
2851
2852                if(IS_SYMLINK file-name)
2853
2854              True  if  the  given  name  is  a  symbolic  link.   Behavior is
2855              well-defined only for full paths.
2856
2857
2858                if(IS_ABSOLUTE path)
2859
2860              True if the given path is an absolute path.
2861
2862
2863                if(<variable|string> MATCHES regex)
2864
2865              True if the given string or variable's value matches  the  given
2866              regular expression.
2867
2868
2869                if(<variable|string> LESS <variable|string>)
2870                if(<variable|string> GREATER <variable|string>)
2871                if(<variable|string> EQUAL <variable|string>)
2872
2873              True  if  the given string or variable's value is a valid number
2874              and the inequality or equality is true.
2875
2876
2877                if(<variable|string> STRLESS <variable|string>)
2878                if(<variable|string> STRGREATER <variable|string>)
2879                if(<variable|string> STREQUAL <variable|string>)
2880
2881              True if the given string or variable's  value  is  lexicographi‐
2882              cally less (or greater, or equal) than the string or variable on
2883              the right.
2884
2885
2886                if(<variable|string> VERSION_LESS <variable|string>)
2887                if(<variable|string> VERSION_EQUAL <variable|string>)
2888                if(<variable|string> VERSION_GREATER <variable|string>)
2889
2890              Component-wise integer version number comparison (version format
2891              is major[.minor[.patch[.tweak]]]).
2892
2893
2894                if(DEFINED <variable>)
2895
2896              True if the given variable is defined. It does not matter if the
2897              variable is true or false just if it has been set.
2898
2899
2900                if((expression) AND (expression OR (expression)))
2901
2902              The expressions inside the parenthesis are evaluated  first  and
2903              then  the  remaining  expression is evaluated as in the previous
2904              examples. Where there are nested parenthesis the  innermost  are
2905              evaluated  as  part  of  evaluating the expression that contains
2906              them.
2907
2908
2909              The if command was written very early in CMake's  history,  pre‐
2910              dating  the  ${} variable evaluation syntax, and for convenience
2911              evaluates variables named by its arguments as shown in the above
2912              signatures.   Note  that  normal  variable  evaluation  with ${}
2913              applies before the  if  command  even  receives  the  arguments.
2914              Therefore code like
2915
2916
2917                set(var1 OFF)
2918                set(var2 "var1")
2919                if(${var2})
2920
2921              appears to the if command as
2922
2923
2924                if(var1)
2925
2926              and is evaluated according to the if(<variable>) case documented
2927              above.  The result is OFF which is false.  However, if we remove
2928              the ${} from the example then the command sees
2929
2930
2931                if(var2)
2932
2933              which  is  true because var2 is defined to "var1" which is not a
2934              false constant.
2935
2936
2937              Automatic evaluation applies in the  other  cases  whenever  the
2938              above-documented signature accepts <variable|string>:
2939
2940
2941              1)  The left hand argument to MATCHES is first checked to see if
2942              it is a defined variable, if so the variable's  value  is  used,
2943              otherwise the original value is used.
2944
2945
2946              2)  If  the  left hand argument to MATCHES is missing it returns
2947              false without error
2948
2949
2950              3) Both left and right hand arguments to LESS GREATER EQUAL  are
2951              independently tested to see if they are defined variables, if so
2952              their defined values are used otherwise the  original  value  is
2953              used.
2954
2955
2956              4)  Both  left and right hand arguments to STRLESS STREQUAL STR‐
2957              GREATER are independently tested to  see  if  they  are  defined
2958              variables,  if  so  their  defined values are used otherwise the
2959              original value is used.
2960
2961
2962              5) Both left and right  hand  argumemnts  to  VERSION_LESS  VER‐
2963              SION_EQUAL  VERSION_GREATER  are  independently tested to see if
2964              they are defined variables, if so their defined values are  used
2965              otherwise the original value is used.
2966
2967
2968              6)  The  right  hand argument to NOT is tested to see if it is a
2969              boolean constant, if so the  value  is  used,  otherwise  it  is
2970              assumed to be a variable and it is dereferenced.
2971
2972
2973              7) The left and right hand arguments to AND OR are independently
2974              tested to see if they are boolean constants, if so they are used
2975              as  such,  otherwise  they  are  assumed to be variables and are
2976              dereferenced.
2977
2978
2979
2980       include
2981              Read CMake listfile code from the given file.
2982
2983                include(<file|module> [OPTIONAL] [RESULT_VARIABLE <VAR>]
2984                                      [NO_POLICY_SCOPE])
2985
2986              Reads CMake listfile code from the given file.  Commands in  the
2987              file  are processed immediately as if they were written in place
2988              of the include command.  If OPTIONAL is present, then  no  error
2989              is  raised  if  the  file does not exist.  If RESULT_VARIABLE is
2990              given the variable will be set to the full  filename  which  has
2991              been included or NOTFOUND if it failed.
2992
2993
2994              If  a  module is specified instead of a file, the file with name
2995              <modulename>.cmake is searched first in CMAKE_MODULE_PATH,  then
2996              in  the  CMake module directory. There is one exception to this:
2997              if the file which calls include() is located itself in the CMake
2998              module  directory,  then  first  the  CMake  module directory is
2999              searched  and  CMAKE_MODULE_PATH  afterwards.  See  also  policy
3000              CMP0017.
3001
3002
3003              See  the  cmake_policy() command documentation for discussion of
3004              the NO_POLICY_SCOPE option.
3005
3006
3007       include_directories
3008              Add include directories to the build.
3009
3010                include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)
3011
3012              Add the given directories to those searched by the compiler  for
3013              include  files. By default the directories are appended onto the
3014              current list  of  directories.  This  default  behavior  can  be
3015              changed  by  setting  CMAKE_include_directories_BEFORE to ON. By
3016              using BEFORE or AFTER  you  can  select  between  appending  and
3017              prepending,  independent  from the default. If the SYSTEM option
3018              is given the compiler will be  told  that  the  directories  are
3019              meant as system include directories on some platforms.
3020
3021
3022       include_external_msproject
3023              Include an external Microsoft project file in a workspace.
3024
3025                include_external_msproject(projectname location
3026                                           dep1 dep2 ...)
3027
3028              Includes   an   external  Microsoft  project  in  the  generated
3029              workspace file.  Currently does nothing on UNIX. This will  cre‐
3030              ate  a  target  named  [projectname].   This  can be used in the
3031              add_dependencies command to make things depend on  the  external
3032              project.
3033
3034
3035       include_regular_expression
3036              Set the regular expression used for dependency checking.
3037
3038                include_regular_expression(regex_match [regex_complain])
3039
3040              Set  the  regular expressions used in dependency checking.  Only
3041              files matching regex_match will be traced as dependencies.  Only
3042              files  matching  regex_complain  will  generate warnings if they
3043              cannot be found (standard header paths are not  searched).   The
3044              defaults are:
3045
3046
3047                regex_match    = "^.*$" (match everything)
3048                regex_complain = "^$" (match empty string only)
3049
3050
3051       install
3052              Specify rules to run at install time.
3053
3054              This  command generates installation rules for a project.  Rules
3055              specified by calls to this command within a source directory are
3056              executed  in order during installation.  The order across direc‐
3057              tories is not defined.
3058
3059
3060              There are multiple signatures for this command.   Some  of  them
3061              define  installation  properties for files and targets.  Proper‐
3062              ties common to multiple signatures are covered here but they are
3063              valid only for signatures that specify them.
3064
3065
3066              DESTINATION  arguments  specify the directory on disk to which a
3067              file will be installed.  If a full path (with a leading slash or
3068              drive  letter) is given it is used directly.  If a relative path
3069              is  given  it  is  interpreted  relative   to   the   value   of
3070              CMAKE_INSTALL_PREFIX.
3071
3072
3073              PERMISSIONS  arguments  specify permissions for installed files.
3074              Valid permissions are  OWNER_READ,  OWNER_WRITE,  OWNER_EXECUTE,
3075              GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, WORLD_WRITE,
3076              WORLD_EXECUTE, SETUID, and SETGID.  Permissions that do not make
3077              sense on certain platforms are ignored on those platforms.
3078
3079
3080              The CONFIGURATIONS argument specifies a list of build configura‐
3081              tions for which the install rule applies (Debug, Release, etc.).
3082
3083
3084              The COMPONENT argument specifies an installation component  name
3085              with  which the install rule is associated, such as "runtime" or
3086              "development".   During  component-specific  installation   only
3087              install  rules  associated with the given component name will be
3088              executed.   During  a  full  installation  all  components   are
3089              installed.
3090
3091
3092              The  RENAME argument specifies a name for an installed file that
3093              may be different from the original file.   Renaming  is  allowed
3094              only when a single file is installed by the command.
3095
3096
3097              The  OPTIONAL  argument specifies that it is not an error if the
3098              file to be installed does not exist.
3099
3100
3101              The TARGETS signature:
3102
3103
3104                install(TARGETS targets... [EXPORT <export-name>]
3105                        [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|
3106                          PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]
3107                         [DESTINATION <dir>]
3108                         [PERMISSIONS permissions...]
3109                         [CONFIGURATIONS [Debug|Release|...]]
3110                         [COMPONENT <component>]
3111                         [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]
3112                        ] [...])
3113
3114              The TARGETS form specifies rules for installing targets  from  a
3115              project.   There  are  five  kinds  of  target files that may be
3116              installed: ARCHIVE, LIBRARY,  RUNTIME,  FRAMEWORK,  and  BUNDLE.
3117              Executables  are  treated  as RUNTIME targets, except that those
3118              marked with the MACOSX_BUNDLE property  are  treated  as  BUNDLE
3119              targets  on OS X. Static libraries are always treated as ARCHIVE
3120              targets. Module libraries are always treated as LIBRARY targets.
3121              For  non-DLL  platforms  shared libraries are treated as LIBRARY
3122              targets, except that those marked with  the  FRAMEWORK  property
3123              are treated as FRAMEWORK targets on OS X.  For DLL platforms the
3124              DLL part of a shared library is treated as a RUNTIME target  and
3125              the  corresponding  import library is treated as an ARCHIVE tar‐
3126              get. All Windows-based systems including Cygwin  are  DLL  plat‐
3127              forms.  The  ARCHIVE,  LIBRARY, RUNTIME, and FRAMEWORK arguments
3128              change the type of target to  which  the  subsequent  properties
3129              apply.   If  none  is given the installation properties apply to
3130              all target types.  If only one is given  then  only  targets  of
3131              that type will be installed (which can be used to install just a
3132              DLL or just an import library).
3133
3134
3135              The PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE arguments  cause
3136              subsequent  properties  to  be applied to installing a FRAMEWORK
3137              shared library target's associated files on non-Apple platforms.
3138              Rules  defined by these arguments are ignored on Apple platforms
3139              because the associated files are installed into the  appropriate
3140              locations inside the framework folder.  See documentation of the
3141              PRIVATE_HEADER, PUBLIC_HEADER, and  RESOURCE  target  properties
3142              for details.
3143
3144
3145              Either  NAMELINK_ONLY  or  NAMELINK_SKIP  may  be specified as a
3146              LIBRARY option.  On some platforms a  versioned  shared  library
3147              has a symbolic link such as
3148
3149
3150                lib<name>.so -> lib<name>.so.1
3151
3152              where   "lib<name>.so.1"  is  the  soname  of  the  library  and
3153              "lib<name>.so" is a "namelink"  allowing  linkers  to  find  the
3154              library  when given "-l<name>".  The NAMELINK_ONLY option causes
3155              installation of only the  namelink  when  a  library  target  is
3156              installed.   The  NAMELINK_SKIP  option  causes  installation of
3157              library files other than the namelink when a library  target  is
3158              installed.   When  neither  option  is  given  both portions are
3159              installed.  On platforms where versioned shared libraries do not
3160              have   namelinks   or  when  a  library  is  not  versioned  the
3161              NAMELINK_SKIP option installs the library and the  NAMELINK_ONLY
3162              option  installs  nothing.  See the VERSION and SOVERSION target
3163              properties for details on creating versioned shared libraries.
3164
3165
3166              One or more groups of properties may be specified  in  a  single
3167              call  to  the  TARGETS  form  of  this command.  A target may be
3168              installed more than once to different locations.  Consider hypo‐
3169              thetical targets "myExe", "mySharedLib", and "myStaticLib".  The
3170              code
3171
3172
3173                  install(TARGETS myExe mySharedLib myStaticLib
3174                          RUNTIME DESTINATION bin
3175                          LIBRARY DESTINATION lib
3176                          ARCHIVE DESTINATION lib/static)
3177                  install(TARGETS mySharedLib DESTINATION /some/full/path)
3178
3179              will install myExe to  <prefix>/bin  and  myStaticLib  to  <pre‐
3180              fix>/lib/static.   On  non-DLL  platforms  mySharedLib  will  be
3181              installed to <prefix>/lib and /some/full/path.  On DLL platforms
3182              the  mySharedLib  DLL  will  be  installed  to  <prefix>/bin and
3183              /some/full/path and its import  library  will  be  installed  to
3184              <prefix>/lib/static  and  /some/full/path.  On non-DLL platforms
3185              mySharedLib   will   be   installed    to    <prefix>/lib    and
3186              /some/full/path.
3187
3188
3189              The  EXPORT option associates the installed target files with an
3190              export called <export-name>.  It must appear before any RUNTIME,
3191              LIBRARY,  or  ARCHIVE  options.   To actually install the export
3192              file itself, call install(EXPORT).   See  documentation  of  the
3193              install(EXPORT ...) signature below for details.
3194
3195
3196              Installing  a target with EXCLUDE_FROM_ALL set to true has unde‐
3197              fined behavior.
3198
3199
3200              The FILES signature:
3201
3202
3203                install(FILES files... DESTINATION <dir>
3204                        [PERMISSIONS permissions...]
3205                        [CONFIGURATIONS [Debug|Release|...]]
3206                        [COMPONENT <component>]
3207                        [RENAME <name>] [OPTIONAL])
3208
3209              The FILES form  specifies  rules  for  installing  files  for  a
3210              project.   File  names  given  as relative paths are interpreted
3211              with respect to the current source directory.   Files  installed
3212              by  this  form  are  by  default  given permissions OWNER_WRITE,
3213              OWNER_READ, GROUP_READ, and WORLD_READ if no  PERMISSIONS  argu‐
3214              ment is given.
3215
3216
3217              The PROGRAMS signature:
3218
3219
3220                install(PROGRAMS files... DESTINATION <dir>
3221                        [PERMISSIONS permissions...]
3222                        [CONFIGURATIONS [Debug|Release|...]]
3223                        [COMPONENT <component>]
3224                        [RENAME <name>] [OPTIONAL])
3225
3226              The PROGRAMS form is identical to the FILES form except that the
3227              default  permissions  for  the  installed  file   also   include
3228              OWNER_EXECUTE,  GROUP_EXECUTE,  and WORLD_EXECUTE.  This form is
3229              intended to install programs that are not targets, such as shell
3230              scripts.   Use  the TARGETS form to install targets built within
3231              the project.
3232
3233
3234              The DIRECTORY signature:
3235
3236
3237                install(DIRECTORY dirs... DESTINATION <dir>
3238                        [FILE_PERMISSIONS permissions...]
3239                        [DIRECTORY_PERMISSIONS permissions...]
3240                        [USE_SOURCE_PERMISSIONS] [OPTIONAL]
3241                        [CONFIGURATIONS [Debug|Release|...]]
3242                        [COMPONENT <component>] [FILES_MATCHING]
3243                        [[PATTERN <pattern> | REGEX <regex>]
3244                         [EXCLUDE] [PERMISSIONS permissions...]] [...])
3245
3246              The DIRECTORY form installs contents of one or more  directories
3247              to  a given destination.  The directory structure is copied ver‐
3248              batim to the destination.  The last component of each  directory
3249              name  is  appended  to  the destination directory but a trailing
3250              slash may be used to avoid this because it leaves the last  com‐
3251              ponent  empty.   Directory  names  given  as  relative paths are
3252              interpreted with respect to the current source directory.  If no
3253              input  directory  names are given the destination directory will
3254              be created but nothing will be installed into it.  The FILE_PER‐
3255              MISSIONS  and  DIRECTORY_PERMISSIONS options specify permissions
3256              given  to  files  and  directories  in  the   destination.    If
3257              USE_SOURCE_PERMISSIONS is specified and FILE_PERMISSIONS is not,
3258              file permissions will be copied from the source directory struc‐
3259              ture.   If  no permissions are specified files will be given the
3260              default permissions specified in the FILES form of the  command,
3261              and the directories will be given the default permissions speci‐
3262              fied in the PROGRAMS form of the command.
3263
3264
3265              Installation of directories may be controlled with  fine  granu‐
3266              larity  using  the  PATTERN  or  REGEX  options.   These "match"
3267              options specify a globbing  pattern  or  regular  expression  to
3268              match directories or files encountered within input directories.
3269              They may be used to apply certain options (see below) to a  sub‐
3270              set  of the files and directories encountered.  The full path to
3271              each input file or directory (with forward slashes)  is  matched
3272              against the expression.  A PATTERN will match only complete file
3273              names: the portion of the full path matching  the  pattern  must
3274              occur at the end of the file name and be preceded by a slash.  A
3275              REGEX will match any portion of the full path but it may use '/'
3276              and  '$' to simulate the PATTERN behavior.  By default all files
3277              and directories are installed whether or not they  are  matched.
3278              The  FILES_MATCHING  option  may be given before the first match
3279              option to disable installation of files  (but  not  directories)
3280              not matched by any expression.  For example, the code
3281
3282
3283                install(DIRECTORY src/ DESTINATION include/myproj
3284                        FILES_MATCHING PATTERN "*.h")
3285
3286              will extract and install header files from a source tree.
3287
3288
3289              Some  options  may  follow a PATTERN or REGEX expression and are
3290              applied only to files or directories matching them.  The EXCLUDE
3291              option will skip the matched file or directory.  The PERMISSIONS
3292              option overrides the permissions setting for the matched file or
3293              directory.  For example the code
3294
3295
3296                install(DIRECTORY icons scripts/ DESTINATION share/myproj
3297                        PATTERN "CVS" EXCLUDE
3298                        PATTERN "scripts/*"
3299                        PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
3300                                    GROUP_EXECUTE GROUP_READ)
3301
3302              will  install  the icons directory to share/myproj/icons and the
3303              scripts directory to share/myproj.  The icons will  get  default
3304              file  permissions,  the  scripts  will be given specific permis‐
3305              sions, and any CVS directories will be excluded.
3306
3307
3308              The SCRIPT and CODE signature:
3309
3310
3311                install([[SCRIPT <file>] [CODE <code>]] [...])
3312
3313              The SCRIPT form will invoke the given CMake script files  during
3314              installation.   If  the  script  file name is a relative path it
3315              will be interpreted with respect to the  current  source  direc‐
3316              tory.   The  CODE  form  will invoke the given CMake code during
3317              installation.  Code is specified as a single argument  inside  a
3318              double-quoted string. For example, the code
3319
3320
3321                install(CODE "MESSAGE(\"Sample install message.\")")
3322
3323              will print a message during installation.
3324
3325
3326              The EXPORT signature:
3327
3328
3329                install(EXPORT <export-name> DESTINATION <dir>
3330                        [NAMESPACE <namespace>] [FILE <name>.cmake]
3331                        [PERMISSIONS permissions...]
3332                        [CONFIGURATIONS [Debug|Release|...]]
3333                        [COMPONENT <component>])
3334
3335              The  EXPORT  form generates and installs a CMake file containing
3336              code to import targets from the installation tree  into  another
3337              project.   Target  installations  are associated with the export
3338              <export-name> using the EXPORT  option  of  the  install(TARGETS
3339              ...)  signature  documented  above.   The  NAMESPACE option will
3340              prepend <namespace> to the target names as they are  written  to
3341              the  import  file.  By default the generated file will be called
3342              <export-name>.cmake but the FILE option may be used to specify a
3343              different  name.   The  value given to the FILE option must be a
3344              file name with the  ".cmake"  extension.   If  a  CONFIGURATIONS
3345              option is given then the file will only be installed when one of
3346              the named configurations is installed.  Additionally, the gener‐
3347              ated import file will reference only the matching target config‐
3348              urations.  If a COMPONENT option  is  specified  that  does  not
3349              match  that  given  to the targets associated with <export-name>
3350              the behavior is undefined.  If a library target is  included  in
3351              the  export  but  a target to which it links is not included the
3352              behavior is unspecified.
3353
3354
3355              The EXPORT form is useful to help outside projects  use  targets
3356              built  and  installed  by the current project.  For example, the
3357              code
3358
3359
3360                install(TARGETS myexe EXPORT myproj DESTINATION bin)
3361                install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj)
3362
3363              will install the executable myexe to <prefix>/bin  and  code  to
3364              import  it  in  the file "<prefix>/lib/myproj/myproj.cmake".  An
3365              outside project may load this file with the include command  and
3366              reference  the myexe executable from the installation tree using
3367              the imported target name mp_myexe as if the target were built in
3368              its own tree.
3369
3370
3371              NOTE:  This  command  supercedes the INSTALL_TARGETS command and
3372              the      target      properties      PRE_INSTALL_SCRIPT      and
3373              POST_INSTALL_SCRIPT.   It  also  replaces the FILES forms of the
3374              INSTALL_FILES and  INSTALL_PROGRAMS  commands.   The  processing
3375              order  of  these  install  rules  relative to those generated by
3376              INSTALL_TARGETS, INSTALL_FILES, and INSTALL_PROGRAMS commands is
3377              not defined.
3378
3379
3380
3381       link_directories
3382              Specify directories in which the linker will look for libraries.
3383
3384                link_directories(directory1 directory2 ...)
3385
3386              Specify  the  paths  in  which  the  linker  should  search  for
3387              libraries. The command will apply only to targets created  after
3388              it  is  called.  For historical reasons, relative paths given to
3389              this command are passed to the  linker  unchanged  (unlike  many
3390              CMake  commands  which  interpret  them  relative to the current
3391              source directory).
3392
3393
3394       list   List operations.
3395
3396                list(LENGTH <list> <output variable>)
3397                list(GET <list> <element index> [<element index> ...]
3398                     <output variable>)
3399                list(APPEND <list> <element> [<element> ...])
3400                list(FIND <list> <value> <output variable>)
3401                list(INSERT <list> <element_index> <element> [<element> ...])
3402                list(REMOVE_ITEM <list> <value> [<value> ...])
3403                list(REMOVE_AT <list> <index> [<index> ...])
3404                list(REMOVE_DUPLICATES <list>)
3405                list(REVERSE <list>)
3406                list(SORT <list>)
3407
3408              LENGTH will return a given list's length.
3409
3410
3411              GET will return list of elements specified by indices  from  the
3412              list.
3413
3414
3415              APPEND will append elements to the list.
3416
3417
3418              FIND  will return the index of the element specified in the list
3419              or -1 if it wasn't found.
3420
3421
3422              INSERT will insert elements to the list to the  specified  loca‐
3423              tion.
3424
3425
3426              REMOVE_AT  and  REMOVE_ITEM will remove items from the list. The
3427              difference is that REMOVE_ITEM  will  remove  the  given  items,
3428              while REMOVE_AT will remove the items at the given indices.
3429
3430
3431              REMOVE_DUPLICATES will remove duplicated items in the list.
3432
3433
3434              REVERSE reverses the contents of the list in-place.
3435
3436
3437              SORT sorts the list in-place alphabetically.
3438
3439
3440              NOTES:  A  list  in  cmake is a ; separated group of strings. To
3441              create a list the set command can be used. For example,  set(var
3442              a  b c d e)  creates a list with a;b;c;d;e, and set(var "a b c d
3443              e") creates a string or a list with one item in it.
3444
3445
3446              When specifying  index  values,  if  <element  index>  is  0  or
3447              greater,  it  is  indexed from the beginning of the list, with 0
3448              representing the first list element. If <element index> is -1 or
3449              lesser,  it  is indexed from the end of the list, with -1 repre‐
3450              senting the last list element. Be  careful  when  counting  with
3451              negative  indices: they do not start from 0. -0 is equivalent to
3452              0, the first list element.
3453
3454
3455
3456       load_cache
3457              Load in the values from another project's CMake cache.
3458
3459                load_cache(pathToCacheFile READ_WITH_PREFIX
3460                           prefix entry1...)
3461
3462              Read the cache and store the requested entries in variables with
3463              their  name prefixed with the given prefix.  This only reads the
3464              values, and does not  create  entries  in  the  local  project's
3465              cache.
3466
3467
3468                load_cache(pathToCacheFile [EXCLUDE entry1...]
3469                           [INCLUDE_INTERNALS entry1...])
3470
3471              Load  in  the  values  from  another cache and store them in the
3472              local project's cache as internal entries.  This is useful for a
3473              project  that  depends  on  another project built in a different
3474              tree.  EXCLUDE option can be used to provide a list  of  entries
3475              to be excluded.  INCLUDE_INTERNALS can be used to provide a list
3476              of internal entries  to  be  included.   Normally,  no  internal
3477              entries  are  brought  in.   Use  of this form of the command is
3478              strongly discouraged, but it is provided for  backward  compati‐
3479              bility.
3480
3481
3482       load_command
3483              Load a command into a running CMake.
3484
3485                load_command(COMMAND_NAME <loc1> [loc2 ...])
3486
3487              The  given  locations  are  searched for a library whose name is
3488              cmCOMMAND_NAME.  If found, it is loaded as a module and the com‐
3489              mand  is added to the set of available CMake commands.  Usually,
3490              TRY_COMPILE is used before this command to compile  the  module.
3491              If the command is successfully loaded a variable named
3492
3493
3494                CMAKE_LOADED_COMMAND_<COMMAND_NAME>
3495
3496              will  be  set  to  the  full path of the module that was loaded.
3497              Otherwise the variable will not be set.
3498
3499
3500       macro  Start recording a macro for later invocation as a command.
3501
3502                macro(<name> [arg1 [arg2 [arg3 ...]]])
3503                  COMMAND1(ARGS ...)
3504                  COMMAND2(ARGS ...)
3505                  ...
3506                endmacro(<name>)
3507
3508              Define a macro named <name> that takes arguments named arg1 arg2
3509              arg3  (...).  Commands listed after macro, but before the match‐
3510              ing endmacro, are not invoked until the macro is invoked.   When
3511              it is invoked, the commands recorded in the macro are first mod‐
3512              ified by replacing formal parameters (${arg1})  with  the  argu‐
3513              ments  passed,  and then invoked as normal commands. In addition
3514              to referencing the formal parameters you can reference the  val‐
3515              ues  ${ARGC} which will be set to the number of arguments passed
3516              into the function as well  as  ${ARGV0}  ${ARGV1}  ${ARGV2}  ...
3517              which  will  have  the actual values of the arguments passed in.
3518              This facilitates creating macros with optional arguments.  Addi‐
3519              tionally  ${ARGV}  holds  the list of all arguments given to the
3520              macro and ${ARGN} holds the  list  of  argument  past  the  last
3521              expected  argument. Note that the parameters to a macro and val‐
3522              ues such as ARGN are not variables in  the  usual  CMake  sense.
3523              They  are string replacements much like the c preprocessor would
3524              do with a macro. If you want true  CMake  variables  you  should
3525              look at the function command.
3526
3527
3528              See the cmake_policy() command documentation for the behavior of
3529              policies inside macros.
3530
3531
3532       mark_as_advanced
3533              Mark cmake cached variables as advanced.
3534
3535                mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)
3536
3537              Mark the named cached variables as advanced.  An advanced  vari‐
3538              able  will  not be displayed in any of the cmake GUIs unless the
3539              show advanced option is on.  If  CLEAR  is  the  first  argument
3540              advanced  variables are changed back to unadvanced.  If FORCE is
3541              the first argument, then the variable is made advanced.  If nei‐
3542              ther  FORCE nor CLEAR is specified, new values will be marked as
3543              advanced,   but    if    the    variable    already    has    an
3544              advanced/non-advanced state, it will not be changed.
3545
3546
3547              It does nothing in script mode.
3548
3549
3550       math   Mathematical expressions.
3551
3552                math(EXPR <output variable> <math expression>)
3553
3554              EXPR  evaluates mathematical expression and return result in the
3555              output variable. Example mathematical expression is '5 * ( 10  +
3556              13  )'.   Supported operators are + - * / % | & ^ ~ << >> * / %.
3557              They have the same meaning  as they do in c code.
3558
3559
3560       message
3561              Display a message to the user.
3562
3563                message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]
3564                        "message to display" ...)
3565
3566              The optional keyword determines the type of message:
3567
3568
3569                (none)         = Important information
3570                STATUS         = Incidental information
3571                WARNING        = CMake Warning, continue processing
3572                AUTHOR_WARNING = CMake Warning (dev), continue processing
3573                SEND_ERROR     = CMake Error, continue but skip generation
3574                FATAL_ERROR    = CMake Error, stop all processing
3575
3576              The CMake command-line tool displays STATUS messages  on  stdout
3577              and  all  other message types on stderr.  The CMake GUI displays
3578              all messages in its log area.  The interactive  dialogs  (ccmake
3579              and  CMakeSetup)  show STATUS messages one at a time on a status
3580              line and other messages in interactive pop-up boxes.
3581
3582
3583              CMake Warning and Error message text  displays  using  a  simple
3584              markup language.  Non-indented text is formatted in line-wrapped
3585              paragraphs delimited by newlines.  Indented text  is  considered
3586              pre-formatted.
3587
3588
3589       option Provides an option that the user can optionally select.
3590
3591                option(<option_variable> "help string describing option"
3592                       [initial value])
3593
3594              Provide  an  option  for the user to select as ON or OFF.  If no
3595              initial value is provided, OFF is used.
3596
3597
3598              If you have options that depend on the values of other  options,
3599              see the module help for CMakeDependentOption.
3600
3601
3602       output_required_files
3603              Output  a  list  of required source files for a specified source
3604              file.
3605
3606                output_required_files(srcfile outputfile)
3607
3608              Outputs a list of all the source files that are required by  the
3609              specified srcfile. This list is written into outputfile. This is
3610              similar to writing out the dependencies for srcfile except  that
3611              it jumps from .h files into .cxx, .c and .cpp files if possible.
3612
3613
3614       project
3615              Set a name for the entire project.
3616
3617                project(<projectname> [languageName1 languageName2 ... ] )
3618
3619              Sets  the name of the project.  Additionally this sets the vari‐
3620              ables <projectName>_BINARY_DIR and  <projectName>_SOURCE_DIR  to
3621              the respective values.
3622
3623
3624              Optionally  you  can  specify  which languages your project sup‐
3625              ports.  Example languages are CXX (i.e. C++), C,  Fortran,  etc.
3626              By default C and CXX are enabled.  E.g. if you do not have a C++
3627              compiler, you can disable the check for it by explicitly listing
3628              the languages you want to support, e.g. C.  By using the special
3629              language "NONE" all checks for any language can be disabled.
3630
3631
3632       qt_wrap_cpp
3633              Create Qt Wrappers.
3634
3635                qt_wrap_cpp(resultingLibraryName DestName
3636                            SourceLists ...)
3637
3638              Produce  moc  files  for  all  the  .h  files  listed   in   the
3639              SourceLists.   The  moc files will be added to the library using
3640              the DestName source list.
3641
3642
3643       qt_wrap_ui
3644              Create Qt user interfaces Wrappers.
3645
3646                qt_wrap_ui(resultingLibraryName HeadersDestName
3647                           SourcesDestName SourceLists ...)
3648
3649              Produce .h and .cxx files for all the .ui files  listed  in  the
3650              SourceLists.   The  .h  files will be added to the library using
3651              the HeadersDestNamesource list.  The .cxx files will be added to
3652              the library using the SourcesDestNamesource list.
3653
3654
3655       remove_definitions
3656              Removes -D define flags added by add_definitions.
3657
3658                remove_definitions(-DFOO -DBAR ...)
3659
3660              Removes  flags (added by add_definitions) from the compiler com‐
3661              mand line for sources in the current directory and below.
3662
3663
3664       return Return from a file, directory or function.
3665
3666                return()
3667
3668              Returns from a file, directory or function. When this command is
3669              encountered  in  an  included  file (via include() or find_pack‐
3670              age()), it causes processing of the current  file  to  stop  and
3671              control  is returned to the including file. If it is encountered
3672              in a file which is not included by another file, e.g.  a  CMake‐
3673              Lists.txt,  control is returned to the parent directory if there
3674              is one. If return is called in a function, control  is  returned
3675              to  the caller of the function. Note that a macro is not a func‐
3676              tion and does not handle return like a function does.
3677
3678
3679       separate_arguments
3680              Parse space-separated arguments into a semicolon-separated list.
3681
3682                separate_arguments(<var> <UNIX|WINDOWS>_COMMAND "<args>")
3683
3684              Parses a unix- or windows-style command-line string "<args>" and
3685              stores  a  semicolon-separated  list  of the arguments in <var>.
3686              The entire command line must be given in one "<args>" argument.
3687
3688
3689              The UNIX_COMMAND mode separates  arguments  by  unquoted  white‐
3690              space.   It recognizes both single-quote and double-quote pairs.
3691              A backslash escapes the next literal character (\" is ");  there
3692              are no special escapes (\n is just n).
3693
3694
3695              The WINDOWS_COMMAND mode parses a windows command-line using the
3696              same syntax the  runtime  library  uses  to  construct  argv  at
3697              startup.   It separates arguments by whitespace that is not dou‐
3698              ble-quoted.  Backslashes are literal unless  they  precede  dou‐
3699              ble-quotes.   See the MSDN article "Parsing C Command-Line Argu‐
3700              ments" for details.
3701
3702
3703                separate_arguments(VARIABLE)
3704
3705              Convert the value of VARIABLE to a  semi-colon  separated  list.
3706              All  spaces  are  replaced with ';'.  This helps with generating
3707              command lines.
3708
3709
3710       set    Set a CMAKE variable to a given value.
3711
3712                set(<variable> <value>
3713                    [[CACHE <type> <docstring> [FORCE]] | PARENT_SCOPE])
3714
3715              Within CMake sets <variable> to the value <value>.   <value>  is
3716              expanded   before <variable> is set to it.  If CACHE is present,
3717              then the <variable> is put in the cache. <type> and  <docstring>
3718              are  then  required. <type> is used by the CMake GUI to choose a
3719              widget with which the user sets a value.  The value  for  <type>
3720              may be one of
3721
3722
3723                FILEPATH = File chooser dialog.
3724                PATH     = Directory chooser dialog.
3725                STRING   = Arbitrary string.
3726                BOOL     = Boolean ON/OFF checkbox.
3727                INTERNAL = No GUI entry (used for persistent variables).
3728
3729              If  <type>  is INTERNAL, then the <value> is always written into
3730              the cache, replacing any values existing in the cache.  If it is
3731              not  a  cache variable, then this always writes into the current
3732              makefile. The FORCE option will overwrite the cache value remov‐
3733              ing any changes by the user.
3734
3735
3736              If  PARENT_SCOPE  is  present,  the  variable will be set in the
3737              scope above the current scope. Each new  directory  or  function
3738              creates  a new scope. This command will set the value of a vari‐
3739              able into the parent directory or calling function (whichever is
3740              applicable to the case at hand).
3741
3742
3743              If <value> is not specified then the variable is removed instead
3744              of set.  See also: the unset() command.
3745
3746
3747                set(<variable> <value1> ... <valueN>)
3748
3749              In this case <variable> is set to a semicolon separated list  of
3750              values.
3751
3752
3753              <variable> can be an environment variable such as:
3754
3755
3756                set( ENV{PATH} /home/martink )
3757
3758              in which case the environment variable will be set.
3759
3760
3761       set_directory_properties
3762              Set a property of the directory.
3763
3764                set_directory_properties(PROPERTIES prop1 value1 prop2 value2)
3765
3766              Set  a property for the current directory and subdirectories. If
3767              the property is not found, CMake will report an error. The prop‐
3768              erties     include:    INCLUDE_DIRECTORIES,    LINK_DIRECTORIES,
3769              INCLUDE_REGULAR_EXPRESSION,   and   ADDITIONAL_MAKE_CLEAN_FILES.
3770              ADDITIONAL_MAKE_CLEAN_FILES  is  a  list  of  files that will be
3771              cleaned as a part of "make clean" stage.
3772
3773
3774       set_property
3775              Set a named property in a given scope.
3776
3777                set_property(<GLOBAL                            |
3778                              DIRECTORY [dir]                   |
3779                              TARGET    [target1 [target2 ...]] |
3780                              SOURCE    [src1 [src2 ...]]       |
3781                              TEST      [test1 [test2 ...]]     |
3782                              CACHE     [entry1 [entry2 ...]]>
3783                             [APPEND]
3784                             PROPERTY <name> [value1 [value2 ...]])
3785
3786              Set one property on zero or more objects of a scope.  The  first
3787              argument  determines the scope in which the property is set.  It
3788              must be one of the following:
3789
3790
3791              GLOBAL scope is unique and does not accept a name.
3792
3793
3794              DIRECTORY scope defaults to the current  directory  but  another
3795              directory  (already  processed by CMake) may be named by full or
3796              relative path.
3797
3798
3799              TARGET scope may name zero or more existing targets.
3800
3801
3802              SOURCE scope may name zero or  more  source  files.   Note  that
3803              source  file properties are visible only to targets added in the
3804              same directory (CMakeLists.txt).
3805
3806
3807              TEST scope may name zero or more existing tests.
3808
3809
3810              CACHE scope must name zero or more cache existing entries.
3811
3812
3813              The required PROPERTY option is immediately followed by the name
3814              of the property to set.  Remaining arguments are used to compose
3815              the property value in the form of  a  semicolon-separated  list.
3816              If the APPEND option is given the list is appended to any exist‐
3817              ing property value.
3818
3819
3820       set_source_files_properties
3821              Source files can have properties that affect how they are built.
3822
3823                set_source_files_properties([file1 [file2 [...]]]
3824                                            PROPERTIES prop1 value1
3825                                            [prop2 value2 [...]])
3826
3827              Set properties associated with source files  using  a  key/value
3828              paired  list.   See  properties documentation for those known to
3829              CMake.  Unrecognized properties are ignored.  Source file  prop‐
3830              erties  are  visible only to targets added in the same directory
3831              (CMakeLists.txt).
3832
3833
3834       set_target_properties
3835              Targets can have properties that affect how they are built.
3836
3837                set_target_properties(target1 target2 ...
3838                                      PROPERTIES prop1 value1
3839                                      prop2 value2 ...)
3840
3841              Set properties on a target. The syntax for  the  command  is  to
3842              list all the files you want to change, and then provide the val‐
3843              ues you want to set next.  You can use any prop value  pair  you
3844              want and extract it later with the GET_TARGET_PROPERTY command.
3845
3846
3847              Properties that affect the name of a target's output file are as
3848              follows.  The PREFIX and SUFFIX properties override the  default
3849              target  name  prefix (such as "lib") and suffix (such as ".so").
3850              IMPORT_PREFIX and IMPORT_SUFFIX are  the  equivalent  properties
3851              for  the  import  library  corresponding  to  a  DLL (for SHARED
3852              library targets).  OUTPUT_NAME sets the real name  of  a  target
3853              when  it  is built and can be used to help create two targets of
3854              the same name even though CMake requires unique  logical  target
3855              names.   There  is  also a <CONFIG>_OUTPUT_NAME that can set the
3856              output name on a per-configuration basis.  <CONFIG>_POSTFIX sets
3857              a postfix for the real name of the target when it is built under
3858              the configuration named by  <CONFIG>  (in  upper-case,  such  as
3859              "DEBUG_POSTFIX").   The  value  of  this property is initialized
3860              when the  target  is  created  to  the  value  of  the  variable
3861              CMAKE_<CONFIG>_POSTFIX  (except  for  executable targets because
3862              earlier CMake versions which did not use this variable for  exe‐
3863              cutables).
3864
3865
3866              The  LINK_FLAGS  property  can be used to add extra flags to the
3867              link step of a target. LINK_FLAGS_<CONFIG> will add to the  con‐
3868              figuration  <CONFIG>,  for  example, DEBUG, RELEASE, MINSIZEREL,
3869              RELWITHDEBINFO. DEFINE_SYMBOL sets the name of the  preprocessor
3870              symbol  defined  when  compiling sources in a shared library. If
3871              not set here then it is set to target_EXPORTS by  default  (with
3872              some  substitutions  if the target is not a valid C identifier).
3873              This is useful for  headers  to  know  whether  they  are  being
3874              included from inside their library our outside to properly setup
3875              dllexport/dllimport decorations. The COMPILE_FLAGS property sets
3876              additional  compiler flags used to build sources within the tar‐
3877              get.  It may also be used to pass additional preprocessor  defi‐
3878              nitions.
3879
3880
3881              The  LINKER_LANGUAGE property is used to change the tool used to
3882              link an executable or shared library. The  default  is  set  the
3883              language to match the files in the library. CXX and C are common
3884              values for this property.
3885
3886
3887              For shared libraries VERSION and SOVERSION can be used to  spec‐
3888              ify  the build version and api version respectively. When build‐
3889              ing or installing appropriate symlinks are created if the  plat‐
3890              form supports symlinks and the linker supports so-names. If only
3891              one of both is specified the missing is assumed to have the same
3892              version  number.  For executables VERSION can be used to specify
3893              the build version. When building or installing appropriate  sym‐
3894              links  are created if the platform supports symlinks. For shared
3895              libraries and executables on Windows the  VERSION  attribute  is
3896              parsed  to extract a "major.minor" version number. These numbers
3897              are used as the image version of the binary.
3898
3899
3900              There  are  a  few  properties  used  to  specify  RPATH  rules.
3901              INSTALL_RPATH is a semicolon-separated list specifying the rpath
3902              to use in installed targets (for  platforms  that  support  it).
3903              INSTALL_RPATH_USE_LINK_PATH  is  a  boolean  that if set to true
3904              will append directories in the linker search  path  and  outside
3905              the  project to the INSTALL_RPATH. SKIP_BUILD_RPATH is a boolean
3906              specifying whether to skip  automatic  generation  of  an  rpath
3907              allowing    the   target   to   run   from   the   build   tree.
3908              BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link
3909              the target in the build tree with the INSTALL_RPATH.  This takes
3910              precedence over SKIP_BUILD_RPATH and avoids the need for relink‐
3911              ing  before installation.  INSTALL_NAME_DIR is a string specify‐
3912              ing the directory portion of the "install_name" field of  shared
3913              libraries  on  Mac OSX to use in the installed targets. When the
3914              target   is   created    the    values    of    the    variables
3915              CMAKE_INSTALL_RPATH,          CMAKE_INSTALL_RPATH_USE_LINK_PATH,
3916              CMAKE_SKIP_BUILD_RPATH,   CMAKE_BUILD_WITH_INSTALL_RPATH,    and
3917              CMAKE_INSTALL_NAME_DIR are used to initialize these properties.
3918
3919
3920              PROJECT_LABEL can be used to change the name of the target in an
3921              IDE like visual studio.  VS_KEYWORD can be  set  to  change  the
3922              visual  studio  keyword, for example QT integration works better
3923              if this is set to Qt4VSv1.0.
3924
3925
3926              VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER can be set
3927              to  add  support for source control bindings in a  Visual Studio
3928              project file.
3929
3930
3931              The PRE_INSTALL_SCRIPT and  POST_INSTALL_SCRIPT  properties  are
3932              the  old  way  to  specify CMake scripts to run before and after
3933              installing  a  target.   They  are  used  only  when   the   old
3934              INSTALL_TARGETS  command is used to install the target.  Use the
3935              INSTALL command instead.
3936
3937
3938              The EXCLUDE_FROM_DEFAULT_BUILD property is used  by  the  visual
3939              studio  generators.   If  it  is set to 1 the target will not be
3940              part of the default build when you select "Build Solution".
3941
3942
3943       set_tests_properties
3944              Set a property of the tests.
3945
3946                set_tests_properties(test1 [test2...] PROPERTIES prop1 value1 prop2 value2)
3947
3948              Set a property for the tests. If  the  property  is  not  found,
3949              CMake will report an error. The properties include:
3950
3951
3952              WILL_FAIL:  If  set to true, this will invert the pass/fail flag
3953              of the test.
3954
3955
3956              PASS_REGULAR_EXPRESSION: If set, the test output will be checked
3957              against  the  specified  regular expressions and at least one of
3958              the regular expressions has to match, otherwise  the  test  will
3959              fail.
3960
3961
3962                Example: PASS_REGULAR_EXPRESSION "TestPassed;All ok"
3963
3964              FAIL_REGULAR_EXPRESSION: If set, if the output will match to one
3965              of specified regular expressions, the test will fail.
3966
3967
3968                Example: PASS_REGULAR_EXPRESSION "[^a-z]Error;ERROR;Failed"
3969
3970              Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION  expect
3971              a list of regular expressions.
3972
3973
3974              TIMEOUT:  Setting this will limit the test runtime to the number
3975              of seconds specified.
3976
3977
3978
3979       site_name
3980              Set the given variable to the name of the computer.
3981
3982                site_name(variable)
3983
3984
3985       source_group
3986              Define a grouping for sources in the makefile.
3987
3988                source_group(name [REGULAR_EXPRESSION regex] [FILES src1 src2 ...])
3989
3990              Defines a group into which sources will  be  placed  in  project
3991              files.  This is mainly used to setup file tabs in Visual Studio.
3992              Any file whose name is listed or matches the regular  expression
3993              will  be  placed  in  this  group.   If  a file matches multiple
3994              groups, the LAST group that explicitly lists the  file  will  be
3995              favored,  if  any.   If  no group explicitly lists the file, the
3996              LAST group whose regular expression matches  the  file  will  be
3997              favored.
3998
3999
4000              The  name  of  the group may contain backslashes to specify sub‐
4001              groups:
4002
4003
4004                source_group(outer\\inner ...)
4005
4006              For backwards compatibility, this command is also  supports  the
4007              format:
4008
4009
4010                source_group(name regex)
4011
4012
4013       string String operations.
4014
4015                string(REGEX MATCH <regular_expression>
4016                       <output variable> <input> [<input>...])
4017                string(REGEX MATCHALL <regular_expression>
4018                       <output variable> <input> [<input>...])
4019                string(REGEX REPLACE <regular_expression>
4020                       <replace_expression> <output variable>
4021                       <input> [<input>...])
4022                string(REPLACE <match_string>
4023                       <replace_string> <output variable>
4024                       <input> [<input>...])
4025                string(COMPARE EQUAL <string1> <string2> <output variable>)
4026                string(COMPARE NOTEQUAL <string1> <string2> <output variable>)
4027                string(COMPARE LESS <string1> <string2> <output variable>)
4028                string(COMPARE GREATER <string1> <string2> <output variable>)
4029                string(ASCII <number> [<number> ...] <output variable>)
4030                string(CONFIGURE <string1> <output variable>
4031                       [@ONLY] [ESCAPE_QUOTES])
4032                string(TOUPPER <string1> <output variable>)
4033                string(TOLOWER <string1> <output variable>)
4034                string(LENGTH <string> <output variable>)
4035                string(SUBSTRING <string> <begin> <length> <output variable>)
4036                string(STRIP <string> <output variable>)
4037                string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]
4038                       [RANDOM_SEED <seed>] <output variable>)
4039
4040              REGEX MATCH will match the regular expression once and store the
4041              match in the output variable.
4042
4043
4044              REGEX MATCHALL will match the regular expression as  many  times
4045              as  possible  and  store the matches in the output variable as a
4046              list.
4047
4048
4049              REGEX REPLACE will match the regular expression as many times as
4050              possible and substitute the replacement expression for the match
4051              in the output.  The replace expression may refer to paren-delim‐
4052              ited  subexpressions  of  the match using \1, \2, ..., \9.  Note
4053              that two backslashes (\\1) are required in CMake code to  get  a
4054              backslash through argument parsing.
4055
4056
4057              REPLACE  will  replace  all  occurrences  of match_string in the
4058              input with replace_string and store the result in the output.
4059
4060
4061              COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and
4062              store true or false in the output variable.
4063
4064
4065              ASCII  will convert all numbers into corresponding ASCII charac‐
4066              ters.
4067
4068
4069              CONFIGURE will transform a string like CONFIGURE_FILE transforms
4070              a file.
4071
4072
4073              TOUPPER/TOLOWER will convert string to upper/lower characters.
4074
4075
4076              LENGTH will return a given string's length.
4077
4078
4079              SUBSTRING will return a substring of a given string.
4080
4081
4082              STRIP will return a substring of a given string with leading and
4083              trailing spaces removed.
4084
4085
4086              RANDOM will return a random string of given length consisting of
4087              characters  from the given alphabet. Default length is 5 charac‐
4088              ters and default alphabet is all numbers  and  upper  and  lower
4089              case  letters.   If  an  integer RANDOM_SEED is given, its value
4090              will be used to seed the random number generator.
4091
4092
4093              The following characters have special meaning in regular expres‐
4094              sions:
4095
4096
4097                 ^         Matches at beginning of a line
4098                 $         Matches at end of a line
4099                 .         Matches any single character
4100                 [ ]       Matches any character(s) inside the brackets
4101                 [^ ]      Matches any character(s) not inside the brackets
4102                  -        Matches any character in range on either side of a dash
4103                 *         Matches preceding pattern zero or more times
4104                 +         Matches preceding pattern one or more times
4105                 ?         Matches preceding pattern zero or once only
4106                 |         Matches a pattern on either side of the |
4107                 ()        Saves a matched subexpression, which can be referenced
4108                           in the REGEX REPLACE operation. Additionally it is saved
4109                           by all regular expression-related commands, including
4110                           e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9).
4111
4112
4113       target_link_libraries
4114              Link a target to given libraries.
4115
4116                target_link_libraries(<target> [item1 [item2 [...]]]
4117                                      [[debug|optimized|general] <item>] ...)
4118
4119              Specify  libraries  or flags to use when linking a given target.
4120              The named <target> must have been created in the current  direc‐
4121              tory  by  a  command such as add_executable or add_library.  The
4122              remaining arguments specify library names or flags.
4123
4124
4125              If a library name matches that of another target in the  project
4126              a  dependency will automatically be added in the build system to
4127              make sure the library being linked is up-to-date before the tar‐
4128              get  links.   Item  names  starting  with  '-',  but not '-l' or
4129              '-framework', are treated as linker flags.
4130
4131
4132              A "debug", "optimized", or "general" keyword indicates that  the
4133              library immediately following it is to be used only for the cor‐
4134              responding build configuration.  The "debug" keyword corresponds
4135              to  the  Debug  configuration (or to configurations named in the
4136              DEBUG_CONFIGURATIONS global property if it is set).  The  "opti‐
4137              mized"  keyword  corresponds  to  all other configurations.  The
4138              "general" keyword corresponds  to  all  configurations,  and  is
4139              purely optional (assumed if omitted).  Higher granularity may be
4140              achieved for per-configuration rules by creating and linking  to
4141              IMPORTED   library  targets.   See  the  IMPORTED  mode  of  the
4142              add_library command for more information.
4143
4144
4145              Library dependencies are transitive by default.  When this  tar‐
4146              get  is  linked into another target then the libraries linked to
4147              this target will appear on the link line for  the  other  target
4148              too.   See the LINK_INTERFACE_LIBRARIES target property to over‐
4149              ride the set of transitive link dependencies for a target.
4150
4151
4152                target_link_libraries(<target> LINK_INTERFACE_LIBRARIES
4153                                      [[debug|optimized|general] <lib>] ...)
4154
4155              The LINK_INTERFACE_LIBRARIES mode appends the libraries  to  the
4156              LINK_INTERFACE_LIBRARIES  and  its  per-configuration equivalent
4157              target properties instead of using them for linking.   Libraries
4158              specified  as  "debug"  are  appended  to  the  the  LINK_INTER‐
4159              FACE_LIBRARIES_DEBUG property (or to the properties  correspond‐
4160              ing  to configurations listed in the DEBUG_CONFIGURATIONS global
4161              property if it is set).  Libraries specified as "optimized"  are
4162              appended   to   the   the   LINK_INTERFACE_LIBRARIES   property.
4163              Libraries specified as "general" (or without  any  keyword)  are
4164              treated as if specified for both "debug" and "optimized".
4165
4166
4167              The library dependency graph is normally acyclic (a DAG), but in
4168              the case of mutually-dependent STATIC libraries CMake allows the
4169              graph  to  contain cycles (strongly connected components).  When
4170              another target links to one of the libraries CMake  repeats  the
4171              entire connected component.  For example, the code
4172
4173
4174                add_library(A STATIC a.c)
4175                add_library(B STATIC b.c)
4176                target_link_libraries(A B)
4177                target_link_libraries(B A)
4178                add_executable(main main.c)
4179                target_link_libraries(main A)
4180
4181              links  'main'  to  'A  B A B'.  (While one repetition is usually
4182              sufficient, pathological object file and symbol arrangements can
4183              require  more.   One may handle such cases by manually repeating
4184              the component in the last target_link_libraries call.   However,
4185              if  two archives are really so interdependent they should proba‐
4186              bly be combined into a single archive.)
4187
4188
4189       try_compile
4190              Try building some code.
4191
4192                try_compile(RESULT_VAR <bindir> <srcdir>
4193                            <projectName> [targetName] [CMAKE_FLAGS flags...]
4194                            [OUTPUT_VARIABLE <var>])
4195
4196              Try building a project.  In this form, srcdir should  contain  a
4197              complete  CMake  project  with  a  CMakeLists.txt  file  and all
4198              sources. The bindir and srcdir will not be  deleted  after  this
4199              command  is  run.  Specify targetName to build a specific target
4200              instead of the 'all' or 'ALL_BUILD' target.
4201
4202
4203                try_compile(RESULT_VAR <bindir> <srcfile>
4204                            [CMAKE_FLAGS flags...]
4205                            [COMPILE_DEFINITIONS flags...]
4206                            [OUTPUT_VARIABLE <var>]
4207                            [COPY_FILE <fileName>])
4208
4209              Try building a source file into an executable.  In this form the
4210              user  need  only  supply  a  source  file that defines a 'main'.
4211              CMake will create a CMakeLists.txt file to build the  source  as
4212              an  executable.   Specify  COPY_FILE to get a copy of the linked
4213              executable at the given fileName.
4214
4215
4216              In this version all files in bindir/CMakeFiles/CMakeTmp, will be
4217              cleaned automatically, for debugging a --debug-trycompile can be
4218              passed to cmake to avoid the clean. Some extra flags  that   can
4219              be  included  are,   INCLUDE_DIRECTORIES,  LINK_DIRECTORIES, and
4220              LINK_LIBRARIES.  COMPILE_DEFINITIONS are -Ddefinition that  will
4221              be  passed  to  the  compile line.  try_compile creates a CMake‐
4222              List.txt file on the fly that looks like this:
4223
4224
4225                add_definitions( <expanded COMPILE_DEFINITIONS from calling cmake>)
4226                include_directories(${INCLUDE_DIRECTORIES})
4227                link_directories(${LINK_DIRECTORIES})
4228                add_executable(cmTryCompileExec sources)
4229                target_link_libraries(cmTryCompileExec ${LINK_LIBRARIES})
4230
4231              In both versions of the command, if  OUTPUT_VARIABLE  is  speci‐
4232              fied,  then  the  output from the build process is stored in the
4233              given variable. Return the success  or  failure  in  RESULT_VAR.
4234              CMAKE_FLAGS  can  be  used to pass -DVAR:TYPE=VALUE flags to the
4235              cmake that is run during the build. Set variable  CMAKE_TRY_COM‐
4236              PILE_CONFIGURATION to choose a build configuration.
4237
4238
4239       try_run
4240              Try compiling and then running some code.
4241
4242                try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
4243                        bindir srcfile [CMAKE_FLAGS <Flags>]
4244                        [COMPILE_DEFINITIONS <flags>]
4245                        [COMPILE_OUTPUT_VARIABLE comp]
4246                        [RUN_OUTPUT_VARIABLE run]
4247                        [OUTPUT_VARIABLE var]
4248                        [ARGS <arg1> <arg2>...])
4249
4250              Try  compiling  a  srcfile.  Return TRUE or FALSE for success or
4251              failure in COMPILE_RESULT_VAR.  Then if the  compile  succeeded,
4252              run  the  executable and return its exit code in RUN_RESULT_VAR.
4253              If  the  executable  was  built,  but  failed   to   run,   then
4254              RUN_RESULT_VAR   will  be  set  to  FAILED_TO_RUN.  COMPILE_OUT‐
4255              PUT_VARIABLE specifies the variable where the  output  from  the
4256              compile  step  goes.  RUN_OUTPUT_VARIABLE specifies the variable
4257              where the output from the running executable goes.
4258
4259
4260              For compatibility reasons OUTPUT_VARIABLE  is  still  supported,
4261              which  gives  you  the output from the compile and run step com‐
4262              bined.
4263
4264
4265              Cross compiling issues
4266
4267
4268              When cross compiling, the executable compiled in the first  step
4269              usually  cannot  be  run on the build host. try_run() checks the
4270              CMAKE_CROSSCOMPILING variable to  detect  whether  CMake  is  in
4271              crosscompiling  mode.  If  that's the case, it will still try to
4272              compile the executable, but it will not  try  to  run  the  exe‐
4273              cutable.  Instead  it  will create cache variables which must be
4274              filled by the user or by presetting them in  some  CMake  script
4275              file  to  the  values  the  executable would have produced if it
4276              would have been run on its actual target platform.  These  vari‐
4277              ables are RUN_RESULT_VAR (explanation see above) and if RUN_OUT‐
4278              PUT_VARIABLE (or OUTPUT_VARIABLE) was used, an additional  cache
4279              variable  RUN_RESULT_VAR__COMPILE_RESULT_VAR__TRYRUN_OUTPUT.This
4280              is intended to hold stdout and stderr from the executable.
4281
4282
4283              In order to  make  cross  compiling  your  project  easier,  use
4284              try_run  only  if  really  required.  If  you  use  try_run, use
4285              RUN_OUTPUT_VARIABLE  (or   OUTPUT_VARIABLE)   only   if   really
4286              required.  Using them will require that when crosscompiling, the
4287              cache variables will have to be set manually to  the  output  of
4288              the  executable.  You can also "guard" the calls to try_run with
4289              if(CMAKE_CROSSCOMPILING) and provide an easy-to-preset  alterna‐
4290              tive for this case.
4291
4292
4293              Set  variable  CMAKE_TRY_COMPILE_CONFIGURATION to choose a build
4294              configuration.
4295
4296
4297       unset  Unset a variable, cache variable, or environment variable.
4298
4299                unset(<variable> [CACHE])
4300
4301              Removes the specified variable causing it to  become  undefined.
4302              If  CACHE is present then the variable is removed from the cache
4303              instead of the current scope.
4304
4305
4306              <variable> can be an environment variable such as:
4307
4308
4309                unset(ENV{LD_LIBRARY_PATH})
4310
4311              in which case the variable will  be  removed  from  the  current
4312              environment.
4313
4314
4315       variable_watch
4316              Watch the CMake variable for change.
4317
4318                variable_watch(<variable name> [<command to execute>])
4319
4320              If  the  specified variable changes, the message will be printed
4321              about the variable being changed. If the command  is  specified,
4322              the  command will be executed. The command will receive the fol‐
4323              lowing arguments: COMMAND(<variable> <access>  <value>  <current
4324              list file> <stack>)
4325
4326
4327       while  Evaluate a group of commands while a condition is true
4328
4329                while(condition)
4330                  COMMAND1(ARGS ...)
4331                  COMMAND2(ARGS ...)
4332                  ...
4333                endwhile(condition)
4334
4335              All  commands  between  while  and  the  matching  endwhile  are
4336              recorded without being invoked.  Once the endwhile is evaluated,
4337              the  recorded  list of commands is invoked as long as the condi‐
4338              tion is true. The condition is evaluated using the same logic as
4339              the if command.
4340
4341

PROPERTIES

4343         CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
4344
4345
4346       This  is the documentation for the properties supported by CMake. Prop‐
4347       erties can have different scopes. They can  either  be  assigned  to  a
4348       source  file,  a directory, a target or globally to CMake. By modifying
4349       the values of properties the behaviour of the build system can be  cus‐
4350       tomized.
4351
4352

PROPERTIES OF GLOBAL SCOPE

4354       ALLOW_DUPLICATE_CUSTOM_TARGETS
4355              Allow duplicate custom targets to be created.
4356
4357              Normally CMake requires that all targets built in a project have
4358              globally unique logical names (see  policy  CMP0002).   This  is
4359              necessary to generate meaningful project file names in Xcode and
4360              VS IDE generators.  It also allows the target names to be refer‐
4361              enced unambiguously.
4362
4363
4364              Makefile  generators  are capable of supporting duplicate custom
4365              target names.  For projects that care only about Makefile gener‐
4366              ators and do not wish to support Xcode or VS IDE generators, one
4367              may set this property to true to allow duplicate custom targets.
4368              The  property allows multiple add_custom_target command calls in
4369              different directories to specify the same target name.  However,
4370              setting this property will cause non-Makefile generators to pro‐
4371              duce an error and refuse to generate the project.
4372
4373
4374       DEBUG_CONFIGURATIONS
4375              Specify which configurations are for debugging.
4376
4377              The value must be a semi-colon separated list  of  configuration
4378              names.   Currently  this  property  is  used  only  by  the tar‐
4379              get_link_libraries command (see its documentation for  details).
4380              Additional uses may be defined in the future.
4381
4382
4383              This  property  must  be set at the top level of the project and
4384              before the first target_link_libraries command  invocation.   If
4385              any  entry  in the list does not match a valid configuration for
4386              the project the behavior is undefined.
4387
4388
4389       DISABLED_FEATURES
4390              List of features which are disabled during the CMake run.
4391
4392              List of features which are disabled during  the  CMake  run.  Be
4393              default  it  contains  the  names of all packages which were not
4394              found. This is  determined  using  the  <NAME>_FOUND  variables.
4395              Packages  which are searched QUIET are not listed. A project can
4396              add its own features to this list.This property is used  by  the
4397              macros in FeatureSummary.cmake.
4398
4399
4400       ENABLED_FEATURES
4401              List of features which are enabled during the CMake run.
4402
4403              List  of  features  which  are  enabled during the CMake run. Be
4404              default it contains the names of all packages which were  found.
4405              This  is  determined  using the <NAME>_FOUND variables. Packages
4406              which are searched QUIET are not listed. A project can  add  its
4407              own features to this list.This property is used by the macros in
4408              FeatureSummary.cmake.
4409
4410
4411       ENABLED_LANGUAGES
4412              Read-only property that contains the list of  currently  enabled
4413              languages
4414
4415              Set to list of currently enabled languages.
4416
4417
4418       FIND_LIBRARY_USE_LIB64_PATHS
4419              Whether  FIND_LIBRARY should automatically search lib64 directo‐
4420              ries.
4421
4422              FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the
4423              FIND_LIBRARY command should automatically search the lib64 vari‐
4424              ant of directories called lib in the search path  when  building
4425              64-bit binaries.
4426
4427
4428       FIND_LIBRARY_USE_OPENBSD_VERSIONING
4429              Whether FIND_LIBRARY should find OpenBSD-style shared libraries.
4430
4431              This  property  is a boolean specifying whether the FIND_LIBRARY
4432              command should find shared  libraries  with  OpenBSD-style  ver‐
4433              sioned extension: ".so.<major>.<minor>".  The property is set to
4434              true on OpenBSD and false on other platforms.
4435
4436
4437       GLOBAL_DEPENDS_DEBUG_MODE
4438              Enable global target dependency graph debug mode.
4439
4440              CMake automatically analyzes the global inter-target  dependency
4441              graph  at the beginning of native build system generation.  This
4442              property causes it to display details of its analysis to stderr.
4443
4444
4445       GLOBAL_DEPENDS_NO_CYCLES
4446              Disallow global target dependency graph cycles.
4447
4448              CMake automatically analyzes the global inter-target  dependency
4449              graph  at  the  beginning of native build system generation.  It
4450              reports an error if the dependency graph contains a  cycle  that
4451              does  not  consist of all STATIC library targets.  This property
4452              tells CMake to disallow all cycles completely, even among static
4453              libraries.
4454
4455
4456       IN_TRY_COMPILE
4457              Read-only  property that is true during a try-compile configura‐
4458              tion.
4459
4460              True when building a project inside  a  TRY_COMPILE  or  TRY_RUN
4461              command.
4462
4463
4464       PACKAGES_FOUND
4465              List of packages which were found during the CMake run.
4466
4467              List  of packages which were found during the CMake run. Whether
4468              a package has been found is determined  using  the  <NAME>_FOUND
4469              variables.
4470
4471
4472       PACKAGES_NOT_FOUND
4473              List of packages which were not found during the CMake run.
4474
4475              List  of  packages  which  were  not found during the CMake run.
4476              Whether a  package  has  been  found  is  determined  using  the
4477              <NAME>_FOUND variables.
4478
4479
4480       PREDEFINED_TARGETS_FOLDER
4481              Name  of  FOLDER  for  targets  that  are added automatically by
4482              CMake.
4483
4484              If not set, CMake uses  "CMakePredefinedTargets"  as  a  default
4485              value  for  this  property. Targets such as INSTALL, PACKAGE and
4486              RUN_TESTS will be organized into this FOLDER. See also the docu‐
4487              mentation for the FOLDER target property.
4488
4489
4490       REPORT_UNDEFINED_PROPERTIES
4491              If set, report any undefined properties to this file.
4492
4493              If  this  property  is set to a filename then when CMake runs it
4494              will report any properties or variables that were  accessed  but
4495              not defined into the filename specified in this property.
4496
4497
4498       RULE_LAUNCH_COMPILE
4499              Specify a launcher for compile rules.
4500
4501              Makefile  generators  prefix  compiler  commands  with the given
4502              launcher command line.  This is intended to allow  launchers  to
4503              intercept  build  problems  with high granularity.  Non-Makefile
4504              generators currently ignore this property.
4505
4506
4507       RULE_LAUNCH_CUSTOM
4508              Specify a launcher for custom rules.
4509
4510              Makefile  generators  prefix  custom  commands  with  the  given
4511              launcher  command  line.  This is intended to allow launchers to
4512              intercept build problems with  high  granularity.   Non-Makefile
4513              generators currently ignore this property.
4514
4515
4516       RULE_LAUNCH_LINK
4517              Specify a launcher for link rules.
4518
4519              Makefile  generators  prefix  link and archive commands with the
4520              given launcher command line.  This is intended to allow  launch‐
4521              ers   to   intercept   build  problems  with  high  granularity.
4522              Non-Makefile generators currently ignore this property.
4523
4524
4525       RULE_MESSAGES
4526              Specify whether to report a message for each make rule.
4527
4528              This property specifies whether Makefile generators should add a
4529              progress  message  describing what each build rule does.  If the
4530              property is not set the default is ON.  Set the property to  OFF
4531              to disable granular messages and report only as each target com‐
4532              pletes.  This is intended to allow scripted builds to avoid  the
4533              build  time  cost of detailed reports.  If a CMAKE_RULE_MESSAGES
4534              cache entry exists its value initializes the value of this prop‐
4535              erty.  Non-Makefile generators currently ignore this property.
4536
4537
4538       TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
4539              Set if shared libraries may be named like archives.
4540
4541              On  AIX shared libraries may be named "lib<name>.a".  This prop‐
4542              erty is set to true on such platforms.
4543
4544
4545       TARGET_SUPPORTS_SHARED_LIBS
4546              Does the target platform support shared libraries.
4547
4548              TARGET_SUPPORTS_SHARED_LIBS is a boolean specifying whether  the
4549              target platform supports shared libraries. Basically all current
4550              general general purpose OS do  so,  the  exception  are  usually
4551              embedded systems with no or special OSs.
4552
4553
4554       USE_FOLDERS
4555              Use the FOLDER target property to organize targets into folders.
4556
4557              If  not set, CMake treats this property as OFF by default. CMake
4558              generators that are capable of organizing into  a  hierarchy  of
4559              folders  use  the  values  of the FOLDER target property to name
4560              those folders. See also the documentation for the FOLDER  target
4561              property.
4562
4563
4564       __CMAKE_DELETE_CACHE_CHANGE_VARS_
4565              Internal property
4566
4567              Used to detect compiler changes, Do not set.
4568
4569

PROPERTIES ON DIRECTORIES

4571       ADDITIONAL_MAKE_CLEAN_FILES
4572              Additional files to clean during the make clean stage.
4573
4574              A  list  of  files  that  will be cleaned as a part of the "make
4575              clean" stage.
4576
4577
4578       CACHE_VARIABLES
4579              List of cache variables available in the current directory.
4580
4581              This read-only property specifies the list of CMake cache  vari‐
4582              ables currently defined.  It is intended for debugging purposes.
4583
4584
4585       CLEAN_NO_CUSTOM
4586              Should the output of custom commands be left.
4587
4588              If  this  is  true  then the outputs of custom commands for this
4589              directory will not be removed during the "make clean" stage.
4590
4591
4592       COMPILE_DEFINITIONS
4593              Preprocessor definitions for compiling a directory's sources.
4594
4595              The COMPILE_DEFINITIONS property may be set to a semicolon-sepa‐
4596              rated  list  of preprocessor definitions using the syntax VAR or
4597              VAR=value.  Function-style definitions are not supported.  CMake
4598              will  automatically  escape  the  value correctly for the native
4599              build system  (note  that  CMake  language  syntax  may  require
4600              escapes  to specify some values).  This property may be set on a
4601              per-configuration basis using the name COMPILE_DEFINITIONS_<CON‐
4602              FIG>  where <CONFIG> is an upper-case name (ex. "COMPILE_DEFINI‐
4603              TIONS_DEBUG").  This property will be initialized in each direc‐
4604              tory by its value in the directory's parent.
4605
4606
4607              CMake will automatically drop some definitions that are not sup‐
4608              ported by the native build tool.  The VS6 IDE does  not  support
4609              definition values with spaces (but NMake does).
4610
4611
4612              Disclaimer: Most native build tools have poor support for escap‐
4613              ing certain values.  CMake has work-arounds for many  cases  but
4614              some  values  may  just not be possible to pass correctly.  If a
4615              value does not seem to be escaped correctly, do not  attempt  to
4616              work-around the problem by adding escape sequences to the value.
4617              Your work-around may break in a future version of CMake that has
4618              improved escape support.  Instead consider defining the macro in
4619              a (configured) header file.  Then report the limitation.   Known
4620              limitations include:
4621
4622
4623                #          - broken almost everywhere
4624                ;          - broken in VS IDE and Borland Makefiles
4625                ,          - broken in VS IDE
4626                %          - broken in some cases in NMake
4627                & |        - broken in some cases on MinGW
4628                ^ < > \"   - broken in most Make tools on Windows
4629
4630              CMake does not reject these values outright because they do work
4631              in some cases.  Use with caution.
4632
4633
4634       COMPILE_DEFINITIONS_<CONFIG>
4635              Per-configuration preprocessor definitions in a directory.
4636
4637              This is the configuration-specific  version  of  COMPILE_DEFINI‐
4638              TIONS.   This  property will be initialized in each directory by
4639              its value in the directory's parent.
4640
4641
4642
4643       DEFINITIONS
4644              For  CMake  2.4  compatibility  only.   Use  COMPILE_DEFINITIONS
4645              instead.
4646
4647              This read-only property specifies the list of flags given so far
4648              to the add_definitions command.  It is  intended  for  debugging
4649              purposes.  Use the COMPILE_DEFINITIONS instead.
4650
4651
4652       EXCLUDE_FROM_ALL
4653              Exclude the directory from the all target of its parent.
4654
4655              A  property  on  a  directory  that indicates if its targets are
4656              excluded from the default build target. If it is not, then  with
4657              a  Makefile for example typing make will cause the targets to be
4658              built. The same concept applies to the default  build  of  other
4659              generators.
4660
4661
4662       IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
4663              Specify  #include  line  transforms for dependencies in a direc‐
4664              tory.
4665
4666              This property specifies rules to transform  macro-like  #include
4667              lines  during  implicit  dependency scanning of C and C++ source
4668              files.  The list of rules must be semicolon-separated with  each
4669              entry  of the form "A_MACRO(%)=value-with-%" (the % must be lit‐
4670              eral).  During dependency scanning occurrences  of  A_MACRO(...)
4671              on  #include  lines will be replaced by the value given with the
4672              macro argument substituted for '%'.  For example, the entry
4673
4674
4675                MYDIR(%)=<mydir/%>
4676
4677              will convert lines of the form
4678
4679
4680                #include MYDIR(myheader.h)
4681
4682              to
4683
4684
4685                #include <mydir/myheader.h>
4686
4687              allowing the dependency to be followed.
4688
4689
4690              This property applies to sources in all targets within a  direc‐
4691              tory.   The  property  value is initialized in each directory by
4692              its value in the directory's parent.
4693
4694
4695       INCLUDE_DIRECTORIES
4696              List of preprocessor include file search directories.
4697
4698              This read-only property specifies the list of directories  given
4699              so  far  to the include_directories command.  It is intended for
4700              debugging purposes.
4701
4702
4703       INCLUDE_REGULAR_EXPRESSION
4704              Include file scanning regular expression.
4705
4706              This read-only property specifies the  regular  expression  used
4707              during dependency scanning to match include files that should be
4708              followed.  See the include_regular_expression command.
4709
4710
4711       INTERPROCEDURAL_OPTIMIZATION
4712              Enable interprocedural optimization for targets in a directory.
4713
4714              If set to true, enables interprocedural  optimizations  if  they
4715              are known to be supported by the compiler.
4716
4717
4718       INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
4719              Per-configuration interprocedural optimization for a directory.
4720
4721              This is a per-configuration version of INTERPROCEDURAL_OPTIMIZA‐
4722              TION.  If set, this property overrides the generic property  for
4723              the named configuration.
4724
4725
4726       LINK_DIRECTORIES
4727              List of linker search directories.
4728
4729              This  read-only property specifies the list of directories given
4730              so far to the link_directories  command.   It  is  intended  for
4731              debugging purposes.
4732
4733
4734       LISTFILE_STACK
4735              The current stack of listfiles being processed.
4736
4737              This  property  is  mainly useful when trying to debug errors in
4738              your CMake scripts. It returns a list of  what  list  files  are
4739              currently  being processed, in order. So if one listfile does an
4740              INCLUDE command then that is effectively  pushing  the  included
4741              listfile onto the stack.
4742
4743
4744       MACROS List of macro commands available in the current directory.
4745
4746              This  read-only property specifies the list of CMake macros cur‐
4747              rently defined.  It is intended for debugging purposes.  See the
4748              macro command.
4749
4750
4751       PARENT_DIRECTORY
4752              Source directory that added current subdirectory.
4753
4754              This  read-only  property  specifies  the  source directory that
4755              added the current source directory  as  a  subdirectory  of  the
4756              build.    In   the   top-level   directory   the  value  is  the
4757              empty-string.
4758
4759
4760       RULE_LAUNCH_COMPILE
4761              Specify a launcher for compile rules.
4762
4763              See the global property of the  same  name  for  details.   This
4764              overrides the global property for a directory.
4765
4766
4767       RULE_LAUNCH_CUSTOM
4768              Specify a launcher for custom rules.
4769
4770              See  the  global  property  of  the same name for details.  This
4771              overrides the global property for a directory.
4772
4773
4774       RULE_LAUNCH_LINK
4775              Specify a launcher for link rules.
4776
4777              See the global property of the  same  name  for  details.   This
4778              overrides the global property for a directory.
4779
4780
4781       TEST_INCLUDE_FILE
4782              A cmake file that will be included when ctest is run.
4783
4784              If you specify TEST_INCLUDE_FILE, that file will be included and
4785              processed when ctest is run on the directory.
4786
4787
4788       VARIABLES
4789              List of variables defined in the current directory.
4790
4791              This read-only property specifies the list  of  CMake  variables
4792              currently defined.  It is intended for debugging purposes.
4793
4794

PROPERTIES ON TARGETS

4796       <CONFIG>_OUTPUT_NAME
4797              Old per-configuration target file base name.
4798
4799              This  is  a  configuration-specific version of OUTPUT_NAME.  Use
4800              OUTPUT_NAME_<CONFIG> instead.
4801
4802
4803       <CONFIG>_POSTFIX
4804              Postfix to append to the  target  file  name  for  configuration
4805              <CONFIG>.
4806
4807              When  building  with  configuration  <CONFIG>  the value of this
4808              property is appended to the target file name built on disk.  For
4809              non-executable  targets,  this  property  is  initialized by the
4810              value of the variable CMAKE_<CONFIG>_POSTFIX if it is set when a
4811              target  is  created.   This  property  is ignored on the Mac for
4812              Frameworks and App Bundles.
4813
4814
4815       ARCHIVE_OUTPUT_DIRECTORY
4816              Output directory in which to build ARCHIVE target files.
4817
4818              This property specifies the directory into which archive  target
4819              files  should  be  built.  Multi-configuration  generators  (VS,
4820              Xcode) append a per-configuration subdirectory to the  specified
4821              directory.   There  are  three kinds of target files that may be
4822              built: archive, library, and runtime.   Executables  are  always
4823              treated  as runtime targets. Static libraries are always treated
4824              as archive targets.  Module  libraries  are  always  treated  as
4825              library  targets.  For  non-DLL  platforms  shared libraries are
4826              treated as library targets. For DLL platforms the DLL part of  a
4827              shared  library  is  treated  as a runtime target and the corre‐
4828              sponding import library is treated as  an  archive  target.  All
4829              Windows-based  systems including Cygwin are DLL platforms.  This
4830              property is initialized by the value of the  variable  CMAKE_AR‐
4831              CHIVE_OUTPUT_DIRECTORY if it is set when a target is created.
4832
4833
4834       ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
4835              Per-configuration output directory for ARCHIVE target files.
4836
4837              This is a per-configuration version of ARCHIVE_OUTPUT_DIRECTORY,
4838              but multi-configuration generators (VS, Xcode) do NOT  append  a
4839              per-configuration subdirectory to the specified directory.  This
4840              property is initialized by the value of the  variable  CMAKE_AR‐
4841              CHIVE_OUTPUT_DIRECTORY_<CONFIG>  if  it  is set when a target is
4842              created.
4843
4844
4845       ARCHIVE_OUTPUT_NAME
4846              Output name for ARCHIVE target files.
4847
4848              This property specifies the base name for archive target  files.
4849              It  overrides  OUTPUT_NAME  and OUTPUT_NAME_<CONFIG> properties.
4850              There are three kinds of target files that  may  be  built:  ar‐
4851              chive,  library, and runtime.  Executables are always treated as
4852              runtime targets. Static libraries are always treated as  archive
4853              targets. Module libraries are always treated as library targets.
4854              For non-DLL platforms shared libraries are  treated  as  library
4855              targets.  For  DLL platforms the DLL part of a shared library is
4856              treated as a runtime target and the corresponding import library
4857              is  treated  as  an  archive  target.  All Windows-based systems
4858              including Cygwin are DLL platforms.
4859
4860
4861       ARCHIVE_OUTPUT_NAME_<CONFIG>
4862              Per-configuration output name for ARCHIVE target files.
4863
4864              This  is  the  configuration-specific  version  of  ARCHIVE_OUT‐
4865              PUT_NAME.
4866
4867
4868       BUILD_WITH_INSTALL_RPATH
4869              Should build tree targets have install tree rpaths.
4870
4871              BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link
4872              the target in the build tree with the INSTALL_RPATH.  This takes
4873              precedence over SKIP_BUILD_RPATH and avoids the need for relink‐
4874              ing before installation.  This property is  initialized  by  the
4875              value  of  the  variable CMAKE_BUILD_WITH_INSTALL_RPATH if it is
4876              set when a target is created.
4877
4878
4879       COMPILE_DEFINITIONS
4880              Preprocessor definitions for compiling a target's sources.
4881
4882              The COMPILE_DEFINITIONS property may be set to a semicolon-sepa‐
4883              rated  list  of preprocessor definitions using the syntax VAR or
4884              VAR=value.  Function-style definitions are not supported.  CMake
4885              will  automatically  escape  the  value correctly for the native
4886              build system  (note  that  CMake  language  syntax  may  require
4887              escapes  to specify some values).  This property may be set on a
4888              per-configuration basis using the name COMPILE_DEFINITIONS_<CON‐
4889              FIG>  where <CONFIG> is an upper-case name (ex. "COMPILE_DEFINI‐
4890              TIONS_DEBUG").
4891
4892
4893              CMake will automatically drop some definitions that are not sup‐
4894              ported  by  the native build tool.  The VS6 IDE does not support
4895              definition values with spaces (but NMake does).
4896
4897
4898              Disclaimer: Most native build tools have poor support for escap‐
4899              ing  certain  values.  CMake has work-arounds for many cases but
4900              some values may just not be possible to pass  correctly.   If  a
4901              value  does  not seem to be escaped correctly, do not attempt to
4902              work-around the problem by adding escape sequences to the value.
4903              Your work-around may break in a future version of CMake that has
4904              improved escape support.  Instead consider defining the macro in
4905              a  (configured) header file.  Then report the limitation.  Known
4906              limitations include:
4907
4908
4909                #          - broken almost everywhere
4910                ;          - broken in VS IDE and Borland Makefiles
4911                ,          - broken in VS IDE
4912                %          - broken in some cases in NMake
4913                & |        - broken in some cases on MinGW
4914                ^ < > \"   - broken in most Make tools on Windows
4915
4916              CMake does not reject these values outright because they do work
4917              in some cases.  Use with caution.
4918
4919
4920       COMPILE_DEFINITIONS_<CONFIG>
4921              Per-configuration preprocessor definitions on a target.
4922
4923              This  is  the  configuration-specific version of COMPILE_DEFINI‐
4924              TIONS.
4925
4926
4927       COMPILE_FLAGS
4928              Additional flags to use when compiling this target's sources.
4929
4930              The COMPILE_FLAGS property sets additional compiler  flags  used
4931              to  build sources within the target.  Use COMPILE_DEFINITIONS to
4932              pass additional preprocessor definitions.
4933
4934
4935       DEBUG_POSTFIX
4936              See target property <CONFIG>_POSTFIX.
4937
4938              This property is  a  special  case  of  the  more-general  <CON‐
4939              FIG>_POSTFIX property for the DEBUG configuration.
4940
4941
4942       DEFINE_SYMBOL
4943              Define a symbol when compiling this target's sources.
4944
4945              DEFINE_SYMBOL  sets  the name of the preprocessor symbol defined
4946              when compiling sources in a shared library. If not set here then
4947              it  is set to target_EXPORTS by default (with some substitutions
4948              if the target is not a valid C identifier). This is  useful  for
4949              headers  to  know  whether  they  are being included from inside
4950              their library our outside to properly setup  dllexport/dllimport
4951              decorations.
4952
4953
4954       ENABLE_EXPORTS
4955              Specify  whether an executable exports symbols for loadable mod‐
4956              ules.
4957
4958              Normally an executable does not export any symbols because it is
4959              the  final  program.  It is possible for an executable to export
4960              symbols to be used by loadable modules.  When this  property  is
4961              set to true CMake will allow other targets to "link" to the exe‐
4962              cutable with the TARGET_LINK_LIBRARIES command.   On  all  plat‐
4963              forms a target-level dependency on the executable is created for
4964              targets that link to it.  For DLL platforms  an  import  library
4965              will be created for the exported symbols and then used for link‐
4966              ing.  All Windows-based systems including Cygwin are  DLL  plat‐
4967              forms.   For  non-DLL  platforms  that require all symbols to be
4968              resolved at link time, such as Mac OS X, the module will  "link"
4969              to the executable using a flag like "-bundle_loader".  For other
4970              non-DLL platforms the link rule  is  simply  ignored  since  the
4971              dynamic  loader  will automatically bind symbols when the module
4972              is loaded.
4973
4974
4975       EXCLUDE_FROM_ALL
4976              Exclude the target from the all target.
4977
4978              A property on a target that indicates if the target is  excluded
4979              from  the  default build target. If it is not, then with a Make‐
4980              file for example typing make will cause this target to be built.
4981              The  same  concept applies to the default build of other genera‐
4982              tors. Installing a target with EXCLUDE_FROM_ALL set to true  has
4983              undefined behavior.
4984
4985
4986       EchoString
4987              A message to be displayed when the target is built.
4988
4989              A message to display on some generators (such as makefiles) when
4990              the target is built.
4991
4992
4993       FOLDER Set the folder name. Use to organize targets in an IDE.
4994
4995              Targets with no FOLDER property will appear as top  level  enti‐
4996              ties  in  IDEs  like Visual Studio. Targets with the same FOLDER
4997              property value will appear next to each other  in  a  folder  of
4998              that   name.   To  nest  folders,  use  FOLDER  values  such  as
4999              'GUI/Dialogs' with '/' characters separating folder levels.
5000
5001
5002       FRAMEWORK
5003              This target is a framework on the Mac.
5004
5005              If a shared library target has this property set to true it will
5006              be  built as a framework when built on the mac. It will have the
5007              directory structure required for a framework and will  be  suit‐
5008              able to be used with the -framework option
5009
5010
5011       Fortran_MODULE_DIRECTORY
5012              Specify  output  directory  for  Fortran modules provided by the
5013              target.
5014
5015              If the target contains Fortran source files that provide modules
5016              and  the compiler supports a module output directory this speci‐
5017              fies the directory in which the modules will  be  placed.   When
5018              this property is not set the modules will be placed in the build
5019              directory corresponding to the target's  source  directory.   If
5020              the variable CMAKE_Fortran_MODULE_DIRECTORY is set when a target
5021              is created its value is used to initialize this property.
5022
5023
5024       GENERATOR_FILE_NAME
5025              Generator's file for this target.
5026
5027              An internal property used by some generators to record the  name
5028              of project or dsp file associated with this target.
5029
5030
5031       HAS_CXX
5032              Link the target using the C++ linker tool (obsolete).
5033
5034              This  is  equivalent  to setting the LINKER_LANGUAGE property to
5035              CXX.  See that property's documentation for details.
5036
5037
5038       IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
5039              Specify #include line transforms for dependencies in a target.
5040
5041              This property specifies rules to transform  macro-like  #include
5042              lines  during  implicit  dependency scanning of C and C++ source
5043              files.  The list of rules must be semicolon-separated with  each
5044              entry  of the form "A_MACRO(%)=value-with-%" (the % must be lit‐
5045              eral).  During dependency scanning occurrences  of  A_MACRO(...)
5046              on  #include  lines will be replaced by the value given with the
5047              macro argument substituted for '%'.  For example, the entry
5048
5049
5050                MYDIR(%)=<mydir/%>
5051
5052              will convert lines of the form
5053
5054
5055                #include MYDIR(myheader.h)
5056
5057              to
5058
5059
5060                #include <mydir/myheader.h>
5061
5062              allowing the dependency to be followed.
5063
5064
5065              This property applies to sources in the target on  which  it  is
5066              set.
5067
5068
5069       IMPORTED
5070              Read-only indication of whether a target is IMPORTED.
5071
5072              The  boolean  value of this property is true for targets created
5073              with the IMPORTED option to add_executable or  add_library.   It
5074              is false for targets built within the project.
5075
5076
5077       IMPORTED_CONFIGURATIONS
5078              Configurations provided for an IMPORTED target.
5079
5080              Lists configuration names available for an IMPORTED target.  The
5081              names correspond to configurations defined in the  project  from
5082              which  the  target is imported.  If the importing project uses a
5083              different set of configurations the names may  be  mapped  using
5084              the    MAP_IMPORTED_CONFIG_<CONFIG>   property.    Ignored   for
5085              non-imported targets.
5086
5087
5088       IMPORTED_IMPLIB
5089              Full path to the import library for an IMPORTED target.
5090
5091              Specifies the location of the ".lib"  part  of  a  windows  DLL.
5092              Ignored for non-imported targets.
5093
5094
5095       IMPORTED_IMPLIB_<CONFIG>
5096              Per-configuration version of IMPORTED_IMPLIB property.
5097
5098              This  property  is  used  when loading settings for the <CONFIG>
5099              configuration of an imported target.  Configuration names corre‐
5100              spond  to those provided by the project from which the target is
5101              imported.
5102
5103
5104       IMPORTED_LINK_DEPENDENT_LIBRARIES
5105              Dependent shared libraries of an imported shared library.
5106
5107              Shared libraries may be linked to other shared libraries as part
5108              of  their implementation.  On some platforms the linker searches
5109              for the dependent libraries of shared libraries they are includ‐
5110              ing  in  the  link.   This  property  lists the dependent shared
5111              libraries of an imported library.  The list should  be  disjoint
5112              from the list of interface libraries in the IMPORTED_LINK_INTER‐
5113              FACE_LIBRARIES  property.   On  platforms  requiring   dependent
5114              shared  libraries  to be found at link time CMake uses this list
5115              to add appropriate files or paths  to  the  link  command  line.
5116              Ignored for non-imported targets.
5117
5118
5119       IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>
5120              Per-configuration version of IMPORTED_LINK_DEPENDENT_LIBRARIES.
5121
5122              This  property  is  used  when loading settings for the <CONFIG>
5123              configuration of an imported target.  Configuration names corre‐
5124              spond  to those provided by the project from which the target is
5125              imported.   If  set,  this  property  completely  overrides  the
5126              generic property for the named configuration.
5127
5128
5129       IMPORTED_LINK_INTERFACE_LANGUAGES
5130              Languages compiled into an IMPORTED static library.
5131
5132              Lists  languages  of  soure  files  compiled to produce a STATIC
5133              IMPORTED library (such as "C" or  "CXX").   CMake  accounts  for
5134              these  languages  when  computing  how  to  link a target to the
5135              imported library.  For example, when a C executable links to  an
5136              imported C++ static library CMake chooses the C++ linker to sat‐
5137              isfy language runtime dependencies of the static library.
5138
5139
5140              This property  is  ignored  for  targets  that  are  not  STATIC
5141              libraries.  This property is ignored for non-imported targets.
5142
5143
5144       IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>
5145              Per-configuration version of IMPORTED_LINK_INTERFACE_LANGUAGES.
5146
5147              This  property  is  used  when loading settings for the <CONFIG>
5148              configuration of an imported target.  Configuration names corre‐
5149              spond  to those provided by the project from which the target is
5150              imported.   If  set,  this  property  completely  overrides  the
5151              generic property for the named configuration.
5152
5153
5154       IMPORTED_LINK_INTERFACE_LIBRARIES
5155              Transitive link interface of an IMPORTED target.
5156
5157              Lists  libraries  whose  interface  is included when an IMPORTED
5158              library target is linked to another target.  The libraries  will
5159              be  included  on  the  link  line  for  the  target.  Unlike the
5160              LINK_INTERFACE_LIBRARIES property, this property applies to  all
5161              imported  target  types, including STATIC libraries.  This prop‐
5162              erty is ignored for non-imported targets.
5163
5164
5165       IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>
5166              Per-configuration version of IMPORTED_LINK_INTERFACE_LIBRARIES.
5167
5168              This property is used when loading  settings  for  the  <CONFIG>
5169              configuration of an imported target.  Configuration names corre‐
5170              spond to those provided by the project from which the target  is
5171              imported.   If  set,  this  property  completely  overrides  the
5172              generic property for the named configuration.
5173
5174
5175       IMPORTED_LINK_INTERFACE_MULTIPLICITY
5176              Repetition count for cycles of IMPORTED static libraries.
5177
5178              This is LINK_INTERFACE_MULTIPLICITY for IMPORTED targets.
5179
5180
5181       IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>
5182              Per-configuration repetition count for cycles  of  IMPORTED  ar‐
5183              chives.
5184
5185              This     is     the     configuration-specific     version    of
5186              IMPORTED_LINK_INTERFACE_MULTIPLICITY.   If  set,  this  property
5187              completely overrides the generic property for the named configu‐
5188              ration.
5189
5190
5191       IMPORTED_LOCATION
5192              Full path to the main file on disk for an IMPORTED target.
5193
5194              Specifies the location of an IMPORTED target file on disk.   For
5195              executables  this  is  the location of the executable file.  For
5196              bundles on OS X this is the  location  of  the  executable  file
5197              inside  Contents/MacOS under the application bundle folder.  For
5198              static libraries and modules this is the location of the library
5199              or  module.   For  shared libraries on non-DLL platforms this is
5200              the location of the shared library.  For frameworks on OS X this
5201              is  the  location  of  the  library file symlink just inside the
5202              framework folder.  For DLLs this is the location of  the  ".dll"
5203              part of the library.  For UNKNOWN libraries this is the location
5204              of the file to be linked.  Ignored for non-imported targets.
5205
5206
5207       IMPORTED_LOCATION_<CONFIG>
5208              Per-configuration version of IMPORTED_LOCATION property.
5209
5210              This property is used when loading  settings  for  the  <CONFIG>
5211              configuration of an imported target.  Configuration names corre‐
5212              spond to those provided by the project from which the target  is
5213              imported.
5214
5215
5216       IMPORTED_NO_SONAME
5217              Specifies  that  an  IMPORTED shared library target has no "son‐
5218              ame".
5219
5220              Set this property to true for an imported  shared  library  file
5221              that  has  no  "soname"  field.  CMake may adjust generated link
5222              commands for some platforms to prevent the linker from using the
5223              path to the library in place of its missing soname.  Ignored for
5224              non-imported targets.
5225
5226
5227       IMPORTED_NO_SONAME_<CONFIG>
5228              Per-configuration version of IMPORTED_NO_SONAME property.
5229
5230              This property is used when loading  settings  for  the  <CONFIG>
5231              configuration of an imported target.  Configuration names corre‐
5232              spond to those provided by the project from which the target  is
5233              imported.
5234
5235
5236       IMPORTED_SONAME
5237              The "soname" of an IMPORTED target of shared library type.
5238
5239              Specifies  the  "soname" embedded in an imported shared library.
5240              This is meaningful only on  platforms  supporting  the  feature.
5241              Ignored for non-imported targets.
5242
5243
5244       IMPORTED_SONAME_<CONFIG>
5245              Per-configuration version of IMPORTED_SONAME property.
5246
5247              This  property  is  used  when loading settings for the <CONFIG>
5248              configuration of an imported target.  Configuration names corre‐
5249              spond  to those provided by the project from which the target is
5250              imported.
5251
5252
5253       IMPORT_PREFIX
5254              What comes before the import library name.
5255
5256              Similar to the target  property  PREFIX,  but  used  for  import
5257              libraries  (typically corresponding to a DLL) instead of regular
5258              libraries. A target property that can be  set  to  override  the
5259              prefix (such as "lib") on an import library name.
5260
5261
5262       IMPORT_SUFFIX
5263              What comes after the import library name.
5264
5265              Similar  to  the  target  property  SUFFIX,  but used for import
5266              libraries (typically corresponding to a DLL) instead of  regular
5267              libraries.  A  target  property  that can be set to override the
5268              suffix (such as ".lib") on an import library name.
5269
5270
5271       INSTALL_NAME_DIR
5272              Mac OSX directory name for installed targets.
5273
5274              INSTALL_NAME_DIR is a string specifying the directory portion of
5275              the  "install_name"  field of shared libraries on Mac OSX to use
5276              in the installed targets.
5277
5278
5279       INSTALL_RPATH
5280              The rpath to use for installed targets.
5281
5282              A semicolon-separated  list  specifying  the  rpath  to  use  in
5283              installed  targets  (for platforms that support it).  This prop‐
5284              erty   is   initialized   by   the   value   of   the   variable
5285              CMAKE_INSTALL_RPATH if it is set when a target is created.
5286
5287
5288       INSTALL_RPATH_USE_LINK_PATH
5289              Add paths to linker search and installed rpath.
5290
5291              INSTALL_RPATH_USE_LINK_PATH  is  a  boolean  that if set to true
5292              will append directories in the linker search  path  and  outside
5293              the  project to the INSTALL_RPATH.  This property is initialized
5294              by the value of the  variable  CMAKE_INSTALL_RPATH_USE_LINK_PATH
5295              if it is set when a target is created.
5296
5297
5298       INTERPROCEDURAL_OPTIMIZATION
5299              Enable interprocedural optimization for a target.
5300
5301              If  set  to  true, enables interprocedural optimizations if they
5302              are known to be supported by the compiler.
5303
5304
5305       INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
5306              Per-configuration interprocedural optimization for a target.
5307
5308              This is a per-configuration version of INTERPROCEDURAL_OPTIMIZA‐
5309              TION.   If set, this property overrides the generic property for
5310              the named configuration.
5311
5312
5313       LABELS Specify a list of text labels associated with a target.
5314
5315              Target label semantics are currently unspecified.
5316
5317
5318       LIBRARY_OUTPUT_DIRECTORY
5319              Output directory in which to build LIBRARY target files.
5320
5321              This property specifies the directory into which library  target
5322              files  should  be  built.  Multi-configuration  generators  (VS,
5323              Xcode) append a per-configuration subdirectory to the  specified
5324              directory.   There  are  three kinds of target files that may be
5325              built: archive, library, and runtime.   Executables  are  always
5326              treated  as runtime targets. Static libraries are always treated
5327              as archive targets.  Module  libraries  are  always  treated  as
5328              library  targets.  For  non-DLL  platforms  shared libraries are
5329              treated as library targets. For DLL platforms the DLL part of  a
5330              shared  library  is  treated  as a runtime target and the corre‐
5331              sponding import library is treated as  an  archive  target.  All
5332              Windows-based  systems including Cygwin are DLL platforms.  This
5333              property  is  initialized  by  the   value   of   the   variable
5334              CMAKE_LIBRARY_OUTPUT_DIRECTORY  if  it  is  set when a target is
5335              created.
5336
5337
5338       LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
5339              Per-configuration output directory for LIBRARY target files.
5340
5341              This is a per-configuration version of LIBRARY_OUTPUT_DIRECTORY,
5342              but  multi-configuration  generators (VS, Xcode) do NOT append a
5343              per-configuration subdirectory to the specified directory.  This
5344              property   is   initialized   by   the  value  of  the  variable
5345              CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG> if it is set when a tar‐
5346              get is created.
5347
5348
5349       LIBRARY_OUTPUT_NAME
5350              Output name for LIBRARY target files.
5351
5352              This  property specifies the base name for library target files.
5353              It overrides OUTPUT_NAME  and  OUTPUT_NAME_<CONFIG>  properties.
5354              There  are  three  kinds  of target files that may be built: ar‐
5355              chive, library, and runtime.  Executables are always treated  as
5356              runtime  targets. Static libraries are always treated as archive
5357              targets. Module libraries are always treated as library targets.
5358              For  non-DLL  platforms  shared libraries are treated as library
5359              targets. For DLL platforms the DLL part of a shared  library  is
5360              treated as a runtime target and the corresponding import library
5361              is treated as  an  archive  target.  All  Windows-based  systems
5362              including Cygwin are DLL platforms.
5363
5364
5365       LIBRARY_OUTPUT_NAME_<CONFIG>
5366              Per-configuration output name for LIBRARY target files.
5367
5368              This  is  the  configuration-specific  version  of  LIBRARY_OUT‐
5369              PUT_NAME.
5370
5371
5372       LINKER_LANGUAGE
5373              Specifies language whose compiler will invoke the linker.
5374
5375              For executables, shared libraries, and modules,  this  sets  the
5376              language  whose compiler is used to link the target (such as "C"
5377              or "CXX").  A typical value for an executable is the language of
5378              the  source  file  providing the program entry point (main).  If
5379              not set, the language with the highest linker  preference  value
5380              is  the default.  See documentation of CMAKE_<LANG>_LINKER_PREF‐
5381              ERENCE variables.
5382
5383
5384       LINK_DEPENDS
5385              Additional files on which a target binary depends for linking.
5386
5387              Specifies a semicolon-separated list of full-paths to  files  on
5388              which  the link rule for this target depends.  The target binary
5389              will be linked if any of the named files is newer than it.
5390
5391
5392              This property is ignored  by  non-Makefile  generators.   It  is
5393              intended  to specify dependencies on "linker scripts" for custom
5394              Makefile link rules.
5395
5396
5397       LINK_FLAGS
5398              Additional flags to use when linking this target.
5399
5400              The LINK_FLAGS property can be used to add extra  flags  to  the
5401              link  step of a target. LINK_FLAGS_<CONFIG> will add to the con‐
5402              figuration <CONFIG>, for example,  DEBUG,  RELEASE,  MINSIZEREL,
5403              RELWITHDEBINFO.
5404
5405
5406       LINK_FLAGS_<CONFIG>
5407              Per-configuration linker flags for a target.
5408
5409              This is the configuration-specific version of LINK_FLAGS.
5410
5411
5412       LINK_INTERFACE_LIBRARIES
5413              List  public  interface  libraries  for a shared library or exe‐
5414              cutable.
5415
5416              By default linking to a shared library target transitively links
5417              to  targets  with  which  the library itself was linked.  For an
5418              executable with exports (see  the  ENABLE_EXPORTS  property)  no
5419              default  transitive  link  dependencies are used.  This property
5420              replaces  the  default  transitive  link  dependencies  with  an
5421              explict list.  When the target is linked into another target the
5422              libraries  listed  (and   recursively   their   link   interface
5423              libraries)  will  be  provided to the other target also.  If the
5424              list is empty then  no  transitive  link  dependencies  will  be
5425              incorporated when this target is linked into another target even
5426              if the default set is non-empty.  This property is  ignored  for
5427              STATIC libraries.
5428
5429
5430       LINK_INTERFACE_LIBRARIES_<CONFIG>
5431              Per-configuration  list of public interface libraries for a tar‐
5432              get.
5433
5434              This  is  the  configuration-specific  version  of   LINK_INTER‐
5435              FACE_LIBRARIES.   If set, this property completely overrides the
5436              generic property for the named configuration.
5437
5438
5439       LINK_INTERFACE_MULTIPLICITY
5440              Repetition count for STATIC libraries with cyclic dependencies.
5441
5442              When linking to a STATIC library target with cyclic dependencies
5443              the  linker may need to scan more than once through the archives
5444              in the strongly connected component  of  the  dependency  graph.
5445              CMake  by  default  constructs  the link line so that the linker
5446              will scan through the component at least twice.   This  property
5447              specifies  the  minimum number of scans if it is larger than the
5448              default.  CMake uses the largest value specified by  any  target
5449              in a component.
5450
5451
5452       LINK_INTERFACE_MULTIPLICITY_<CONFIG>
5453              Per-configuration   repetition   count   for  cycles  of  STATIC
5454              libraries.
5455
5456              This  is  the  configuration-specific  version  of   LINK_INTER‐
5457              FACE_MULTIPLICITY.   If  set, this property completely overrides
5458              the generic property for the named configuration.
5459
5460
5461       LINK_SEARCH_END_STATIC
5462              End a link line such that static system libraries are used.
5463
5464              Some linkers support switches such as -Bstatic and -Bdynamic  to
5465              determine  whether  to  use static or shared libraries for -lXXX
5466              options.  CMake uses these options to  set  the  link  type  for
5467              libraries  whose full paths are not known or (in some cases) are
5468              in implicit link directories for the platform.  By  default  the
5469              linker  search  type  is  left  at  -Bdynamic  by the end of the
5470              library list.  This property switches the  final  linker  search
5471              type to -Bstatic.
5472
5473
5474       LOCATION
5475              Read-only location of a target on disk.
5476
5477              For  an  imported  target,  this  read-only property returns the
5478              value of the LOCATION_<CONFIG> property for an unspecified  con‐
5479              figuration <CONFIG> provided by the target.
5480
5481
5482              For a non-imported target, this property is provided for compat‐
5483              ibility with CMake 2.4 and below.  It was meant to get the loca‐
5484              tion  of  an executable target's output file for use in add_cus‐
5485              tom_command.  The path may contain a build-system-specific  por‐
5486              tion  that is replaced at build time with the configuration get‐
5487              ting built (such as "$(ConfigurationName)" in VS). In CMake  2.6
5488              and  above  add_custom_command automatically recognizes a target
5489              name in its COMMAND and DEPENDS options and computes the  target
5490              location.   In  CMake  2.8.4 and above add_custom_command recog‐
5491              nizes generator expressions to refer to  target  locations  any‐
5492              where in the command.  Therefore this property is not needed for
5493              creating custom commands.
5494
5495
5496              Do not set properties that affect the  location  of  the  target
5497              after  reading  this  property.   These include properties whose
5498              names    match    "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIREC‐
5499              TORY)(_<CONFIG>)?"  or  "(IMPLIB_)?(PREFIX|SUFFIX)".  Failure to
5500              follow this rule is not diagnosed and leaves the location of the
5501              target undefined.
5502
5503
5504       LOCATION_<CONFIG>
5505              Read-only property providing a target location on disk.
5506
5507              A  read-only  property that indicates where a target's main file
5508              is located on disk for the configuration <CONFIG>.  The property
5509              is defined only for library and executable targets.  An imported
5510              target may provide a set of configurations different  from  that
5511              of  the  importing  project.   By  default  CMake  looks  for an
5512              exact-match but otherwise uses an arbitrary available configura‐
5513              tion.   Use  the  MAP_IMPORTED_CONFIG_<CONFIG>  property  to map
5514              imported configurations explicitly.
5515
5516
5517              Do not set properties that affect the  location  of  the  target
5518              after  reading  this  property.   These include properties whose
5519              names    match    "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIREC‐
5520              TORY)(_<CONFIG>)?"  or  "(IMPLIB_)?(PREFIX|SUFFIX)".  Failure to
5521              follow this rule is not diagnosed and leaves the location of the
5522              target undefined.
5523
5524
5525       MACOSX_BUNDLE
5526              Build an executable as an application bundle on Mac OS X.
5527
5528              When  this  property is set to true the executable when built on
5529              Mac OS X will be created as an application bundle.   This  makes
5530              it  a  GUI executable that can be launched from the Finder.  See
5531              the MACOSX_BUNDLE_INFO_PLIST  target  property  for  information
5532              about  creation  of the Info.plist file for the application bun‐
5533              dle.
5534
5535
5536       MACOSX_BUNDLE_INFO_PLIST
5537              Specify a custom Info.plist template for a Mac OS X App Bundle.
5538
5539              An executable target with MACOSX_BUNDLE enabled will be built as
5540              an  application  bundle  on Mac OS X.  By default its Info.plist
5541              file is created by configuring a template  called  MacOSXBundle‐
5542              Info.plist.in  located  in the CMAKE_MODULE_PATH.  This property
5543              specifies an alternative template file name which may be a  full
5544              path.
5545
5546
5547              The following target properties may be set to specify content to
5548              be configured into the file:
5549
5550
5551                MACOSX_BUNDLE_INFO_STRING
5552                MACOSX_BUNDLE_ICON_FILE
5553                MACOSX_BUNDLE_GUI_IDENTIFIER
5554                MACOSX_BUNDLE_LONG_VERSION_STRING
5555                MACOSX_BUNDLE_BUNDLE_NAME
5556                MACOSX_BUNDLE_SHORT_VERSION_STRING
5557                MACOSX_BUNDLE_BUNDLE_VERSION
5558                MACOSX_BUNDLE_COPYRIGHT
5559
5560              CMake variables of the same name may be set to affect  all  tar‐
5561              gets in a directory that do not have each specific property set.
5562              If a custom Info.plist is specified by this property it  may  of
5563              course  hard-code  all  the settings instead of using the target
5564              properties.
5565
5566
5567       MACOSX_FRAMEWORK_INFO_PLIST
5568              Specify a custom Info.plist template for a Mac OS X Framework.
5569
5570              An library target with FRAMEWORK enabled  will  be  built  as  a
5571              framework  on  Mac OS X.  By default its Info.plist file is cre‐
5572              ated  by  configuring   a   template   called   MacOSXFramework‐
5573              Info.plist.in  located  in the CMAKE_MODULE_PATH.  This property
5574              specifies an alternative template file name which may be a  full
5575              path.
5576
5577
5578              The following target properties may be set to specify content to
5579              be configured into the file:
5580
5581
5582                MACOSX_FRAMEWORK_ICON_FILE
5583                MACOSX_FRAMEWORK_IDENTIFIER
5584                MACOSX_FRAMEWORK_SHORT_VERSION_STRING
5585                MACOSX_FRAMEWORK_BUNDLE_VERSION
5586
5587              CMake variables of the same name may be set to affect  all  tar‐
5588              gets in a directory that do not have each specific property set.
5589              If a custom Info.plist is specified by this property it  may  of
5590              course  hard-code  all  the settings instead of using the target
5591              properties.
5592
5593
5594       MAP_IMPORTED_CONFIG_<CONFIG>
5595              Map from project configuration to IMPORTED  target's  configura‐
5596              tion.
5597
5598              List  configurations  of an imported target that may be used for
5599              the current project's <CONFIG> configuration.  Targets  imported
5600              from  another project may not provide the same set of configura‐
5601              tion names available in the current project.  Setting this prop‐
5602              erty  tells  CMake what imported configurations are suitable for
5603              use when building the <CONFIG> configuration.  The first config‐
5604              uration  in the list found to be provided by the imported target
5605              is selected.  If no matching configurations  are  available  the
5606              imported target is considered to be not found.  This property is
5607              ignored for non-imported targets.
5608
5609
5610       OSX_ARCHITECTURES
5611              Target specific architectures for OS X.
5612
5613              The OSX_ARCHITECTURES property sets the target binary  architec‐
5614              ture  for  targets on OS X.  This property is initialized by the
5615              value of the variable CMAKE_OSX_ARCHITECTURES if it is set  when
5616              a  target is created.  Use OSX_ARCHITECTURES_<CONFIG> to set the
5617              binary architectures on a per-configuration basis.  <CONFIG>  is
5618              an upper-case name (ex: "OSX_ARCHITECTURES_DEBUG").
5619
5620
5621       OSX_ARCHITECTURES_<CONFIG>
5622              Per-configuration OS X binary architectures for a target.
5623
5624              This   property   is   the   configuration-specific  version  of
5625              OSX_ARCHITECTURES.
5626
5627
5628       OUTPUT_NAME
5629              Output name for target files.
5630
5631              This sets the base name for output files  created  for  an  exe‐
5632              cutable  or library target.  If not set, the logical target name
5633              is used by default.
5634
5635
5636       OUTPUT_NAME_<CONFIG>
5637              Per-configuration target file base name.
5638
5639              This is the configuration-specific version of OUTPUT_NAME.
5640
5641
5642       POST_INSTALL_SCRIPT
5643              Deprecated install support.
5644
5645              The PRE_INSTALL_SCRIPT and  POST_INSTALL_SCRIPT  properties  are
5646              the  old  way  to  specify CMake scripts to run before and after
5647              installing  a  target.   They  are  used  only  when   the   old
5648              INSTALL_TARGETS  command is used to install the target.  Use the
5649              INSTALL command instead.
5650
5651
5652       PREFIX What comes before the library name.
5653
5654              A target property that can be set to override the  prefix  (such
5655              as "lib") on a library name.
5656
5657
5658       PRE_INSTALL_SCRIPT
5659              Deprecated install support.
5660
5661              The  PRE_INSTALL_SCRIPT  and  POST_INSTALL_SCRIPT properties are
5662              the old way to specify CMake scripts to  run  before  and  after
5663              installing   a   target.   They  are  used  only  when  the  old
5664              INSTALL_TARGETS command is used to install the target.  Use  the
5665              INSTALL command instead.
5666
5667
5668       PRIVATE_HEADER
5669              Specify  private header files in a FRAMEWORK shared library tar‐
5670              get.
5671
5672              Shared library targets marked with the FRAMEWORK property gener‐
5673              ate  frameworks  on  OS  X  and normal shared libraries on other
5674              platforms.  This property may be set to a list of  header  files
5675              to  be  placed in the PrivateHeaders directory inside the frame‐
5676              work folder.   On  non-Apple  platforms  these  headers  may  be
5677              installed  using  the  PRIVATE_HEADER option to the install(TAR‐
5678              GETS) command.
5679
5680
5681       PROJECT_LABEL
5682              Change the name of a target in an IDE.
5683
5684              Can be used to change the name of the target in an IDE like Vis‐
5685              ual Studio.
5686
5687
5688       PUBLIC_HEADER
5689              Specify  public  header files in a FRAMEWORK shared library tar‐
5690              get.
5691
5692              Shared library targets marked with the FRAMEWORK property gener‐
5693              ate  frameworks  on  OS  X  and normal shared libraries on other
5694              platforms.  This property may be set to a list of  header  files
5695              to  be  placed  in  the  Headers  directory inside the framework
5696              folder.  On non-Apple platforms these headers may  be  installed
5697              using the PUBLIC_HEADER option to the install(TARGETS) command.
5698
5699
5700       RESOURCE
5701              Specify resource files in a FRAMEWORK shared library target.
5702
5703              Shared library targets marked with the FRAMEWORK property gener‐
5704              ate frameworks on OS X and  normal  shared  libraries  on  other
5705              platforms.   This  property  may be set to a list of files to be
5706              placed in the Resources directory inside the  framework  folder.
5707              On  non-Apple  platforms  these files may be installed using the
5708              RESOURCE option to the install(TARGETS) command.
5709
5710
5711       RULE_LAUNCH_COMPILE
5712              Specify a launcher for compile rules.
5713
5714              See the global property of the  same  name  for  details.   This
5715              overrides the global and directory property for a target.
5716
5717
5718       RULE_LAUNCH_CUSTOM
5719              Specify a launcher for custom rules.
5720
5721              See  the  global  property  of  the same name for details.  This
5722              overrides the global and directory property for a target.
5723
5724
5725       RULE_LAUNCH_LINK
5726              Specify a launcher for link rules.
5727
5728              See the global property of the  same  name  for  details.   This
5729              overrides the global and directory property for a target.
5730
5731
5732       RUNTIME_OUTPUT_DIRECTORY
5733              Output directory in which to build RUNTIME target files.
5734
5735              This  property specifies the directory into which runtime target
5736              files  should  be  built.  Multi-configuration  generators  (VS,
5737              Xcode)  append a per-configuration subdirectory to the specified
5738              directory.  There are three kinds of target files  that  may  be
5739              built:  archive,  library,  and runtime.  Executables are always
5740              treated as runtime targets. Static libraries are always  treated
5741              as  archive  targets.  Module  libraries  are  always treated as
5742              library targets. For  non-DLL  platforms  shared  libraries  are
5743              treated  as library targets. For DLL platforms the DLL part of a
5744              shared library is treated as a runtime  target  and  the  corre‐
5745              sponding  import  library  is  treated as an archive target. All
5746              Windows-based systems including Cygwin are DLL platforms.   This
5747              property  is initialized by the value of the variable CMAKE_RUN‐
5748              TIME_OUTPUT_DIRECTORY if it is set when a target is created.
5749
5750
5751       RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
5752              Per-configuration output directory for RUNTIME target files.
5753
5754              This is a per-configuration version of RUNTIME_OUTPUT_DIRECTORY,
5755              but  multi-configuration  generators (VS, Xcode) do NOT append a
5756              per-configuration subdirectory to the specified directory.  This
5757              property  is initialized by the value of the variable CMAKE_RUN‐
5758              TIME_OUTPUT_DIRECTORY_<CONFIG> if it is set  when  a  target  is
5759              created.
5760
5761
5762       RUNTIME_OUTPUT_NAME
5763              Output name for RUNTIME target files.
5764
5765              This  property specifies the base name for runtime target files.
5766              It overrides OUTPUT_NAME  and  OUTPUT_NAME_<CONFIG>  properties.
5767              There  are  three  kinds  of target files that may be built: ar‐
5768              chive, library, and runtime.  Executables are always treated  as
5769              runtime  targets. Static libraries are always treated as archive
5770              targets. Module libraries are always treated as library targets.
5771              For  non-DLL  platforms  shared libraries are treated as library
5772              targets. For DLL platforms the DLL part of a shared  library  is
5773              treated as a runtime target and the corresponding import library
5774              is treated as  an  archive  target.  All  Windows-based  systems
5775              including Cygwin are DLL platforms.
5776
5777
5778       RUNTIME_OUTPUT_NAME_<CONFIG>
5779              Per-configuration output name for RUNTIME target files.
5780
5781              This  is  the  configuration-specific  version  of  RUNTIME_OUT‐
5782              PUT_NAME.
5783
5784
5785       SKIP_BUILD_RPATH
5786              Should rpaths be used for the build tree.
5787
5788              SKIP_BUILD_RPATH is a boolean specifying whether to  skip  auto‐
5789              matic generation of an rpath allowing the target to run from the
5790              build tree.  This property is initialized by the  value  of  the
5791              variable  CMAKE_SKIP_BUILD_RPATH  if  it is set when a target is
5792              created.
5793
5794
5795       SOURCES
5796              Source names specified for a target.
5797
5798              Read-only list of sources specified for  a  target.   The  names
5799              returned  are suitable for passing to the set_source_files_prop‐
5800              erties command.
5801
5802
5803       SOVERSION
5804              What version number is this target.
5805
5806              For shared libraries VERSION and SOVERSION can be used to  spec‐
5807              ify  the build version and api version respectively. When build‐
5808              ing or installing appropriate symlinks are created if the  plat‐
5809              form supports symlinks and the linker supports so-names. If only
5810              one of both is specified the missing is assumed to have the same
5811              version  number. For shared libraries and executables on Windows
5812              the VERSION attribute is parsed to extract a "major.minor"  ver‐
5813              sion  number. These numbers are used as the image version of the
5814              binary.
5815
5816
5817       STATIC_LIBRARY_FLAGS
5818              Extra flags to use when linking static libraries.
5819
5820              Extra flags to use when linking a static library.
5821
5822
5823       STATIC_LIBRARY_FLAGS_<CONFIG>
5824              Per-configuration flags for creating a static library.
5825
5826              This    is     the     configuration-specific     version     of
5827              STATIC_LIBRARY_FLAGS.
5828
5829
5830       SUFFIX What comes after the library name.
5831
5832              A  target  property that can be set to override the suffix (such
5833              as ".so") on a library name.
5834
5835
5836       TYPE   The type of the target.
5837
5838              This read-only property can be used to  test  the  type  of  the
5839              given  target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY,
5840              SHARED_LIBRARY, EXECUTABLE or one of the internal target types.
5841
5842
5843       VERSION
5844              What version number is this target.
5845
5846              For shared libraries VERSION and SOVERSION can be used to  spec‐
5847              ify  the build version and api version respectively. When build‐
5848              ing or installing appropriate symlinks are created if the  plat‐
5849              form supports symlinks and the linker supports so-names. If only
5850              one of both is specified the missing is assumed to have the same
5851              version  number.  For executables VERSION can be used to specify
5852              the build version. When building or installing appropriate  sym‐
5853              links  are created if the platform supports symlinks. For shared
5854              libraries and executables on Windows the  VERSION  attribute  is
5855              parsed  to extract a "major.minor" version number. These numbers
5856              are used as the image version of the binary.
5857
5858
5859       VS_KEYWORD
5860              Visual Studio project keyword.
5861
5862              Can be set to change the visual studio keyword, for  example  QT
5863              integration works better if this is set to Qt4VSv1.0.
5864
5865
5866       VS_SCC_LOCALPATH
5867              Visual Studio Source Code Control Provider.
5868
5869              Can be set to change the visual studio source code control local
5870              path property.
5871
5872
5873       VS_SCC_PROJECTNAME
5874              Visual Studio Source Code Control Project.
5875
5876              Can be set to change  the  visual  studio  source  code  control
5877              project name property.
5878
5879
5880       VS_SCC_PROVIDER
5881              Visual Studio Source Code Control Provider.
5882
5883              Can  be  set  to  change  the  visual studio source code control
5884              provider property.
5885
5886
5887       WIN32_EXECUTABLE
5888              Build an executable with a WinMain entry point on windows.
5889
5890              When this property is set to true the executable when linked  on
5891              Windows  will be created with a WinMain() entry point instead of
5892              of just main().This makes it a GUI executable instead of a  con‐
5893              sole application.  See the CMAKE_MFC_FLAG variable documentation
5894              to configure use of MFC for WinMain executables.
5895
5896
5897       XCODE_ATTRIBUTE_<an-attribute>
5898              Set Xcode target attributes directly.
5899
5900              Tell the Xcode generator to  set  '<an-attribute>'  to  a  given
5901              value  in the generated Xcode project.  Ignored on other genera‐
5902              tors.
5903
5904

PROPERTIES ON TESTS

5906       ATTACHED_FILES
5907              Attach a list of files to a dashboard submission.
5908
5909              Set this property to a list of files that will  be  encoded  and
5910              submitted to the dashboard as an addition to the test result.
5911
5912
5913       ATTACHED_FILES_ON_FAIL
5914              Attach  a  list  of  files to a dashboard submission if the test
5915              fails.
5916
5917              Same as ATTACHED_FILES, but these files will only be included if
5918              the test does not pass.
5919
5920
5921       COST   Set  this to a floating point value. Tests in a test set will be
5922              run in descending order of cost.
5923
5924              This property describes the cost of a test. You  can  explicitly
5925              set this value; tests with higher COST values will run first.
5926
5927
5928       DEPENDS
5929              Specifies  that this test should only be run after the specified
5930              list of tests.
5931
5932              Set this to a list of tests that must finish before this test is
5933              run.
5934
5935
5936       ENVIRONMENT
5937              Specify environment variables that should be defined for running
5938              a test.
5939
5940              If set to a list of environment variables and values of the form
5941              MYVAR=value  those  environment  variables will be defined while
5942              running the test. The environment is restored  to  its  previous
5943              state after the test is done.
5944
5945
5946       FAIL_REGULAR_EXPRESSION
5947              If  the  output  matches  this  regular expression the test will
5948              fail.
5949
5950              If set, if the output matches one of specified  regular  expres‐
5951              sions,  the  test will fail.For example: PASS_REGULAR_EXPRESSION
5952              "[^a-z]Error;ERROR;Failed"
5953
5954
5955       LABELS Specify a list of text labels associated with a test.
5956
5957              The list is reported in dashboard submissions.
5958
5959
5960       MEASUREMENT
5961              Specify a CDASH measurement and value to be reported for a test.
5962
5963              If set to a name then that name will be reported to CDASH  as  a
5964              named  measurement  with  a  value  of 1. You may also specify a
5965              value by setting MEASUREMENT to "measurement=value".
5966
5967
5968       PASS_REGULAR_EXPRESSION
5969              The output must match this regular expression for  the  test  to
5970              pass.
5971
5972              If  set,  the  test output will be checked against the specified
5973              regular expressions and at least one of the regular  expressions
5974              has to match, otherwise the test will fail.
5975
5976
5977       PROCESSORS
5978              How many process slots this test requires
5979
5980              Denotes  the  number  of processors that this test will require.
5981              This is typically used for MPI tests, and should be used in con‐
5982              junction with the ctest_test PARALLEL_LEVEL option.
5983
5984
5985       REQUIRED_FILES
5986              List of files required to run the test.
5987
5988              If  set  to a list of files, the test will not be run unless all
5989              of the files exist.
5990
5991
5992       RESOURCE_LOCK
5993              Specify a list of resources that are locked by this test.
5994
5995              If multiple tests specify the same resource lock, they are guar‐
5996              anteed not to run concurrently.
5997
5998
5999       RUN_SERIAL
6000              Do not run this test in parallel with any other test.
6001
6002              Use  this  option  in  conjunction  with  the  ctest_test PARAL‐
6003              LEL_LEVEL option to specify that this test should not be run  in
6004              parallel with any other tests.
6005
6006
6007       TIMEOUT
6008              How many seconds to allow for this test.
6009
6010              This property if set will limit a test to not take more than the
6011              specified number of seconds to run. If it exceeds that the  test
6012              process  will  be  killed  and ctest will move to the next test.
6013              This setting takes precedence over CTEST_TESTING_TIMEOUT.
6014
6015
6016       WILL_FAIL
6017              If set to true, this will invert the pass/fail flag of the test.
6018
6019              This property can be used for tests that are  expected  to  fail
6020              and return a non zero return code.
6021
6022
6023       WORKING_DIRECTORY
6024              The directory from which the test executable will be called.
6025
6026              If this is not set it is called from the directory the test exe‐
6027              cutable is located in.
6028
6029

PROPERTIES ON SOURCE FILES

6031       ABSTRACT
6032              Is this source file an abstract class.
6033
6034              A property on a source file that indicates if  the  source  file
6035              represents  a  class that is abstract. This only makes sense for
6036              languages that have a notion of an abstract class and it is only
6037              used by some tools that wrap classes into other languages.
6038
6039
6040       COMPILE_DEFINITIONS
6041              Preprocessor definitions for compiling a source file.
6042
6043              The COMPILE_DEFINITIONS property may be set to a semicolon-sepa‐
6044              rated list of preprocessor definitions using the syntax  VAR  or
6045              VAR=value.  Function-style definitions are not supported.  CMake
6046              will automatically escape the value  correctly  for  the  native
6047              build  system  (note  that  CMake  language  syntax  may require
6048              escapes to specify some values).  This property may be set on  a
6049              per-configuration basis using the name COMPILE_DEFINITIONS_<CON‐
6050              FIG> where <CONFIG> is an upper-case name (ex.  "COMPILE_DEFINI‐
6051              TIONS_DEBUG").
6052
6053
6054              CMake will automatically drop some definitions that are not sup‐
6055              ported by the native build tool.  The VS6 IDE does  not  support
6056              definition  values with spaces (but NMake does).  Xcode does not
6057              support per-configuration definitions on source files.
6058
6059
6060              Disclaimer: Most native build tools have poor support for escap‐
6061              ing  certain  values.  CMake has work-arounds for many cases but
6062              some values may just not be possible to pass  correctly.   If  a
6063              value  does  not seem to be escaped correctly, do not attempt to
6064              work-around the problem by adding escape sequences to the value.
6065              Your work-around may break in a future version of CMake that has
6066              improved escape support.  Instead consider defining the macro in
6067              a  (configured) header file.  Then report the limitation.  Known
6068              limitations include:
6069
6070
6071                #          - broken almost everywhere
6072                ;          - broken in VS IDE and Borland Makefiles
6073                ,          - broken in VS IDE
6074                %          - broken in some cases in NMake
6075                & |        - broken in some cases on MinGW
6076                ^ < > \"   - broken in most Make tools on Windows
6077
6078              CMake does not reject these values outright because they do work
6079              in some cases.  Use with caution.
6080
6081
6082       COMPILE_DEFINITIONS_<CONFIG>
6083              Per-configuration preprocessor definitions on a source file.
6084
6085              This  is  the  configuration-specific version of COMPILE_DEFINI‐
6086              TIONS.  Note  that  Xcode  does  not  support  per-configuration
6087              source  file flags so this property will be ignored by the Xcode
6088              generator.
6089
6090
6091       COMPILE_FLAGS
6092              Additional flags to be added when compiling this source file.
6093
6094              These flags will be added to the list of compile flags when this
6095              source  file builds.  Use COMPILE_DEFINITIONS to pass additional
6096              preprocessor definitions.
6097
6098
6099       EXTERNAL_OBJECT
6100              If set to true then this is an object file.
6101
6102              If this property is set to true then the source file  is  really
6103              an  object  file  and  should not be compiled.  It will still be
6104              linked into the target though.
6105
6106
6107       GENERATED
6108              Is this source file generated as part of the build process.
6109
6110              If a source file is generated by the build  process  CMake  will
6111              handle  it differently in terms of dependency checking etc. Oth‐
6112              erwise having a non-existent source file could create problems.
6113
6114
6115       HEADER_FILE_ONLY
6116              Is this source file only a header file.
6117
6118              A property on a source file that indicates if the source file is
6119              a  header  file  with  no associated implementation. This is set
6120              automatically based on the file extension and is used  by  CMake
6121              to  determine  is  certain dependency information should be com‐
6122              puted.
6123
6124
6125       KEEP_EXTENSION
6126              Make the output file have the same extension as the source file.
6127
6128              If this property is set then the file extension  of  the  output
6129              file  will  be the same as that of the source file. Normally the
6130              output file extension is computed based on the language  of  the
6131              source file, for example .cxx will go to a .o extension.
6132
6133
6134       LABELS Specify a list of text labels associated with a source file.
6135
6136              This property has meaning only when the source file is listed in
6137              a target whose LABELS property is also set.  No other  semantics
6138              are currently specified.
6139
6140
6141       LANGUAGE
6142              What programming language is the file.
6143
6144              A property that can be set to indicate what programming language
6145              the source file is. If it is not set the language is  determined
6146              based  on the file extension. Typical values are CXX C etc. Set‐
6147              ting this property for a file means this file will be  compiled.
6148              Do not set this for header or files that should not be compiled.
6149
6150
6151       LOCATION
6152              The full path to a source file.
6153
6154              A  read  only  property  on a SOURCE FILE that contains the full
6155              path to the source file.
6156
6157
6158       MACOSX_PACKAGE_LOCATION
6159              Place a source file inside a Mac OS X bundle or framework.
6160
6161              Executable targets with the MACOSX_BUNDLE property set are built
6162              as  Mac  OS  X  application  bundles on Apple platforms.  Shared
6163              library targets with the FRAMEWORK property set are built as Mac
6164              OS  X frameworks on Apple platforms.  Source files listed in the
6165              target with this property set will  be  copied  to  a  directory
6166              inside  the  bundle or framework content folder specified by the
6167              property   value.    For   bundles   the   content   folder   is
6168              "<name>.app/Contents".   For  frameworks  the  content folder is
6169              "<name>.framework/Versions/<version>".  See  the  PUBLIC_HEADER,
6170              PRIVATE_HEADER,  and  RESOURCE  target properties for specifying
6171              files meant for Headers, PrivateHeaders, or  Resources  directo‐
6172              ries.
6173
6174
6175       OBJECT_DEPENDS
6176              Additional files on which a compiled object file depends.
6177
6178              Specifies  a  semicolon-separated list of full-paths to files on
6179              which any object files compiled from this  source  file  depend.
6180              An  object  file will be recompiled if any of the named files is
6181              newer than it.
6182
6183
6184              This property need not be used to specify the  dependency  of  a
6185              source  file  on  a  generated  header  file  that  it includes.
6186              Although the property was originally introduced  for  this  pur‐
6187              pose,  it  is no longer necessary.  If the generated header file
6188              is created by a custom command in the same target as the  source
6189              file,  the  automatic dependency scanning process will recognize
6190              the dependency.  If the generated  header  file  is  created  by
6191              another  target,  an  inter-target  dependency should be created
6192              with the add_dependencies command (if one does not already exist
6193              due to linking relationships).
6194
6195
6196       OBJECT_OUTPUTS
6197              Additional outputs for a Makefile rule.
6198
6199              Additional  outputs  created by compilation of this source file.
6200              If any of these outputs is missing the  object  will  be  recom‐
6201              piled. This is supported only on Makefile generators and will be
6202              ignored on other generators.
6203
6204
6205       SYMBOLIC
6206              Is this just a name for a rule.
6207
6208              If SYMBOLIC (boolean) is set to true the build  system  will  be
6209              informed  that  the  source file is not actually created on disk
6210              but instead used as a symbolic name for a build rule.
6211
6212
6213       WRAP_EXCLUDE
6214              Exclude this source file from any code wrapping techniques.
6215
6216              Some packages can wrap source files into alternate languages  to
6217              provide  additional  functionality. For example, C++ code can be
6218              wrapped into Java or Python etc using SWIG etc. If  WRAP_EXCLUDE
6219              is  set  to  true  (1  etc) that indicates then this source file
6220              should not be wrapped.
6221
6222

PROPERTIES ON CACHE ENTRIES

6224       ADVANCED
6225              True if entry should be hidden by default in GUIs.
6226
6227              This is a boolean value indicating whether the entry is  consid‐
6228              ered   interesting   only   for   advanced  configuration.   The
6229              mark_as_advanced() command modifies this property.
6230
6231
6232       HELPSTRING
6233              Help associated with entry in GUIs.
6234
6235              This string summarizes the purpose of an entry to help users set
6236              it through a CMake GUI.
6237
6238
6239       MODIFIED
6240              Internal management property.  Do not set or get.
6241
6242              This  is  an  internal  cache entry property managed by CMake to
6243              track interactive user modification of entries.  Ignore it.
6244
6245
6246       STRINGS
6247              Enumerate possible STRING entry values for GUI selection.
6248
6249              For cache entries with type STRING, this  enumerates  a  set  of
6250              values.   CMake  GUIs may use this to provide a selection widget
6251              instead of a generic string entry field.   This  is  for  conve‐
6252              nience  only.  CMake does not enforce that the value matches one
6253              of those listed.
6254
6255
6256       TYPE   Widget type for entry in GUIs.
6257
6258              Cache entry values are always strings, but  CMake  GUIs  present
6259              widgets to help users set values.  The GUIs use this property as
6260              a hint to determine the widget type.  Valid TYPE values are:
6261
6262
6263                BOOL          = Boolean ON/OFF value.
6264                PATH          = Path to a directory.
6265                FILEPATH      = Path to a file.
6266                STRING        = Generic string value.
6267                INTERNAL      = Do not present in GUI at all.
6268                STATIC        = Value managed by CMake, do not change.
6269                UNINITIALIZED = Type not yet specified.
6270
6271              Generally the TYPE of a cache entry should be set by the command
6272              which creates it (set, option, find_library, etc.).
6273
6274
6275       VALUE  Value of a cache entry.
6276
6277              This  property  maps to the actual value of a cache entry.  Set‐
6278              ting this property always sets the value  without  checking,  so
6279              use with care.
6280
6281

COMPATIBILITY COMMANDS

6283         CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
6284
6285
6286       This  is the documentation for now obsolete listfile commands from pre‐
6287       vious CMake versions, which are still supported for compatibility  rea‐
6288       sons.  You  should  instead  use the newer, faster and shinier new com‐
6289       mands. ;-)
6290
6291
6292       build_name
6293              Deprecated.   Use  ${CMAKE_SYSTEM}   and   ${CMAKE_CXX_COMPILER}
6294              instead.
6295
6296                build_name(variable)
6297
6298              Sets  the  specified variable to a string representing the plat‐
6299              form and compiler settings.   These  values  are  now  available
6300              through the CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.
6301
6302
6303       exec_program
6304              Deprecated.  Use the execute_process() command instead.
6305
6306              Run  an  executable  program during the processing of the CMake‐
6307              List.txt file.
6308
6309
6310                exec_program(Executable [directory in which to run]
6311                             [ARGS <arguments to executable>]
6312                             [OUTPUT_VARIABLE <var>]
6313                             [RETURN_VALUE <var>])
6314
6315              The executable is run in  the  optionally  specified  directory.
6316              The executable can include arguments if it is double quoted, but
6317              it is better to use the optional ARGS argument to specify  argu‐
6318              ments  to the program.   This is because cmake will then be able
6319              to escape spaces in the executable path.  An  optional  argument
6320              OUTPUT_VARIABLE  specifies a variable in which to store the out‐
6321              put. To capture the return value of  the  execution,  provide  a
6322              RETURN_VALUE.  If  OUTPUT_VARIABLE  is specified, then no output
6323              will go to the stdout/stderr of the console running cmake.
6324
6325
6326
6327       export_library_dependencies
6328              Deprecated.  Use INSTALL(EXPORT) or EXPORT command.
6329
6330              This command generates an old-style library  dependencies  file.
6331              Projects  requiring  CMake  2.6 or later should not use the com‐
6332              mand.  Use instead the install(EXPORT) command  to  help  export
6333              targets  from  an  installation tree and the export() command to
6334              export targets from a build tree.
6335
6336
6337              The old-style library  dependencies  file  does  not  take  into
6338              account  per-configuration names of libraries or the LINK_INTER‐
6339              FACE_LIBRARIES target property.
6340
6341
6342                export_library_dependencies(<file> [APPEND])
6343
6344              Create a file named <file> that can be  included  into  a  CMake
6345              listfile with the INCLUDE command.  The file will contain a num‐
6346              ber of SET commands that will set all the variables  needed  for
6347              library dependency information.  This should be the last command
6348              in the top level CMakeLists.txt file of  the  project.   If  the
6349              APPEND option is specified, the SET commands will be appended to
6350              the given file instead of replacing it.
6351
6352
6353       install_files
6354              Deprecated.  Use the install(FILES ) command instead.
6355
6356              This command has been superceded by the install command.  It  is
6357              provided  for  compatibility  with  older CMake code.  The FILES
6358              form is directly replaced by the FILES form of the install  com‐
6359              mand.   The  regexp form can be expressed more clearly using the
6360              GLOB form of the file command.
6361
6362
6363                install_files(<dir> extension file file ...)
6364
6365              Create rules to install the listed files with the  given  exten‐
6366              sion  into the given directory.  Only files existing in the cur‐
6367              rent source tree or its corresponding  location  in  the  binary
6368              tree  may  be listed.  If a file specified already has an exten‐
6369              sion, that extension will be removed first.  This is useful  for
6370              providing  lists  of  source files such as foo.cxx when you want
6371              the corresponding foo.h to be installed. A typical extension  is
6372              '.h'.
6373
6374
6375                install_files(<dir> regexp)
6376
6377              Any files in the current source directory that match the regular
6378              expression will be installed.
6379
6380
6381                install_files(<dir> FILES file file ...)
6382
6383              Any files listed after  the  FILES  keyword  will  be  installed
6384              explicitly from the names given.  Full paths are allowed in this
6385              form.
6386
6387
6388              The directory <dir> is  relative  to  the  installation  prefix,
6389              which is stored in the variable CMAKE_INSTALL_PREFIX.
6390
6391
6392       install_programs
6393              Deprecated. Use the install(PROGRAMS ) command instead.
6394
6395              This  command has been superceded by the install command.  It is
6396              provided for compatibility with older  CMake  code.   The  FILES
6397              form  is  directly  replaced by the PROGRAMS form of the INSTALL
6398              command.  The regexp form can be expressed  more  clearly  using
6399              the GLOB form of the FILE command.
6400
6401
6402                install_programs(<dir> file1 file2 [file3 ...])
6403                install_programs(<dir> FILES file1 [file2 ...])
6404
6405              Create  rules  to  install  the  listed  programs into the given
6406              directory. Use the FILES argument to  guarantee  that  the  file
6407              list version of the command will be used even when there is only
6408              one argument.
6409
6410
6411                install_programs(<dir> regexp)
6412
6413              In the second form any program in the current  source  directory
6414              that matches the regular expression will be installed.
6415
6416
6417              This  command is intended to install programs that are not built
6418              by cmake, such as shell scripts.  See the TARGETS  form  of  the
6419              INSTALL  command  to create installation rules for targets built
6420              by cmake.
6421
6422
6423              The directory <dir> is  relative  to  the  installation  prefix,
6424              which is stored in the variable CMAKE_INSTALL_PREFIX.
6425
6426
6427       install_targets
6428              Deprecated. Use the install(TARGETS )  command instead.
6429
6430              This  command has been superceded by the install command.  It is
6431              provided for compatibility with older CMake code.
6432
6433
6434                install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
6435
6436              Create rules to install the listed targets into the given direc‐
6437              tory.   The directory <dir> is relative to the installation pre‐
6438              fix, which is stored in the  variable  CMAKE_INSTALL_PREFIX.  If
6439              RUNTIME_DIRECTORY  is  specified,  then  on systems with special
6440              runtime files (Windows DLL), the files will be  copied  to  that
6441              directory.
6442
6443
6444       link_libraries
6445              Deprecated. Use the target_link_libraries() command instead.
6446
6447              Link libraries to all targets added later.
6448
6449
6450                link_libraries(library1 <debug | optimized> library2 ...)
6451
6452              Specify a list of libraries to be linked into any following tar‐
6453              gets (typically added with  the  add_executable  or  add_library
6454              calls).  This command is passed down to all subdirectories.  The
6455              debug and optimized strings may be used  to  indicate  that  the
6456              next library listed is to be used only for that specific type of
6457              build.
6458
6459
6460       make_directory
6461              Deprecated. Use the file(MAKE_DIRECTORY ) command instead.
6462
6463                make_directory(directory)
6464
6465              Creates the specified directory.  Full paths  should  be  given.
6466              Any  parent  directories that do not exist will also be created.
6467              Use with care.
6468
6469
6470       remove Deprecated. Use the list(REMOVE_ITEM ) command instead.
6471
6472                remove(VAR VALUE VALUE ...)
6473
6474              Removes VALUE from the variable VAR.  This is typically used  to
6475              remove  entries  from  a vector (e.g. semicolon separated list).
6476              VALUE is expanded.
6477
6478
6479       subdir_depends
6480              Deprecated.  Does nothing.
6481
6482                subdir_depends(subdir dep1 dep2 ...)
6483
6484              Does not do anything.  This command used to help projects  order
6485              parallel builds correctly.  This functionality is now automatic.
6486
6487
6488       subdirs
6489              Deprecated. Use the add_subdirectory() command instead.
6490
6491              Add a list of subdirectories to the build.
6492
6493
6494                subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
6495                        [PREORDER] )
6496
6497              Add  a list of subdirectories to the build. The add_subdirectory
6498              command should be used instead of subdirs although subdirs  will
6499              still  work. This will cause any CMakeLists.txt files in the sub
6500              directories to be processed by CMake.  Any directories after the
6501              PREORDER  flag  are traversed first by makefile builds, the PRE‐
6502              ORDER flag has no effect on IDE projects.  Any directories after
6503              the  EXCLUDE_FROM_ALL  marker  will  not  be included in the top
6504              level makefile or project file. This is useful for having  CMake
6505              create makefiles or projects for a set of examples in a project.
6506              You would want CMake to generate makefiles or project files  for
6507              all  the  examples at the same time, but you would not want them
6508              to show up in the top level project or be built each  time  make
6509              is run from the top.
6510
6511
6512       use_mangled_mesa
6513              Copy mesa headers for use in combination with system GL.
6514
6515                use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)
6516
6517              The path to mesa includes, should contain gl_mangle.h.  The mesa
6518              headers are copied to  the  specified  output  directory.   This
6519              allows  mangled  mesa  headers  to  override other GL headers by
6520              being added to the include directory path earlier.
6521
6522
6523       utility_source
6524              Specify the source tree of a third-party utility.
6525
6526                utility_source(cache_entry executable_name
6527                               path_to_source [file1 file2 ...])
6528
6529              When a third-party utility's source is included in the distribu‐
6530              tion,  this  command specifies its location and name.  The cache
6531              entry will not be set unless the path_to_source and  all  listed
6532              files  exist.  It is assumed that the source tree of the utility
6533              will have been built before it is needed.
6534
6535
6536              When cross compiling CMake will  print  a  warning  if  a  util‐
6537              ity_source()  command  is  executed, because in many cases it is
6538              used to build an executable which is  executed  later  on.  This
6539              doesn't  work when cross compiling, since the executable can run
6540              only on their target platform. So in this case the  cache  entry
6541              has  to be adjusted manually so it points to an executable which
6542              is runnable on the build host.
6543
6544
6545       variable_requires
6546              Deprecated. Use the if() command instead.
6547
6548              Assert satisfaction of an option's required variables.
6549
6550
6551                variable_requires(TEST_VARIABLE RESULT_VARIABLE
6552                                  REQUIRED_VARIABLE1
6553                                  REQUIRED_VARIABLE2 ...)
6554
6555              The first argument (TEST_VARIABLE) is the name of  the  variable
6556              to be tested, if that variable is false nothing else is done. If
6557              TEST_VARIABLE is true, then the next argument  (RESULT_VARIABLE)
6558              is  a variable that is set to true if all the required variables
6559              are set. The rest of the arguments are variables  that  must  be
6560              true  or  not set to NOTFOUND to avoid an error.  If any are not
6561              true, an error is reported.
6562
6563
6564       write_file
6565              Deprecated. Use the file(WRITE ) command instead.
6566
6567                write_file(filename "message to write"... [APPEND])
6568
6569              The first argument is the file name, the rest of  the  arguments
6570              are messages to write. If the argument APPEND is specified, then
6571              the message will be appended.
6572
6573
6574              NOTE 1: file(WRITE ... and file(APPEND ... do exactly  the  same
6575              as this one but add some more functionality.
6576
6577
6578              NOTE  2:  When using write_file the produced file cannot be used
6579              as an input to CMake (CONFIGURE_FILE, source file  ...)  because
6580              it will lead to an infinite loop. Use configure_file if you want
6581              to generate input files to CMake.
6582
6583

MODULES

6585       The following modules are provided with CMake. They can  be  used  with
6586       INCLUDE(ModuleName).
6587
6588
6589         CMake Modules - Modules coming with CMake, the Cross-Platform Makefile Generator.
6590
6591
6592       This  is  the  documentation  for  the  modules and scripts coming with
6593       CMake. Using these modules  you  can  check  the  computer  system  for
6594       installed software packages, features of the compiler and the existance
6595       of headers to name just a few.
6596
6597
6598       AddFileDependencies
6599              ADD_FILE_DEPENDENCIES(source_file depend_files...)
6600
6601              Adds the given files as dependencies to source_file
6602
6603
6604
6605       BundleUtilities
6606              Functions to help assemble a standalone bundle application.
6607
6608              A collection of CMake utility functions useful for dealing  with
6609              .app bundles on the Mac and bundle-like directories on any OS.
6610
6611
6612              The following functions are provided by this module:
6613
6614
6615                 fixup_bundle
6616                 copy_and_fixup_bundle
6617                 verify_app
6618                 get_bundle_main_executable
6619                 get_dotapp_dir
6620                 get_bundle_and_executable
6621                 get_bundle_all_executables
6622                 get_item_key
6623                 clear_bundle_keys
6624                 set_bundle_key_values
6625                 get_bundle_keys
6626                 copy_resolved_item_into_bundle
6627                 copy_resolved_framework_into_bundle
6628                 fixup_bundle_item
6629                 verify_bundle_prerequisites
6630                 verify_bundle_symlinks
6631
6632              Requires  CMake  2.6  or greater because it uses function, break
6633              and PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
6634
6635
6636                FIXUP_BUNDLE(<app> <libs> <dirs>)
6637
6638              Fix up a bundle in-place and make it standalone,  such  that  it
6639              can  be  drag-n-drop  copied  to another machine and run on that
6640              machine as long as all of the system libraries are compatible.
6641
6642
6643              If you pass plugins to fixup_bundle as the libs  parameter,  you
6644              should  install them or copy them into the bundle before calling
6645              fixup_bundle. The "libs" parameter is a list of  libraries  that
6646              must  be fixed up, but that cannot be determined by otool output
6647              analysis. (i.e., plugins)
6648
6649
6650              Gather all the keys for all the executables and libraries  in  a
6651              bundle,  and then, for each key, copy each prerequisite into the
6652              bundle. Then fix each one up according to its own list  of  pre‐
6653              requisites.
6654
6655
6656              Then  clear all the keys and call verify_app on the final bundle
6657              to ensure that it is truly standalone.
6658
6659
6660                COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
6661
6662              Makes a copy of the bundle <src>  at  location  <dst>  and  then
6663              fixes up the new copied bundle in-place at <dst>...
6664
6665
6666                VERIFY_APP(<app>)
6667
6668              Verifies  that  an application <app> appears valid based on run‐
6669              ning analysis tools on it. Calls  "message(FATAL_ERROR"  if  the
6670              application is not verified.
6671
6672
6673                GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
6674
6675              The  result will be the full path name of the bundle's main exe‐
6676              cutable file or an "error:" prefixed string if it could  not  be
6677              determined.
6678
6679
6680                GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
6681
6682              Returns the nearest parent dir whose name ends with ".app" given
6683              the full path to an executable. If there is no such parent  dir,
6684              then  return  a  dir  at the same level as the executable, named
6685              with the executable's base name and ending with ".app"
6686
6687
6688              The returned directory may or may not exist.
6689
6690
6691                GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
6692
6693              Takes either a ".app" directory name or  the  name  of  an  exe‐
6694              cutable nested inside a ".app" directory and returns the path to
6695              the ".app" directory in <bundle_var> and the path  to  its  main
6696              executable in <executable_var>
6697
6698
6699                GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
6700
6701              Scans  the given bundle recursively for all executable files and
6702              accumulates them into a variable.
6703
6704
6705                GET_ITEM_KEY(<item> <key_var>)
6706
6707              Given a file (item) name, generate a key that should  be  unique
6708              considering  the set of libraries that need copying or fixing up
6709              to make a bundle standalone. This is essentially the  file  name
6710              including extension with "." replaced by "_"
6711
6712
6713              This  key is used as a prefix for CMake variables so that we can
6714              associate a set of variables with a given item based on its key.
6715
6716
6717                CLEAR_BUNDLE_KEYS(<keys_var>)
6718
6719              Loop over the list of keys, clearing all the  variables  associ‐
6720              ated  with  each  key.  After  the  loop, clear the list of keys
6721              itself.
6722
6723
6724              Caller of get_bundle_keys  should  call  clear_bundle_keys  when
6725              done with list of keys.
6726
6727
6728                SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
6729                                      <copyflag>)
6730
6731              Add  a  key  to  the  list (if necessary) for the given item. If
6732              added, also set all the variables associated with that key.
6733
6734
6735                GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
6736
6737              Loop over all the executable and library files within the bundle
6738              (and given as extra <libs>) and accumulate a list of keys repre‐
6739              senting them. Set values associated with each key such  that  we
6740              can  loop  over  all of them and copy prerequisite libs into the
6741              bundle and then do appropriate install_name_tool fixups.
6742
6743
6744                COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
6745
6746              Copy a resolved item into the bundle if necessary. Copy  is  not
6747              necessary   if   the   resolved_item   is   "the  same  as"  the
6748              resolved_embedded_item.
6749
6750
6751                COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
6752
6753              Copy a resolved framework into the bundle if necessary. Copy  is
6754              not  necessary  if  the  resolved_item  is  "the  same  as"  the
6755              resolved_embedded_item.
6756
6757
6758              By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set.  If  you
6759              want   full   frameworks   embedded   in   your   bundles,   set
6760              BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling  fixup_bun‐
6761              dle.  By default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the
6762              framework dylib itself plus the framework Resources directory.
6763
6764
6765                FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
6766
6767              Get the direct/non-system prerequisites of the resolved embedded
6768              item.  For each prerequisite, change the way it is referenced to
6769              the value of the _EMBEDDED_ITEM keyed variable for that  prereq‐
6770              uisite.  (Most  likely  changing  to an "@executable_path" style
6771              reference.)
6772
6773
6774              This  function  requires  that  the  resolved_embedded_item   be
6775              "inside" the bundle already. In other words, if you pass plugins
6776              to fixup_bundle as the libs parameter, you should  install  them
6777              or  copy  them  into the bundle before calling fixup_bundle. The
6778              "libs" parameter is a list of libraries that must be  fixed  up,
6779              but  that  cannot be determined by otool output analysis. (i.e.,
6780              plugins)
6781
6782
6783              Also, change the id of the  item  being  fixed  up  to  its  own
6784              _EMBEDDED_ITEM value.
6785
6786
6787              Accumulate  changes  in  a local variable and make *one* call to
6788              install_name_tool at the  end  of  the  function  with  all  the
6789              changes at once.
6790
6791
6792              If  the  BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items
6793              will be marked writable before install_name_tool tries to change
6794              them.
6795
6796
6797                VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
6798
6799              Verifies  that  the sum of all prerequisites of all files inside
6800              the bundle are contained  within  the  bundle  or  are  "system"
6801              libraries, presumed to exist everywhere.
6802
6803
6804                VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
6805
6806              Verifies  that  any  symlinks found in the bundle point to other
6807              files that are already  also  in  the  bundle...  Anything  that
6808              points to an external file causes this function to fail the ver‐
6809              ification.
6810
6811
6812       CMakeBackwardCompatibilityCXX
6813              define a bunch of backwards compatibility variables
6814
6815                CMAKE_ANSI_CXXFLAGS - flag for ansi c++
6816                CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
6817                INCLUDE(TestForANSIStreamHeaders)
6818                INCLUDE(CheckIncludeFileCXX)
6819                INCLUDE(TestForSTDNamespace)
6820                INCLUDE(TestForANSIForScope)
6821
6822
6823       CMakeDependentOption
6824              Macro to provide an option dependent on other options.
6825
6826              This macro presents an option to the user only if a set of other
6827              conditions are true.  When the option is not presented a default
6828              value is used, but any value set by the user  is  preserved  for
6829              when the option is presented again. Example invocation:
6830
6831
6832                CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
6833                                       "USE_BAR;NOT USE_ZOT" OFF)
6834
6835              If USE_BAR is true and USE_ZOT is false, this provides an option
6836              called USE_FOO that defaults to ON.  Otherwise, it sets  USE_FOO
6837              to  OFF.   If the status of USE_BAR or USE_ZOT ever changes, any
6838              value for the USE_FOO option is saved so that when the option is
6839              re-enabled it retains its old value.
6840
6841
6842       CMakeDetermineVSServicePack
6843              Includes  a  public  function  for  assisting users in trying to
6844              determine the
6845
6846              Visual Studio service pack in use.
6847
6848
6849              Sets the passed in variable to one of the following values or an
6850              empty string if unknown.
6851
6852
6853                  vc80
6854                  vc80sp1
6855                  vc90
6856                  vc90sp1
6857
6858
6859
6860
6861              Usage: ===========================
6862
6863
6864                  if(MSVC)
6865                     include(CMakeDetermineVSServicePack)
6866                     DetermineVSServicePack( my_service_pack )
6867
6868
6869
6870
6871                     if( my_service_pack )
6872                         message(STATUS "Detected: ${my_service_pack}")
6873                     endif()
6874                  endif()
6875
6876
6877
6878
6879              ===========================
6880
6881
6882       CMakeFindFrameworks
6883              helper module to find OSX frameworks
6884
6885
6886       CMakeForceCompiler
6887
6888
6889              This  module  defines macros intended for use by cross-compiling
6890              toolchain files when CMake is not able to  automatically  detect
6891              the compiler identification.
6892
6893
6894              Macro CMAKE_FORCE_C_COMPILER has the following signature:
6895
6896
6897                 CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
6898
6899              It  sets  CMAKE_C_COMPILER  to  the given compiler and the cmake
6900              internal variable CMAKE_C_COMPILER_ID to the given  compiler-id.
6901              It  also  bypasses the check for working compiler and basic com‐
6902              piler information tests.
6903
6904
6905              Macro CMAKE_FORCE_CXX_COMPILER has the following signature:
6906
6907
6908                 CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)
6909
6910              It sets CMAKE_CXX_COMPILER to the given compiler and  the  cmake
6911              internal   variable  CMAKE_CXX_COMPILER_ID  to  the  given  com‐
6912              piler-id. It also bypasses the check for  working  compiler  and
6913              basic compiler information tests.
6914
6915
6916              Macro CMAKE_FORCE_Fortran_COMPILER has the following signature:
6917
6918
6919                 CMAKE_FORCE_Fortran_COMPILER(<compiler> <compiler-id>)
6920
6921              It  sets  CMAKE_Fortran_COMPILER  to  the given compiler and the
6922              cmake internal variable CMAKE_Fortran_COMPILER_ID to  the  given
6923              compiler-id. It also bypasses the check for working compiler and
6924              basic compiler information tests.
6925
6926
6927              So a simple toolchain file could look like this:
6928
6929
6930                 INCLUDE (CMakeForceCompiler)
6931                 SET(CMAKE_SYSTEM_NAME Generic)
6932                 CMAKE_FORCE_C_COMPILER   (chc12 MetrowerksHicross)
6933                 CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
6934
6935
6936       CMakeParseArguments
6937
6938
6939              CMAKE_PARSE_ARGUMENTS(<prefix>  <options>   <one_value_keywords>
6940              <multi_value_keywords> args...)
6941
6942
6943              CMAKE_PARSE_ARGUMENTS()  is  intended  to  be  used in macros or
6944              functions for parsing the arguments given to that macro or func‐
6945              tion.  It processes the arguments and defines a set of variables
6946              which hold the values of the respective options.
6947
6948
6949              The <options> argument contains all options for  the  respective
6950              macro,  i.e.  keywords  which can be used when calling the macro
6951              without any value following, like e.g. the OPTIONAL  keyword  of
6952              the install() command.
6953
6954
6955              The <one_value_keywords> argument contains all keywords for this
6956              macro which are followed by one  value,  like  e.g.  DESTINATION
6957              keyword of the install() command.
6958
6959
6960              The  <multi_value_keywords>  argument  contains all keywords for
6961              this macro which can be followed by more than  one  value,  like
6962              e.g. the TARGETS or FILES keywords of the install() command.
6963
6964
6965              When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of
6966              the  keywords  listed  in  <options>,  <one_value_keywords>  and
6967              <multi_value_keywords> a variable composed of the given <prefix>
6968              followed by "_" and the name of the  respective  keyword.  These
6969              variables  will then hold the respective value from the argument
6970              list. For the <options> keywords this will be TRUE or FALSE.
6971
6972
6973              All remaining  arguments  are  collected  in  a  variable  <pre‐
6974              fix>_UNPARSED_ARGUMENTS,  this  can be checked afterwards to see
6975              whether your macro was called with unrecognized parameters.
6976
6977
6978              As an example here a my_install()  macro,  which  takes  similar
6979              arguments as the real install() command:
6980
6981
6982                 function(MY_INSTALL)
6983                   set(options OPTIONAL FAST)
6984                   set(oneValueArgs DESTINATION RENAME)
6985                   set(multiValueArgs TARGETS CONFIGURATIONS)
6986                   cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
6987                   ...
6988
6989
6990
6991
6992              Assume my_install() has been called like this:
6993
6994
6995                 my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
6996
6997
6998
6999
7000              After  the  cmake_parse_arguments() call the macro will have set
7001              the following variables:
7002
7003
7004                 MY_INSTALL_OPTIONAL = TRUE
7005                 MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
7006                 MY_INSTALL_DESTINATION = "bin"
7007                 MY_INSTALL_RENAME = "" (was not used)
7008                 MY_INSTALL_TARGETS = "foo;bar"
7009                 MY_INSTALL_CONFIGURATIONS = "" (was not used)
7010                 MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
7011
7012
7013
7014
7015              You can the continue and process these variables.
7016
7017
7018              Keywords terminate lists of values, e.g.  if  directly  after  a
7019              one_value_keyword  another  recognized  keyword follows, this is
7020              interpreted  as  the  beginning  of   the   new   option.   E.g.
7021              my_install(TARGETS  foo  DESTINATION  OPTIONAL)  would result in
7022              MY_INSTALL_DESTINATION set to "OPTIONAL", but  MY_INSTALL_DESTI‐
7023              NATION  would  be  empty and MY_INSTALL_OPTIONAL would be set to
7024              TRUE therefor.
7025
7026
7027       CMakePrintSystemInformation
7028              print system information
7029
7030              This file can be used for diagnostic purposes just include it in
7031              a project to see various internal CMake variables.
7032
7033
7034       CMakeVerifyManifest
7035
7036
7037              CMakeVerifyManifest.cmake
7038
7039
7040              This script is used to verify that embeded manifests and side by
7041              side manifests for a project match.  To run this script, cd to a
7042              directory  and run the script with cmake -P. On the command line
7043              you can pass in versions that are OK even if not  found  in  the
7044              .manifest    files.    For    example,     cmake    -Dallow_ver‐
7045              sions=8.0.50608.0 -PCmakeVerifyManifest.cmake could be  used  to
7046              allow an embeded manifest of 8.0.50608.0 to be used in a project
7047              even if that version was not found in the .manifest file.
7048
7049
7050       CPack  foreach generator, it then
7051
7052
7053
7054
7055              The CPack module generates binary and  source  installers  in  a
7056              variety  of  formats  using  the cpack program. Inclusion of the
7057              CPack module adds two new targets to  the  resulting  makefiles,
7058              package  and  package_source,  which build the binary and source
7059              installers, respectively. The generated binary  installers  con‐
7060              tain  everything  installed via CMake's INSTALL command (and the
7061              deprecated INSTALL_FILES, INSTALL_PROGRAMS, and  INSTALL_TARGETS
7062              commands).
7063
7064
7065              For  certain kinds of binary installers (including the graphical
7066              installers on Mac OS X and Windows), CPack generates  installers
7067              that  allow users to select individual application components to
7068              install. The contents of each of the components  are  identified
7069              by the COMPONENT argument of CMake's INSTALL command. These com‐
7070              ponents can be annotated with user-friendly names  and  descrip‐
7071              tions,  inter-component dependencies, etc., and grouped in vari‐
7072              ous  ways  to  customize  the  resulting  installer.   See   the
7073              cpack_add_*  commands,  described  below,  for  more information
7074              about component-specific installations.
7075
7076
7077              The CPACK_GENERATOR variable has different meanings in different
7078              contexts.  In  your  CMakeLists.txt  file,  CPACK_GENERATOR is a
7079              *list of generators*: when run with no  other  arguments,  CPack
7080              will  iterate  over  that  list and produce one package for each
7081              generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERA‐
7082              TOR  is  a  *string  naming  a  single  generator*.  If you need
7083              per-cpack- generator logic to control  *other*  cpack  settings,
7084              then you need a CPACK_PROJECT_CONFIG_FILE.
7085
7086
7087              The  CMake  source  tree  itself  contains  a CPACK_PROJECT_CON‐
7088              FIG_FILE. See the top level file CMakeCPackOptions.cmake.in  for
7089              an example.
7090
7091
7092              If  set, the CPACK_PROJECT_CONFIG_FILE is included automatically
7093              on a per-generator basis. It only need contain overrides.
7094
7095
7096              Here's how it works:
7097
7098
7099                   CPACK_GENERATOR list variable (unless told to use just a
7100                   specific one via -G on the command line...)
7101
7102
7103
7104
7105                 - sets CPACK_GENERATOR to the one currently being iterated
7106                 - includes the CPACK_PROJECT_CONFIG_FILE
7107                 - produces the package for that generator
7108
7109
7110
7111
7112              This is the key: For each generator listed in CPACK_GENERATOR in
7113              CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR internally
7114              to  *the  one  currently  being  used*  and  then  include   the
7115              CPACK_PROJECT_CONFIG_FILE.
7116
7117
7118              Before  including this CPack module in your CMakeLists.txt file,
7119              there are a variety of variables that can be  set  to  customize
7120              the resulting installers. The most commonly-used variables are:
7121
7122
7123                 CPACK_PACKAGE_NAME - The name of the package (or application). If
7124                 not specified, defaults to the project name.
7125
7126
7127
7128
7129                 CPACK_PACKAGE_VENDOR - The name of the package vendor (e.g.,
7130                 "Kitware").
7131
7132
7133
7134
7135                 CPACK_PACKAGE_VERSION_MAJOR - Package major Version
7136
7137
7138
7139
7140                 CPACK_PACKAGE_VERSION_MINOR - Package minor Version
7141
7142
7143
7144
7145                 CPACK_PACKAGE_VERSION_PATCH - Package patch Version
7146
7147
7148
7149
7150                 CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
7151                 project. Used, for example, the introduction screen of a
7152                 CPack-generated Windows installer to describe the project.
7153
7154
7155
7156
7157                 CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
7158                 project (only a few words).
7159
7160
7161
7162
7163                 CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
7164                 not including the extension. For example, cmake-2.6.1-Linux-i686.
7165
7166
7167
7168
7169                 CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
7170                 target system, e.g., "CMake 2.5".
7171
7172
7173
7174
7175                 CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
7176                 generator after setting CPACK_GENERATOR to the actual generator
7177                 being used. Allows per-generator setting of CPACK_* variables at
7178                 cpack time.
7179
7180
7181
7182
7183                 CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
7184                 will typically be displayed to the user (often with an explicit
7185                 "Accept" button, for graphical installers) prior to installation.
7186
7187
7188
7189
7190                 CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
7191                 typically describes in some detail
7192
7193
7194
7195
7196                 CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
7197                 welcomes users to this installer. Typically used in the graphical
7198                 installers on Windows and Mac OS X.
7199
7200
7201
7202
7203                 CPACK_MONOLITHIC_INSTALL - Disables the component-based
7204                 installation mechanism, so that all components are always installed.
7205
7206
7207
7208
7209                 CPACK_GENERATOR - List of CPack generators to use. If not
7210                 specified, CPack will create a set of options (e.g.,
7211                 CPACK_BINARY_NSIS) allowing the user to enable/disable individual
7212                 generators.
7213
7214
7215
7216
7217                 CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
7218                 for binary installers that will be generated by the CPack
7219                 module. Defaults to CPackConfig.cmake.
7220
7221
7222
7223
7224                 CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
7225                 with a text label, to be used to create Start Menu shortcuts on
7226                 Windows. For example, setting this to the list ccmake;CMake will
7227                 create a shortcut named "CMake" that will execute the installed
7228                 executable ccmake.
7229
7230
7231
7232
7233                 CPACK_STRIP_FILES - List of files to be stripped. Starting with
7234                 CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
7235                 enables stripping of all files (a list of files evaluates to TRUE
7236                 in CMake, so this change is compatible).
7237
7238
7239
7240
7241              The  following  CPack variables are specific to source packages,
7242              and  will not affect binary packages:
7243
7244
7245                 CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
7246                 e.g., cmake-2.6.1
7247
7248
7249
7250
7251                 CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
7252                 will be stripped. Starting with CMake 2.6.0
7253                 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
7254                 stripping of all files (a list of files evaluates to TRUE in CMake,
7255                 so this change is compatible).
7256
7257
7258
7259
7260                 CPACK_SOURCE_GENERATOR - List of generators used for the source
7261                 packages. As with CPACK_GENERATOR, if this is not specified then
7262                 CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
7263                 allowing users to select which packages will be generated.
7264
7265
7266
7267
7268                 CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
7269                 configuration file for source installers that will be generated by
7270                 the CPack module. Defaults to CPackSourceConfig.cmake.
7271
7272
7273
7274
7275                 CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
7276                 that won't be packaged when building a source package. This is a
7277                 list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
7278
7279
7280
7281
7282              The following variables are specific to the DragNDrop installers
7283              built on Mac OS X:
7284
7285
7286                 CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
7287                 image. Defaults to CPACK_PACKAGE_FILE_NAME.
7288
7289
7290
7291
7292                 CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
7293                 (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
7294                 bzip2-compressed). Refer to hdiutil(1) for more information on
7295                 other available formats.
7296
7297
7298
7299
7300                 CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
7301                 can be used to specify the Finder window position/geometry and
7302                 layout (such as hidden toolbars, placement of the icons etc.).
7303                 This file has to be generated by the Finder (either manually or
7304                 through OSA-script) using a normal folder from which the .DS_Store
7305                 file can then be extracted.
7306
7307
7308
7309
7310                 CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
7311                 used as the background for the Finder Window when the disk image
7312                 is opened.  By default no background image is set. The background
7313                 image is applied after applying the custom .DS_Store file.
7314
7315
7316
7317
7318                 CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
7319                 operate on disk image files on Mac OS X. This variable can be used
7320                 to override the automatically detected command (or specify its
7321                 location if the auto-detection fails to find it.)
7322
7323
7324
7325
7326                 CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
7327                 extended attributes on files and directories on Mac OS X. This
7328                 variable can be used to override the automatically detected
7329                 command (or specify its location if the auto-detection fails to
7330                 find it.)
7331
7332
7333
7334
7335                 CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
7336                 resources on Mac OS X. This variable can be used to override the
7337                 automatically detected command (or specify its location if the
7338                 auto-detection fails to find it.)
7339
7340
7341
7342
7343              Installers  built on Mac OS X using the Bundle generator use the
7344              aforementioned DragNDrop  variables,  plus  the  following  Bun‐
7345              dle-specific parameters:
7346
7347
7348                 CPACK_BUNDLE_NAME - The name of the generated bundle.  This
7349                 appears in the OSX finder as the bundle name.  Required.
7350
7351
7352
7353
7354                 CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
7355                 as the Info.plist for the generated bundle.  This assumes that
7356                 the caller has generated or specified their own Info.plist file.
7357                 Required.
7358
7359
7360
7361
7362                 CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
7363                 the icon for the generated bundle.  This is the icon that appears
7364                 in the OSX finder for the bundle, and in the OSX dock when the
7365                 bundle is opened.  Required.
7366
7367
7368
7369
7370                 CPACK_BUNDLE_STARTUP_SCRIPT - Path to an executable or script that
7371                 will be run whenever an end-user double-clicks the generated bundle
7372                 in the OSX Finder.  Optional.
7373
7374
7375
7376
7377              The following variables are specific to the graphical installers
7378              built on Windows using the Nullsoft Installation System.
7379
7380
7381                 CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
7382                 installing this project.
7383
7384
7385
7386
7387                 CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
7388                 to the end user by the NSIS installer is under this root dir. The full
7389                 directory presented to the end user is:
7390                 ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
7391
7392
7393
7394
7395                 CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
7396                 install program.
7397
7398
7399
7400
7401                 CPACK_NSIS_MUI_UNIICON - The icon file (.ico) for the generated
7402                 uninstall program.
7403
7404
7405
7406
7407                 CPACK_PACKAGE_ICON - A branding image that will be displayed inside
7408                 the installer.
7409
7410
7411
7412
7413                 CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
7414                 be added to the install Section.
7415
7416
7417
7418
7419                 CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
7420                 be added to the uninstall Section.
7421
7422
7423
7424
7425                 CPACK_NSIS_COMPRESSOR - The arguments that will be passed to the
7426                 NSIS SetCompressor command.
7427
7428
7429
7430
7431                 CPACK_NSIS_MODIFY_PATH - If this is set to "ON", then an extra page
7432                 will appear in the installer that will allow the user to choose
7433                 whether the program directory should be added to the system PATH
7434                 variable.
7435
7436
7437
7438
7439                 CPACK_NSIS_DISPLAY_NAME - The display name string that appears in
7440                 the Windows Add/Remove Program control panel
7441
7442
7443
7444
7445                 CPACK_NSIS_PACKAGE_NAME - The title displayed at the top of the
7446                 installer.
7447
7448
7449
7450
7451                 CPACK_NSIS_INSTALLED_ICON_NAME - A path to the executable that
7452                 contains the installer icon.
7453
7454
7455
7456
7457                 CPACK_NSIS_HELP_LINK - URL to a web site providing assistance in
7458                 installing your application.
7459
7460
7461
7462
7463                 CPACK_NSIS_URL_INFO_ABOUT - URL to a web site providing more
7464                 information about your application.
7465
7466
7467
7468
7469                 CPACK_NSIS_CONTACT - Contact information for questions and comments
7470                 about the installation process.
7471
7472
7473
7474
7475                 CPACK_NSIS_CREATE_ICONS_EXTRA - Additional NSIS commands for
7476                 creating start menu shortcuts.
7477
7478
7479
7480
7481                 CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
7482                 uninstall start menu shortcuts.
7483
7484
7485
7486
7487                 CPACK_NSIS_EXECUTABLES_DIRECTORY - Creating NSIS start menu links
7488                 assumes that they are in 'bin' unless this variable is set.
7489                 For example, you would set this to 'exec' if your executables are
7490                 in an exec directory.
7491
7492
7493
7494
7495                 CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
7496                 to run on the finish page of the NSIS installer.
7497
7498
7499
7500
7501              The following variable is specific to installers build on Mac OS
7502              X using PackageMaker:
7503
7504
7505                 CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
7506                 resulting PackageMaker archive should be compatible
7507                 with. Different versions of Mac OS X support different
7508                 features. For example, CPack can only build component-based
7509                 installers for Mac OS X 10.4 or newer, and can only build
7510                 installers that download component son-the-fly for Mac OS X 10.5
7511                 or newer. If left blank, this value will be set to the minimum
7512                 version of Mac OS X that supports the requested features. Set this
7513                 variable to some value (e.g., 10.4) only if you want to guarantee
7514                 that your installer will work on that version of Mac OS X, and
7515                 don't mind missing extra features available in the installer
7516                 shipping with later versions of Mac OS X.
7517
7518
7519
7520
7521              The following variables are for advanced uses of CPack:
7522
7523
7524                 CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
7525                 project is CMake project. Defaults to the value of CMAKE_GENERATOR;
7526                 few users will want to change this setting.
7527
7528
7529
7530
7531                 CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
7532                 what project to install. The four values are: Build directory,
7533                 Project Name, Project Component, Directory. If omitted, CPack will
7534                 build an installer that installers everything.
7535
7536
7537
7538
7539                 CPACK_SYSTEM_NAME - System name, defaults to the value of
7540                 ${CMAKE_SYSTEM_NAME}.
7541
7542
7543
7544
7545                 CPACK_PACKAGE_VERSION - Package full version, used internally. By
7546                 default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
7547                 CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
7548
7549
7550
7551
7552                 CPACK_TOPLEVEL_TAG - Directory for the installed files.
7553
7554
7555
7556
7557                 CPACK_INSTALL_COMMANDS - Extra commands to install components.
7558
7559
7560
7561
7562                 CPACK_INSTALL_DIRECTORIES - Extra directories to install.
7563
7564
7565
7566
7567              Component-specific  installation allows users to select specific
7568              sets of  components  to  install  during  the  install  process.
7569              Installation components are identified by the COMPONENT argument
7570              of CMake's INSTALL commands, and should be further described  by
7571              the following CPack commands:
7572
7573
7574                 cpack_add_component - Describes a CPack installation component
7575                 named by the COMPONENT argument to a CMake INSTALL command.
7576
7577
7578
7579
7580                   cpack_add_component(compname
7581                                       [DISPLAY_NAME name]
7582                                       [DESCRIPTION description]
7583                                       [HIDDEN | REQUIRED | DISABLED ]
7584                                       [GROUP group]
7585                                       [DEPENDS comp1 comp2 ... ]
7586                                       [INSTALL_TYPES type1 type2 ... ]
7587                                       [DOWNLOADED]
7588                                       [ARCHIVE_FILE filename])
7589
7590
7591
7592
7593                 The cmake_add_component command describes an installation
7594                 component, which the user can opt to install or remove as part of
7595                 the graphical installation process. compname is the name of the
7596                 component, as provided to the COMPONENT argument of one or more
7597                 CMake INSTALL commands.
7598
7599
7600
7601
7602                 DISPLAY_NAME is the displayed name of the component, used in
7603                 graphical installers to display the component name. This value can
7604                 be any string.
7605
7606
7607
7608
7609                 DESCRIPTION is an extended description of the component, used in
7610                 graphical installers to give the user additional information about
7611                 the component. Descriptions can span multiple lines using "\n" as
7612                 the line separator. Typically, these descriptions should be no
7613                 more than a few lines long.
7614
7615
7616
7617
7618                 HIDDEN indicates that this component will be hidden in the
7619                 graphical installer, so that the user cannot directly change
7620                 whether it is installed or not.
7621
7622
7623
7624
7625                 REQUIRED indicates that this component is required, and therefore
7626                 will always be installed. It will be visible in the graphical
7627                 installer, but it cannot be unselected. (Typically, required
7628                 components are shown greyed out).
7629
7630
7631
7632
7633                 DISABLED indicates that this component should be disabled
7634                 (unselected) by default. The user is free to select this component
7635                 for installation, unless it is also HIDDEN.
7636
7637
7638
7639
7640                 DEPENDS lists the components on which this component depends. If
7641                 this component is selected, then each of the components listed
7642                 must also be selected. The dependency information is encoded
7643                 within the installer itself, so that users cannot install
7644                 inconsitent sets of components.
7645
7646
7647
7648
7649                 GROUP names the component group of which this component is a
7650                 part. If not provided, the component will be a standalone
7651                 component, not part of any component group. Component groups are
7652                 described with the cpack_add_component_group command, detailed
7653                 below.
7654
7655
7656
7657
7658                 INSTALL_TYPES lists the installation types of which this component
7659                 is a part. When one of these installations types is selected, this
7660                 component will automatically be selected. Installation types are
7661                 described with the cpack_add_install_type command, detailed below.
7662
7663
7664
7665
7666                 DOWNLOADED indicates that this component should be downloaded
7667                 on-the-fly by the installer, rather than packaged in with the
7668                 installer itself. For more information, see the cpack_configure_downloads
7669                 command.
7670
7671
7672
7673
7674                 ARCHIVE_FILE provides a name for the archive file created by CPack
7675                 to be used for downloaded components. If not supplied, CPack will
7676                 create a file with some name based on CPACK_PACKAGE_FILE_NAME and
7677                 the name of the component. See cpack_configure_downloads for more
7678                 information.
7679
7680
7681
7682
7683                 cpack_add_component_group - Describes a group of related CPack
7684                 installation components.
7685
7686
7687
7688
7689                   cpack_add_component_group(groupname
7690                                            [DISPLAY_NAME name]
7691                                            [DESCRIPTION description]
7692                                            [PARENT_GROUP parent]
7693                                            [EXPANDED]
7694                                            [BOLD_TITLE])
7695
7696
7697
7698
7699                 The cpack_add_component_group describes a group of installation
7700                 components, which will be placed together within the listing of
7701                 options. Typically, component groups allow the user to
7702                 select/deselect all of the components within a single group via a
7703                 single group-level option. Use component groups to reduce the
7704                 complexity of installers with many options. groupname is an
7705                 arbitrary name used to identify the group in the GROUP argument of
7706                 the cpack_add_component command, which is used to place a
7707                 component in a group. The name of the group must not conflict with
7708                 the name of any component.
7709
7710
7711
7712
7713                 DISPLAY_NAME is the displayed name of the component group, used in
7714                 graphical installers to display the component group name. This
7715                 value can be any string.
7716
7717
7718
7719
7720                 DESCRIPTION is an extended description of the component group,
7721                 used in graphical installers to give the user additional
7722                 information about the components within that group. Descriptions
7723                 can span multiple lines using "\n" as the line
7724                 separator. Typically, these descriptions should be no more than a
7725                 few lines long.
7726
7727
7728
7729
7730                 PARENT_GROUP, if supplied, names the parent group of this group.
7731                 Parent groups are used to establish a hierarchy of groups,
7732                 providing an arbitrary hierarchy of groups.
7733
7734
7735
7736
7737                 EXPANDED indicates that, by default, the group should show up as
7738                 "expanded", so that the user immediately sees all of the
7739                 components within the group. Otherwise, the group will initially
7740                 show up as a single entry.
7741
7742
7743
7744
7745                 BOLD_TITLE indicates that the group title should appear in bold,
7746                 to call the user's attention to the group.
7747
7748
7749
7750
7751                 cpack_add_install_type - Add a new installation type containing a
7752                 set of predefined component selections to the graphical installer.
7753
7754                   cpack_add_install_type(typename
7755                                          [DISPLAY_NAME name])
7756
7757
7758
7759
7760                 The cpack_add_install_type command identifies a set of preselected
7761                 components that represents a common use case for an
7762                 application. For example, a "Developer" install type might include
7763                 an application along with its header and library files, while an
7764                 "End user" install type might just include the application's
7765                 executable. Each component identifies itself with one or more
7766                 install types via the INSTALL_TYPES argument to
7767                 cpack_add_component.
7768
7769
7770
7771
7772                 DISPLAY_NAME is the displayed name of the install type, which will
7773                 typically show up in a drop-down box within a graphical
7774                 installer. This value can be any string.
7775
7776
7777
7778
7779                 cpack_configure_downloads - Configure CPack to download selected
7780                 components on-the-fly as part of the installation process.
7781
7782
7783
7784
7785                   cpack_configure_downloads(site
7786                                             [UPLOAD_DIRECTORY dirname]
7787                                             [ALL]
7788                                             [ADD_REMOVE|NO_ADD_REMOVE])
7789
7790
7791
7792
7793                 The cpack_configure_downloads command configures installation-time
7794                 downloads of selected components. For each downloadable component,
7795                 CPack will create an archive containing the contents of that
7796                 component, which should be uploaded to the given site. When the
7797                 user selects that component for installation, the installer will
7798                 download and extract the component in place. This feature is
7799                 useful for creating small installers that only download the
7800                 requested components, saving bandwidth. Additionally, the
7801                 installers are small enough that they will be installed as part of
7802                 the normal installation process, and the "Change" button in
7803                 Windows Add/Remove Programs control panel will allow one to add or
7804                 remove parts of the application after the original
7805                 installation. On Windows, the downloaded-components functionality
7806                 requires the ZipDLL plug-in for NSIS, available at:
7807
7808
7809
7810
7811                   http://nsis.sourceforge.net/ZipDLL_plug-in
7812
7813
7814
7815
7816                 On Mac OS X, installers that download components on-the-fly can
7817                 only be built and installed on system using Mac OS X 10.5 or
7818                 later.
7819
7820
7821
7822
7823                 The site argument is a URL where the archives for downloadable
7824                 components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
7825                 All of the archives produced by CPack should be uploaded to that location.
7826
7827
7828
7829
7830                 UPLOAD_DIRECTORY is the local directory where CPack will create the
7831                 various archives for each of the components. The contents of this
7832                 directory should be uploaded to a location accessible by the URL given
7833                 in the site argument. If omitted, CPack will use the directory
7834                 CPackUploads inside the CMake binary directory to store the generated
7835                 archives.
7836
7837
7838
7839
7840                 The ALL flag indicates that all components be downloaded. Otherwise, only
7841                 those components explicitly marked as DOWNLOADED or that have a specified
7842                 ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
7843                 ADD_REMOVE (unless NO_ADD_REMOVE is specified).
7844
7845
7846
7847
7848                 ADD_REMOVE indicates that CPack should install a copy of the installer
7849                 that can be called from Windows' Add/Remove Programs dialog (via the
7850                 "Modify" button) to change the set of installed components. NO_ADD_REMOVE
7851                 turns off this behavior. This option is ignored on Mac OS X.
7852
7853
7854       CPackDeb
7855              The builtin (binary) CPack Deb generator (Unix only)
7856
7857              CPackDeb may be used to create Deb package using CPack. CPackDeb
7858              is a CPack generator thus it uses the CPACK_XXX  variables  used
7859              by  CPack  : http://www.cmake.org/Wiki/CMake:CPackConfiguration.
7860              CPackDeb generator should work on any linux  host  but  it  will
7861              produce better deb package when Debian specific tools 'dpkg-xxx'
7862              are usable on the build system.
7863
7864
7865              CPackDeb has specific  features  which  are  controlled  by  the
7866              specifics  CPACK_DEBIAN_XXX  variables.You'll  find  a  detailed
7867              usage on the wiki:
7868
7869
7870                http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
7871
7872              However as a handy reminder here  comes  the  list  of  specific
7873              variables:
7874
7875
7876              CPACK_DEBIAN_PACKAGE_NAME
7877
7878
7879                   Mandatory : YES
7880                   Default   : CPACK_PACKAGE_NAME (lower case)
7881                   The debian package summary
7882
7883              CPACK_DEBIAN_PACKAGE_VERSION
7884
7885
7886                   Mandatory : YES
7887                   Default   : CPACK_PACKAGE_VERSION
7888                   The debian package version
7889
7890              CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
7891
7892
7893                   Mandatory : YES
7894                   Default   : Output of dpkg --print-architecture (or i386 if dpkg is not found)
7895                   The debian package architecture
7896
7897              CPACK_DEBIAN_PACKAGE_DEPENDS
7898
7899
7900                   Mandatory : NO
7901                   Default   : -
7902                   May be used to set deb dependencies.
7903
7904              CPACK_DEBIAN_PACKAGE_MAINTAINER
7905
7906
7907                   Mandatory : YES
7908                   Default   : CPACK_PACKAGE_CONTACT
7909                   The debian package maintainer
7910
7911              CPACK_DEBIAN_PACKAGE_DESCRIPTION
7912
7913
7914                   Mandatory : YES
7915                   Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
7916                   The debian package description
7917
7918              CPACK_DEBIAN_PACKAGE_SECTION
7919
7920
7921                   Mandatory : YES
7922                   Default   : 'devel'
7923                   The debian package section
7924
7925              CPACK_DEBIAN_PACKAGE_PRIORITY
7926
7927
7928                   Mandatory : YES
7929                   Default   : 'optional'
7930                   The debian package priority
7931
7932              CPACK_DEBIAN_PACKAGE_HOMEPAGE
7933
7934
7935                   Mandatory : NO
7936                   Default   : -
7937                   The URL of the web site for this package
7938
7939              CPACK_DEBIAN_PACKAGE_SHLIBDEPS
7940
7941
7942                   Mandatory : NO
7943                   Default   : OFF
7944                   May be set to ON in order to use dpkg-shlibdeps to generate
7945                   better package dependency list.
7946                   You may need set CMAKE_INSTALL_RPATH toi appropriate value
7947                   if you use this feature, because if you don't dpkg-shlibdeps
7948                   may fail to find your own shared libs.
7949                   See http://www.cmake.org/Wiki/CMake_RPATH_handling.
7950
7951              CPACK_DEBIAN_PACKAGE_DEBUG
7952
7953
7954                   Mandatory : NO
7955                   Default   : -
7956                   May be set when invoking cpack in order to trace debug informations
7957                   during CPackDeb run.
7958
7959              CPACK_DEBIAN_PACKAGE_PREDEPENDS
7960
7961
7962                   Mandatory : NO
7963                   Default   : -
7964                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
7965                   This field is like Depends, except that it also forces dpkg to complete installation of
7966                   the packages named before even starting the installation of the package which declares
7967                   the pre-dependency.
7968
7969              CPACK_DEBIAN_PACKAGE_ENHANCES
7970
7971
7972                   Mandatory : NO
7973                   Default   : -
7974                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
7975                   This field is similar to Suggests but works in the opposite direction.
7976                   It is used to declare that a package can enhance the functionality of another package.
7977
7978              CPACK_DEBIAN_PACKAGE_BREAKS
7979
7980
7981                   Mandatory : NO
7982                   Default   : -
7983                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
7984                   When one binary package declares that it breaks another, dpkg will refuse to allow the
7985                   package which declares Breaks be installed unless the broken package is deconfigured first,
7986                   and it will refuse to allow the broken package to be reconfigured.
7987
7988              CPACK_DEBIAN_PACKAGE_CONFLICTS
7989
7990
7991                   Mandatory : NO
7992                   Default   : -
7993                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
7994                   When one binary package declares a conflict with another using a Conflicts field,
7995                   dpkg will refuse to allow them to be installed on the system at the same time.
7996
7997              CPACK_DEBIAN_PACKAGE_PROVIDES
7998
7999
8000                   Mandatory : NO
8001                   Default   : -
8002                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
8003                   A virtual package is one which appears in the Provides control field of another package.
8004
8005              CPACK_DEBIAN_PACKAGE_REPLACES
8006
8007
8008                   Mandatory : NO
8009                   Default   : -
8010                   see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
8011                   Packages can declare in their control file that they should overwrite
8012                   files in certain other packages, or completely replace other packages.
8013
8014
8015       CPackRPM
8016              The builtin (binary) CPack RPM generator (Unix only)
8017
8018              CPackRPM may be used to create RPM package using CPack. CPackRPM
8019              is a CPack generator thus it uses the CPACK_XXX  variables  used
8020              by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
8021
8022
8023              However  CPackRPM  has specific features which are controlled by
8024              the specifics CPACK_RPM_XXX variables. You'll  find  a  detailed
8025              usage on the wiki:
8026
8027
8028                http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
8029
8030              However  as  a  handy  reminder  here comes the list of specific
8031              variables:
8032
8033
8034                CPACK_RPM_PACKAGE_SUMMARY
8035                   Mandatory : YES
8036                   Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
8037                   The RPM package summary
8038                CPACK_RPM_PACKAGE_NAME
8039                   Mandatory : YES
8040                   Default   : CPACK_PACKAGE_NAME
8041                   The RPM package name
8042                CPACK_RPM_PACKAGE_VERSION
8043                   Mandatory : YES
8044                   Default   : CPACK_PACKAGE_VERSION
8045                   The RPM package version
8046                CPACK_RPM_PACKAGE_ARCHITECTURE
8047                   Mandatory : NO
8048                   Default   : -
8049                   The RPM package architecture. This may be set to "noarch" if you
8050                   know you are building a noarch package.
8051                CPACK_RPM_PACKAGE_RELEASE
8052                   Mandatory : YES
8053                   Default   : 1
8054                   The RPM package release. This is the numbering of the RPM package
8055                   itself, i.e. the version of the packaging and not the version of the
8056                   content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
8057                   value if the previous packaging was buggy and/or you want to put here
8058                   a fancy Linux distro specific numbering.
8059                CPACK_RPM_PACKAGE_LICENSE
8060                   Mandatory : YES
8061                   Default   : "unknown"
8062                   The RPM package license policy.
8063                CPACK_RPM_PACKAGE_GROUP
8064                   Mandatory : YES
8065                   Default   : "unknown"
8066                   The RPM package group.
8067                CPACK_RPM_PACKAGE_VENDOR
8068                   Mandatory : YES
8069                   Default   : CPACK_PACKAGE_VENDOR if set or "unknown"
8070                   The RPM package vendor.
8071                CPACK_RPM_PACKAGE_URL
8072                   Mandatory : NO
8073                   Default   : -
8074                   The projects URL.
8075                CPACK_RPM_PACKAGE_DESCRIPTION
8076                   Mandatory : YES
8077                   Default   : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
8078                CPACK_RPM_COMPRESSION_TYPE
8079                   Mandatory : NO
8080                   Default   : -
8081                   May be used to override RPM compression type to be used
8082                   to build the RPM. For example some Linux distribution now default
8083                   to lzma or xz compression whereas older cannot use such RPM.
8084                   Using this one can enforce compression type to be used.
8085                   Possible value are: lzma, xz, bzip2 and gzip.
8086                CPACK_RPM_PACKAGE_REQUIRES
8087                   Mandatory : NO
8088                   Default   : -
8089                   May be used to set RPM dependencies (requires).
8090                   Note that you must enclose the complete requires string between quotes,
8091                   for example:
8092                   set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
8093                CPACK_RPM_PACKAGE_SUGGESTS
8094                   Mandatory : NO
8095                   Default   : -
8096                   May be used to set weak RPM dependencies (suggests).
8097                   Note that you must enclose the complete requires string between quotes.
8098                CPACK_RPM_PACKAGE_PROVIDES
8099                   Mandatory : NO
8100                   Default   : -
8101                   May be used to set RPM dependencies (provides).
8102                CPACK_RPM_PACKAGE_OBSOLETES
8103                   Mandatory : NO
8104                   Default   : -
8105                   May be used to set RPM packages that are obsoleted by this one.
8106                CPACK_RPM_PACKAGE_RELOCATABLE
8107                   Mandatory : NO
8108                   Default   : CPACK_PACKAGE_RELOCATABLE
8109                   If this variable is set to TRUE or ON CPackRPM will try
8110                   to build a relocatable RPM package. A relocatable RPM may
8111                   be installed using rpm --prefix or --relocate in order to
8112                   install it at an alternate place see rpm(8).
8113                   Note that currently this may fail if CPACK_SET_DESTDIR is set to ON.
8114                   If CPACK_SET_DESTDIR is set then you will get a warning message
8115                   but if there is file installed with absolute path you'll get
8116                   unexpected behavior.
8117                CPACK_RPM_SPEC_INSTALL_POST
8118                   Mandatory : NO
8119                   Default   : -
8120                   May be used to set an RPM post-install command inside the spec file.
8121                   For example setting it to "/bin/true" may be used to prevent
8122                   rpmbuild to strip binaries.
8123                CPACK_RPM_SPEC_MORE_DEFINE
8124                   Mandatory : NO
8125                   Default   : -
8126                   May be used to add any %define lines to the generated spec file.
8127                CPACK_RPM_PACKAGE_DEBUG
8128                   Mandatory : NO
8129                   Default   : -
8130                   May be set when invoking cpack in order to trace debug information
8131                   during CPack RPM run. For example you may launch CPack like this
8132                   cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
8133                CPACK_RPM_USER_BINARY_SPECFILE
8134                   Mandatory : NO
8135                   Default   : -
8136                   May be set by the user in order to specify a USER binary spec file
8137                   to be used by CPackRPM instead of generating the file.
8138                   The specified file will be processed by CONFIGURE_FILE( @ONLY).
8139                CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
8140                   Mandatory : NO
8141                   Default   : -
8142                   If set CPack will generate a template for USER specified binary
8143                   spec file and stop with an error. For example launch CPack like this
8144                   cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
8145                   The user may then use this file in order to hand-craft is own
8146                   binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
8147                CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
8148                CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
8149                   Mandatory : NO
8150                   Default   : -
8151                   May be used to embbed a pre (un)installation script in the spec file.
8152                   The refered script file(s) will be read and directly
8153                   put after the %pre or %preun section
8154                   One may verify which scriptlet has been included with
8155                    rpm -qp --scripts  package.rpm
8156                CPACK_RPM_POST_INSTALL_SCRIPT_FILE
8157                CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
8158                   Mandatory : NO
8159                   Default   : -
8160                   May be used to embbed a post (un)installation script in the spec file.
8161                   The refered script file(s) will be read and directly
8162                   put after the %post or %postun section
8163                   One may verify which scriptlet has been included with
8164                    rpm -qp --scripts  package.rpm
8165                CPACK_RPM_CHANGELOG_FILE
8166                   Mandatory : NO
8167                   Default   : -
8168                   May be used to embbed a changelog in the spec file.
8169                   The refered file will be read and directly  put after the %changelog
8170                   section.
8171
8172
8173       CTest  Configure a project for testing with CTest/CDash
8174
8175              Include this module in the top CMakeLists.txt file of a  project
8176              to enable testing with CTest and dashboard submissions to CDash:
8177
8178
8179                 project(MyProject)
8180                 ...
8181                 include(CTest)
8182
8183              The  module  automatically  creates  a BUILD_TESTING option that
8184              selects whether to  enable  testing  support  (ON  by  default).
8185              After including the module, use code like
8186
8187
8188                 if(BUILD_TESTING)
8189                   # ... CMake code to create tests ...
8190                 endif()
8191
8192              to creating tests when testing is enabled.
8193
8194
8195              To  enable  submissions  to  a  CDash server, create a CTestCon‐
8196              fig.cmake file at the top of the project with content such as
8197
8198
8199                 set(CTEST_PROJECT_NAME "MyProject")
8200                 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
8201                 set(CTEST_DROP_METHOD "http")
8202                 set(CTEST_DROP_SITE "my.cdash.org")
8203                 set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
8204                 set(CTEST_DROP_SITE_CDASH TRUE)
8205
8206              (the CDash server can provide the file to a project  administra‐
8207              tor who configures 'MyProject'). Settings in the config file are
8208              shared by both this CTest  module  and  the  CTest  command-line
8209              tool's dashboard script mode (ctest -S).
8210
8211
8212              While  building  a  project for submission to CDash, CTest scans
8213              the build output for errors and warnings and reports  them  with
8214              surrounding  context  from the build log.  This generic approach
8215              works for all build tools, but does not give details  about  the
8216              command  invocation  that produced a given problem.  One may get
8217              more detailed reports by adding
8218
8219
8220                 set(CTEST_USE_LAUNCHERS 1)
8221
8222              to the CTestConfig.cmake file.  When this option is enabled, the
8223              CTest  module  tells CMake's Makefile generators to invoke every
8224              command in the generated build system through a  CTest  launcher
8225              program.   (Currently  the CTEST_USE_LAUNCHERS option is ignored
8226              on  non-Makefile  generators.)   During  a  manual  build   each
8227              launcher  transparently  runs  the  command  it wraps.  During a
8228              CTest-driven build for submission to CDash each launcher reports
8229              detailed  information  when its command fails or warns. (Setting
8230              CTEST_USE_LAUNCHERS in CTestConfig.cmake is convenient, but also
8231              adds  the  launcher  overhead  even  for manual builds.  One may
8232              instead set it in a CTest dashboard script and  add  it  to  the
8233              CMake cache for the build tree.)
8234
8235
8236       CTestScriptMode
8237
8238
8239              This file is read by ctest in script mode (-S)
8240
8241
8242       CheckCCompilerFlag
8243              Check whether the C compiler supports a given flag.
8244
8245              CHECK_C_COMPILER_FLAG(<flag> <var>)
8246
8247
8248                <flag> - the compiler flag
8249                <var>  - variable to store the result
8250
8251              This  internally  calls  the  check_c_source_compiles macro. See
8252              help for CheckCSourceCompiles for a listing  of  variables  that
8253              can modify the build.
8254
8255
8256       CheckCSourceCompiles
8257              Check if given C source compiles and links into an executable
8258
8259              CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
8260
8261
8262                <code>       - source code to try to compile, must define 'main'
8263                <var>        - variable to store whether the source code compiled
8264                <fail-regex> - fail if test output matches this regex
8265
8266              The  following variables may be set before calling this macro to
8267              modify the way the check is run:
8268
8269
8270                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8271                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8272                CMAKE_REQUIRED_INCLUDES = list of include directories
8273                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8274
8275
8276       CheckCSourceRuns
8277              Check if the given C source code compiles and runs.
8278
8279              CHECK_C_SOURCE_RUNS(<code> <var>)
8280
8281
8282                <code>   - source code to try to compile
8283                <var>    - variable to store the result
8284                           (1 for success, empty for failure)
8285
8286              The following variables may be set before calling this macro  to
8287              modify the way the check is run:
8288
8289
8290                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8291                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8292                CMAKE_REQUIRED_INCLUDES = list of include directories
8293                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8294
8295
8296       CheckCXXCompilerFlag
8297              Check whether the CXX compiler supports a given flag.
8298
8299              CHECK_CXX_COMPILER_FLAG(<flag> <var>)
8300
8301
8302                <flag> - the compiler flag
8303                <var>  - variable to store the result
8304
8305              This  internally calls the check_cxx_source_compiles macro.  See
8306              help for CheckCXXSourceCompiles for a listing of variables  that
8307              can modify the build.
8308
8309
8310       CheckCXXSourceCompiles
8311              Check if given C++ source compiles and links into an executable
8312
8313              CHECK_CXX_SOURCE_COMPILES(<code>        <var>        [FAIL_REGEX
8314              <fail-regex>])
8315
8316
8317                <code>       - source code to try to compile, must define 'main'
8318                <var>        - variable to store whether the source code compiled
8319                <fail-regex> - fail if test output matches this regex
8320
8321              The following variables may be set before calling this macro  to
8322              modify the way the check is run:
8323
8324
8325                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8326                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8327                CMAKE_REQUIRED_INCLUDES = list of include directories
8328                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8329
8330
8331       CheckCXXSourceRuns
8332              Check if the given C++ source code compiles and runs.
8333
8334              CHECK_CXX_SOURCE_RUNS(<code> <var>)
8335
8336
8337                <code>   - source code to try to compile
8338                <var>    - variable to store the result
8339                           (1 for success, empty for failure)
8340
8341              The  following variables may be set before calling this macro to
8342              modify the way the check is run:
8343
8344
8345                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8346                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8347                CMAKE_REQUIRED_INCLUDES = list of include directories
8348                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8349
8350
8351       CheckFortranFunctionExists
8352              macro which checks if the Fortran function exists
8353
8354              CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE)
8355
8356
8357                FUNCTION - the name of the Fortran function
8358                VARIABLE - variable to store the result
8359
8360
8361
8362
8363              The following variables may be set before calling this macro  to
8364              modify the way the check is run:
8365
8366
8367                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8368
8369
8370       CheckFunctionExists
8371              Check if a C function can be linked
8372
8373              CHECK_FUNCTION_EXISTS(<function> <variable>)
8374
8375
8376              Check that the <function> is provided by libraries on the system
8377              and store the result in a <variable>.  This does not verify that
8378              any  system  header file declares the function, only that it can
8379              be found at link time (considure using CheckSymbolExists).
8380
8381
8382              The following variables may be set before calling this macro  to
8383              modify the way the check is run:
8384
8385
8386                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8387                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8388                CMAKE_REQUIRED_INCLUDES = list of include directories
8389                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8390
8391
8392       CheckIncludeFile
8393              macro which checks the include file exists.
8394
8395              CHECK_INCLUDE_FILE(INCLUDE VARIABLE)
8396
8397
8398                INCLUDE  - name of include file
8399                VARIABLE - variable to return result
8400
8401
8402              an  optional  third argument is the CFlags to add to the compile
8403              line  or you can use CMAKE_REQUIRED_FLAGS
8404
8405
8406              The following variables may be set before calling this macro  to
8407              modify the way the check is run:
8408
8409
8410                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8411                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8412                CMAKE_REQUIRED_INCLUDES = list of include directories
8413
8414
8415
8416
8417
8418       CheckIncludeFileCXX
8419              Check if the include file exists.
8420
8421                CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)
8422
8423
8424
8425
8426                INCLUDE  - name of include file
8427                VARIABLE - variable to return result
8428
8429
8430              An  optional  third argument is the CFlags to add to the compile
8431              line  or you can use CMAKE_REQUIRED_FLAGS.
8432
8433
8434              The following variables may be set before calling this macro  to
8435              modify the way the check is run:
8436
8437
8438                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8439                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8440                CMAKE_REQUIRED_INCLUDES = list of include directories
8441
8442
8443
8444
8445
8446       CheckIncludeFiles
8447              Check if the files can be included
8448
8449
8450
8451
8452              CHECK_INCLUDE_FILES(INCLUDE VARIABLE)
8453
8454
8455                INCLUDE  - list of files to include
8456                VARIABLE - variable to return result
8457
8458
8459
8460
8461              The  following variables may be set before calling this macro to
8462              modify the way the check is run:
8463
8464
8465                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8466                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8467                CMAKE_REQUIRED_INCLUDES = list of include directories
8468
8469
8470       CheckLibraryExists
8471              Check if the function exists.
8472
8473              CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE)
8474
8475
8476                LIBRARY  - the name of the library you are looking for
8477                FUNCTION - the name of the function
8478                LOCATION - location where the library should be found
8479                VARIABLE - variable to store the result
8480
8481
8482
8483
8484              The following variables may be set before calling this macro  to
8485              modify the way the check is run:
8486
8487
8488                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8489                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8490                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8491
8492
8493       CheckStructHasMember
8494              Check  if  the  given  struct  or class has the specified member
8495              variable
8496
8497              CHECK_STRUCT_HAS_MEMBER (STRUCT MEMBER HEADER VARIABLE)
8498
8499
8500                STRUCT - the name of the struct or class you are interested in
8501                MEMBER - the member which existence you want to check
8502                HEADER - the header(s) where the prototype should be declared
8503                VARIABLE - variable to store the result
8504
8505
8506
8507
8508              The following variables may be set before calling this macro  to
8509              modify the way the check is run:
8510
8511
8512                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8513                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8514                CMAKE_REQUIRED_INCLUDES = list of include directories
8515
8516
8517
8518
8519              Example:    CHECK_STRUCT_HAS_MEMBER("struct    timeval"   tv_sec
8520              sys/select.h HAVE_TIMEVAL_TV_SEC)
8521
8522
8523       CheckSymbolExists
8524              Check if a symbol exists as a function, variable, or macro
8525
8526              CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
8527
8528
8529              Check that the  <symbol>  is  available  after  including  given
8530              header  <files>  and  store the result in a <variable>.  Specify
8531              the list of files in one argument as a semicolon-separated list.
8532
8533
8534              If the header files define the symbol as a macro it  is  consid‐
8535              ered available and assumed to work.  If the header files declare
8536              the symbol as a function or variable then the symbol  must  also
8537              be available for linking.  If the symbol is a type or enum value
8538              it will not  be  recognized  (consider  using  CheckTypeSize  or
8539              CheckCSourceCompiles).
8540
8541
8542              The  following variables may be set before calling this macro to
8543              modify the way the check is run:
8544
8545
8546                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8547                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8548                CMAKE_REQUIRED_INCLUDES = list of include directories
8549                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8550
8551
8552       CheckTypeSize
8553              Check sizeof a type
8554
8555                CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
8556
8557              Check if the type exists and  determine  its  size.  On  return,
8558              "HAVE_${VARIABLE}" holds the existence of the type, and "${VARI‐
8559              ABLE}" holds one of the following:
8560
8561
8562                 <size> = type has non-zero size <size>
8563                 "0"    = type has arch-dependent size (see below)
8564                 ""     = type does not exist
8565
8566              Furthermore, the variable "${VARIABLE}_CODE" holds C  preproces‐
8567              sor  code  to  define the macro "${VARIABLE}" to the size of the
8568              type, or leave the macro undefined if the type does not exist.
8569
8570
8571              The variable "${VARIABLE}" may be "0"  when  CMAKE_OSX_ARCHITEC‐
8572              TURES  has  multiple  architectures  for building OS X universal
8573              binaries. This indicates that the type size varies across archi‐
8574              tectures.  In this case "${VARIABLE}_CODE" contains C preproces‐
8575              sor tests mapping from each architecture  macro  to  the  corre‐
8576              sponding type size. The list of architecture macros is stored in
8577              "${VARIABLE}_KEYS", and the value for  each  key  is  stored  in
8578              "${VARIABLE}-${KEY}".
8579
8580
8581              If  the BUILTIN_TYPES_ONLY option is not given, the macro checks
8582              for headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves
8583              results  in  HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H.
8584              The type size check automatically includes the  available  head‐
8585              ers, thus supporting checks of types defined in the headers.
8586
8587
8588              The  following variables may be set before calling this macro to
8589              modify the way the check is run:
8590
8591
8592                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8593                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8594                CMAKE_REQUIRED_INCLUDES = list of include directories
8595                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8596                CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
8597
8598
8599       CheckVariableExists
8600              Check if the variable exists.
8601
8602                CHECK_VARIABLE_EXISTS(VAR VARIABLE)
8603
8604                VAR      - the name of the variable
8605                VARIABLE - variable to store the result
8606
8607
8608
8609
8610              This macro is only for C variables.
8611
8612
8613              The following variables may be set before calling this macro  to
8614              modify the way the check is run:
8615
8616
8617                CMAKE_REQUIRED_FLAGS = string of compile command line flags
8618                CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
8619                CMAKE_REQUIRED_LIBRARIES = list of libraries to link
8620
8621
8622       Dart   Configure  a  project  for  testing  with  CTest or old Dart Tcl
8623              Client
8624
8625              This file is the backwards-compatibility version  of  the  CTest
8626              module.  It supports using the old Dart 1 Tcl client for driving
8627              dashboard submissions as well as testing with CTest.  This  mod‐
8628              ule  should be included in the CMakeLists.txt file at the top of
8629              a project.  Typical usage:
8630
8631
8632                INCLUDE(Dart)
8633                IF(BUILD_TESTING)
8634                  # ... testing related CMake code ...
8635                ENDIF(BUILD_TESTING)
8636
8637              The BUILD_TESTING option is created by the Dart module to deter‐
8638              mine  whether testing support should be enabled.  The default is
8639              ON.
8640
8641
8642       Documentation
8643              DocumentationVTK.cmake
8644
8645              This file provides support for the VTK documentation  framework.
8646              It relies on several tools (Doxygen, Perl, etc).
8647
8648
8649       ExternalProject
8650              Create custom targets to build projects in external trees
8651
8652              The  'ExternalProject_Add'  function  creates a custom target to
8653              drive download, update/patch, configure, build, install and test
8654              steps of an external project:
8655
8656
8657                ExternalProject_Add(<name>    # Name for custom target
8658                  [DEPENDS projects...]       # Targets on which the project depends
8659                  [PREFIX dir]                # Root dir for entire project
8660                  [LIST_SEPARATOR sep]        # Sep to be replaced by ; in cmd lines
8661                  [TMP_DIR dir]               # Directory to store temporary files
8662                  [STAMP_DIR dir]             # Directory to store step timestamps
8663                 #--Download step--------------
8664                  [DOWNLOAD_DIR dir]          # Directory to store downloaded files
8665                  [DOWNLOAD_COMMAND cmd...]   # Command to download source tree
8666                  [CVS_REPOSITORY cvsroot]    # CVSROOT of CVS repository
8667                  [CVS_MODULE mod]            # Module to checkout from CVS repo
8668                  [CVS_TAG tag]               # Tag to checkout from CVS repo
8669                  [SVN_REPOSITORY url]        # URL of Subversion repo
8670                  [SVN_REVISION rev]          # Revision to checkout from Subversion repo
8671                  [SVN_USERNAME john ]        # Username for Subversion checkout and update
8672                  [SVN_PASSWORD doe ]         # Password for Subversion checkout and update
8673                  [GIT_REPOSITORY url]        # URL of git repo
8674                  [GIT_TAG tag]               # Git branch name, commit id or tag
8675                  [URL /.../src.tgz]          # Full path or URL of source
8676                  [URL_MD5 md5]               # MD5 checksum of file at URL
8677                  [TIMEOUT seconds]           # Time allowed for file download operations
8678                 #--Update/Patch step----------
8679                  [UPDATE_COMMAND cmd...]     # Source work-tree update command
8680                  [PATCH_COMMAND cmd...]      # Command to patch downloaded source
8681                 #--Configure step-------------
8682                  [SOURCE_DIR dir]            # Source dir to be used for build
8683                  [CONFIGURE_COMMAND cmd...]  # Build tree configuration command
8684                  [CMAKE_COMMAND /.../cmake]  # Specify alternative cmake executable
8685                  [CMAKE_GENERATOR gen]       # Specify generator for native build
8686                  [CMAKE_ARGS args...]        # Arguments to CMake command line
8687                  [CMAKE_CACHE_ARGS args...]  # Initial cache arguments, of the form -Dvar:string=on
8688                 #--Build step-----------------
8689                  [BINARY_DIR dir]            # Specify build dir location
8690                  [BUILD_COMMAND cmd...]      # Command to drive the native build
8691                  [BUILD_IN_SOURCE 1]         # Use source dir for build dir
8692                 #--Install step---------------
8693                  [INSTALL_DIR dir]           # Installation prefix
8694                  [INSTALL_COMMAND cmd...]    # Command to drive install after build
8695                 #--Test step------------------
8696                  [TEST_BEFORE_INSTALL 1]     # Add test step executed before install step
8697                  [TEST_AFTER_INSTALL 1]      # Add test step executed after install step
8698                  [TEST_COMMAND cmd...]       # Command to drive test
8699                 #--Output logging-------------
8700                  [LOG_DOWNLOAD 1]            # Wrap download in script to log output
8701                  [LOG_UPDATE 1]              # Wrap update in script to log output
8702                  [LOG_CONFIGURE 1]           # Wrap configure in script to log output
8703                  [LOG_BUILD 1]               # Wrap build in script to log output
8704                  [LOG_TEST 1]                # Wrap test in script to log output
8705                  [LOG_INSTALL 1]             # Wrap install in script to log output
8706                 #--Custom targets-------------
8707                  [STEP_TARGETS st1 st2 ...]  # Generate custom targets for these steps
8708                  )
8709
8710              The  *_DIR  options  specify  directories  for the project, with
8711              default directories computed as follows. If the PREFIX option is
8712              given  to ExternalProject_Add() or the EP_PREFIX directory prop‐
8713              erty is set, then an external project  is  built  and  installed
8714              under the specified prefix:
8715
8716
8717                 TMP_DIR      = <prefix>/tmp
8718                 STAMP_DIR    = <prefix>/src/<name>-stamp
8719                 DOWNLOAD_DIR = <prefix>/src
8720                 SOURCE_DIR   = <prefix>/src/<name>
8721                 BINARY_DIR   = <prefix>/src/<name>-build
8722                 INSTALL_DIR  = <prefix>
8723
8724              Otherwise,  if the EP_BASE directory property is set then compo‐
8725              nents of an external project  are  stored  under  the  specified
8726              base:
8727
8728
8729                 TMP_DIR      = <base>/tmp/<name>
8730                 STAMP_DIR    = <base>/Stamp/<name>
8731                 DOWNLOAD_DIR = <base>/Download/<name>
8732                 SOURCE_DIR   = <base>/Source/<name>
8733                 BINARY_DIR   = <base>/Build/<name>
8734                 INSTALL_DIR  = <base>/Install/<name>
8735
8736              If  no  PREFIX,  EP_PREFIX,  or  EP_BASE  is  specified then the
8737              default is to set PREFIX to "<name>-prefix". Relative paths  are
8738              interpreted with respect to the build directory corresponding to
8739              the source directory in which ExternalProject_Add is invoked.
8740
8741
8742              If SOURCE_DIR is explicitly set to  an  existing  directory  the
8743              project will be built from it. Otherwise a download step must be
8744              specified using one of the DOWNLOAD_COMMAND,  CVS_*,  SVN_*,  or
8745              URL  options. The URL option may refer locally to a directory or
8746              source  tarball,  or   refer   to   a   remote   tarball   (e.g.
8747              http://.../src.tgz).
8748
8749
8750              The 'ExternalProject_Add_Step' function adds a custom step to an
8751              external project:
8752
8753
8754                ExternalProject_Add_Step(<name> <step> # Names of project and custom step
8755                  [COMMAND cmd...]        # Command line invoked by this step
8756                  [COMMENT "text..."]     # Text printed when step executes
8757                  [DEPENDEES steps...]    # Steps on which this step depends
8758                  [DEPENDERS steps...]    # Steps that depend on this step
8759                  [DEPENDS files...]      # Files on which this step depends
8760                  [ALWAYS 1]              # No stamp file, step always runs
8761                  [WORKING_DIRECTORY dir] # Working directory for command
8762                  [LOG 1]                 # Wrap step in script to log output
8763                  )
8764
8765              The command line, comment, and working directory of every  stan‐
8766              dard   and   custom   step   is   processed  to  replace  tokens
8767              <SOURCE_DIR>, <BINARY_DIR>, <INSTALL_DIR>,  and  <TMP_DIR>  with
8768              corresponding property values.
8769
8770
8771              The  'ExternalProject_Get_Property'  function retrieves external
8772              project target properties:
8773
8774
8775                ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])
8776
8777              It stores property values in variables of the same  name.  Prop‐
8778              erty  names  correspond to the keyword argument names of 'Exter‐
8779              nalProject_Add'.
8780
8781
8782              The 'ExternalProject_Add_StepTargets' function generates  custom
8783              targets for the steps listed:
8784
8785
8786                ExternalProject_Add_StepTargets(<name> [step1 [step2 [...]]])
8787
8788
8789
8790
8791              If  STEP_TARGETS  is set then ExternalProject_Add_StepTargets is
8792              automatically called at the end of matching calls  to  External‐
8793              Project_Add_Step.  Pass  STEP_TARGETS  explicitly  to individual
8794              ExternalProject_Add calls, or  implicitly  to  all  ExternalPro‐
8795              ject_Add  calls  by  setting the directory property EP_STEP_TAR‐
8796              GETS.
8797
8798
8799              If STEP_TARGETS is not set,  clients  may  still  manually  call
8800              ExternalProject_Add_StepTargets   after   calling   ExternalPro‐
8801              ject_Add or ExternalProject_Add_Step.
8802
8803
8804              This functionality is provided to make  it  easy  to  drive  the
8805              steps independently of each other by specifying targets on build
8806              command  lines.  For  example,  you  may  be  submitting  to   a
8807              sub-project based dashboard, where you want to drive the config‐
8808              ure portion of the build, then submit to the dashboard, followed
8809              by  the build portion, followed by tests. If you invoke a custom
8810              target that depends on a step halfway through  the  step  depen‐
8811              dency chain, then all the previous steps will also run to ensure
8812              everything is up to date.
8813
8814
8815              For example, to drive configure, build and test  steps  indepen‐
8816              dently  for each ExternalProject_Add call in your project, write
8817              the following line prior to  any  ExternalProject_Add  calls  in
8818              your CMakeLists file:
8819
8820
8821                 set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test)
8822
8823
8824       FeatureSummary
8825              Macros for generating a summary of enabled/disabled features
8826
8827
8828
8829
8830              This  module  provides  the  macros feature_summary(), set_pack‐
8831              age_info() and  add_feature_info().  For  compatiblity  it  also
8832              still  provides set_feature_info(), print_enabled_features() and
8833              print_disabled_features.
8834
8835
8836              These macros can be used to generate a summary  of  enabled  and
8837              disabled packages and/or feature for a build tree:
8838
8839
8840                  -- Enabled features:
8841                  LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org>
8842                  PNG , A PNG image library. , <http://www.libpng.org/pub/png/>
8843                  -- Disabled features:
8844                  Lua51 , The Lua scripting language. , <http://www.lua.org>
8845                  Foo , Foo provides cool stuff.
8846
8847
8848
8849
8850
8851
8852
8853                  FEATURE_SUMMARY( [FILENAME <file>]
8854                                   [APPEND]
8855                                   [VAR <variable_name>]
8856                                   [DESCRIPTION "Found packages:"]
8857                                   WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND
8858                                        | ENABLED_FEATURES | DISABLED_FEATURES]
8859                                 )
8860
8861
8862
8863
8864              The  FEATURE_SUMMARY()  macro  can  be used to print information
8865              about enabled or disabled features or packages of a project.  By
8866              default, only the names of the features/packages will be printed
8867              and their required version when one was specified. Use  SET_FEA‐
8868              TURE_INFO() to add more useful information, like e.g. a download
8869              URL for the respective package.
8870
8871
8872              The WHAT option is the only mandatory option. Here  you  specify
8873              what information will be printed:
8874
8875
8876                  ENABLED_FEATURES: the list of all features and packages which are enabled,
8877                                    excluding the QUIET packages
8878                  DISABLED_FEATURES: the list of all features and packages which are disabled,
8879                                     excluding the QUIET packages
8880                  PACKAGES_FOUND: the list of all packages which have been found
8881                  PACKAGES_NOT_FOUND: the list of all packages which have not been found
8882                  ALL: this will give all packages which have or have not been found
8883
8884
8885
8886
8887              If  a  FILENAME  is  given, the information is printed into this
8888              file. If APPEND is used, it is appended to this file,  otherwise
8889              the file is overwritten if it already existed. If the VAR option
8890              is used, the information is "printed" into the  specified  vari‐
8891              able. If FILENAME is not used, the information is printed to the
8892              terminal. Using the DESCRIPTION option a description or headline
8893              can be set which will be printed above the actual content.
8894
8895
8896              Example 1, append everything to a file:
8897
8898
8899                 feature_summary(WHAT ALL
8900                                 FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND)
8901
8902
8903
8904
8905              Example 2, print the enabled features into the variable enabled‐
8906              FeaturesText:
8907
8908
8909                 feature_summary(WHAT ENABLED_FEATURES
8910                                 DESCRIPTION "Enabled Features:"
8911                                 VAR enabledFeaturesText)
8912                 message(STATUS "${enabledFeaturesText}")
8913
8914
8915
8916
8917
8918
8919
8920                  SET_PACKAGE_INFO(<name> <description> [<url> [<comment>] ] )
8921
8922              Use this macro to set up information about  the  named  package,
8923              which  can  then be displayed via FEATURE_SUMMARY(). This can be
8924              done either directly in the Find-module or in the project  which
8925              uses  the module after the FIND_PACKAGE() call. The features for
8926              which information can be set  are  added  automatically  by  the
8927              find_package() command.
8928
8929
8930              Example for setting the info for a package:
8931
8932
8933                 find_package(LibXml2)
8934                 set_package_info(LibXml2 "XML processing library." "http://xmlsoft.org/")
8935
8936
8937
8938
8939
8940
8941
8942                  ADD_FEATURE_INFO(<name> <enabled> <description>)
8943
8944              Use this macro to add information about a feature with the given
8945              <name>. <enabled> contains whether this feature  is  enabled  or
8946              not, <description> is a text descibing the feature. The informa‐
8947              tion can be displayed using feature_summary()  for  ENABLED_FEA‐
8948              TURES and DISABLED_FEATURES respectively.
8949
8950
8951              Example for setting the info for a feature:
8952
8953
8954                 option(WITH_FOO "Help for foo" ON)
8955                 add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.")
8956
8957
8958
8959
8960
8961
8962
8963              The  following macros are provided for compatibility with previ‐
8964              ous CMake versions:
8965
8966
8967                  PRINT_ENABLED_FEATURES()
8968
8969              Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES  DESCRIP‐
8970              TION "Enabled features:")
8971
8972
8973                  PRINT_DISABLED_FEATURES()
8974
8975              Does   the   same   as   FEATURE_SUMMARY(WHAT  DISABLED_FEATURES
8976              DESCRIPTION "Disabled features:")
8977
8978
8979                  SET_FEATURE_INFO(<name> <description> [<url> [<comment>] ] )
8980
8981              Does the same  as  SET_PACKAGE_INFO(<name>  <description>  <url>
8982              <comment> )
8983
8984
8985       FindALSA
8986              Find alsa
8987
8988              Find the alsa libraries (asound)
8989
8990
8991                This module defines the following variables:
8992                   ALSA_FOUND       - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
8993                   ALSA_LIBRARIES   - Set when ALSA_LIBRARY is found
8994                   ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found
8995
8996
8997
8998
8999                   ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
9000                   ALSA_LIBRARY     - the asound library
9001
9002
9003
9004
9005
9006       FindASPELL
9007              Try to find ASPELL
9008
9009              Once done this will define
9010
9011
9012                ASPELL_FOUND - system has ASPELL
9013                ASPELL_INCLUDE_DIR - the ASPELL include directory
9014                ASPELL_LIBRARIES - The libraries needed to use ASPELL
9015                ASPELL_DEFINITIONS - Compiler switches required for using ASPELL
9016
9017
9018       FindAVIFile
9019              Locate AVIFILE library and include paths
9020
9021              AVIFILE  (http://avifile.sourceforge.net/)is  a set of libraries
9022              for  i386 machines to use various AVI codecs. Support is limited
9023              beyond  Linux.  Windows  provides  native  AVI  support,  and so
9024              doesn't need this library. This module defines
9025
9026
9027                AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
9028                AVIFILE_LIBRARIES, the libraries to link against
9029                AVIFILE_DEFINITIONS, definitions to use when compiling
9030                AVIFILE_FOUND, If false, don't try to use AVIFILE
9031
9032
9033       FindBISON
9034              Find bison executable and provides  macros  to  generate  custom
9035              build rules
9036
9037              The module defines the following variables:
9038
9039
9040                BISON_EXECUTABLE - path to the bison program
9041                BISON_VERSION - version of bison
9042                BISON_FOUND - true if the program was found
9043
9044
9045
9046
9047              The minimum required version of bison can be specified using the
9048              standard CMake syntax, e.g. find_package(BISON 2.1.3)
9049
9050
9051              If bison is found, the module defines the macros:
9052
9053
9054                BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
9055                            [COMPILE_FLAGS <string>])
9056
9057              which will create  a custom rule to generate  a parser. <YaccIn‐
9058              put>  is  the path to  a yacc file. <CodeOutput> is the name  of
9059              the source file generated by bison.  A header file is  also   be
9060              generated,  and  contains  the   token  list.  If  COMPILE_FLAGS
9061              option is  specified,  the  next  parameter  is   added  in  the
9062              bison  command line.  if  VERBOSE option is specified, <file> is
9063              created  and contains verbose descriptions of  the  grammar  and
9064              parser. The macro defines a set of variables:
9065
9066
9067                BISON_${Name}_DEFINED - true is the macro ran successfully
9068                BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
9069                BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
9070                BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
9071                BISON_${Name}_OUTPUTS - The sources files generated by bison
9072                BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
9073
9074
9075
9076
9077                ====================================================================
9078                Example:
9079
9080
9081
9082
9083                 find_package(BISON)
9084                 BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
9085                 add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
9086                ====================================================================
9087
9088
9089       FindBLAS
9090              Find BLAS library
9091
9092              This  module  finds an installed fortran library that implements
9093              the       BLAS       linear-algebra        interface        (see
9094              http://www.netlib.org/blas/). The list of libraries searched for
9095              is taken from the autoconf macro file, acx_blas.m4  (distributed
9096              at http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
9097
9098
9099              This module sets the following variables:
9100
9101
9102                BLAS_FOUND - set to true if a library implementing the BLAS interface
9103                  is found
9104                BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
9105                  and -L).
9106                BLAS_LIBRARIES - uncached list of libraries (using full path name) to
9107                  link against to use BLAS
9108                BLAS95_LIBRARIES - uncached list of libraries (using full path name)
9109                  to link against to use BLAS95 interface
9110                BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
9111                  is found
9112                BLA_STATIC  if set on this determines what kind of linkage we do (static)
9113                BLA_VENDOR  if set checks only the specified vendor, if not set checks
9114                   all the possibilities
9115                BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
9116
9117              ######### ## List of vendors (BLA_VENDOR) valid in this module #
9118              ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32
9119              (intel  mkl  v10  32  bit),Intel10_64lp (intel mkl v10 64 bit,lp
9120              thread model, lp64 model), #  Intel( older versions  of  mkl  32
9121              and 64 bit), ACML,Apple, NAS, Generic C/CXX should be enabled to
9122              use Intel mkl
9123
9124
9125       FindBZip2
9126              Try to find BZip2
9127
9128              Once done this will define
9129
9130
9131                BZIP2_FOUND - system has BZip2
9132                BZIP2_INCLUDE_DIR - the BZip2 include directory
9133                BZIP2_LIBRARIES - Link these to use BZip2
9134                BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
9135
9136
9137       FindBoost
9138              Try to find Boost include dirs and libraries
9139
9140              Usage of this module as follows:
9141
9142
9143              NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below.
9144              Due  to  Boost  naming conventions and limitations in CMake this
9145              find module is NOT future safe with  respect  to  Boost  version
9146              numbers, and may break.
9147
9148
9149              == Using Header-Only libraries from within Boost: ==
9150
9151
9152                 find_package( Boost 1.36.0 )
9153                 if(Boost_FOUND)
9154                    include_directories(${Boost_INCLUDE_DIRS})
9155                    add_executable(foo foo.cc)
9156                 endif()
9157
9158
9159
9160
9161
9162
9163
9164              == Using actual libraries from within Boost: ==
9165
9166
9167                 set(Boost_USE_STATIC_LIBS        ON)
9168                 set(Boost_USE_MULTITHREADED      ON)
9169                 set(Boost_USE_STATIC_RUNTIME    OFF)
9170                 find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
9171
9172
9173
9174
9175                 if(Boost_FOUND)
9176                    include_directories(${Boost_INCLUDE_DIRS})
9177                    add_executable(foo foo.cc)
9178                    target_link_libraries(foo ${Boost_LIBRARIES})
9179                 endif()
9180
9181
9182
9183
9184
9185
9186
9187              The  components  list  needs  to  contain  actual names of boost
9188              libraries only, such as  "date_time"  for  "libboost_date_time".
9189              If  you're  using  parts of Boost that contain header files only
9190              (e.g. foreach) you do not need to specify COMPONENTS.
9191
9192
9193              You should provide a minimum version number that should be used.
9194              If  you  provide  this   version number and specify the REQUIRED
9195              attribute, this module will fail if it can't find the  specified
9196              or  a  later  version.  If  you specify a version number this is
9197              automatically put into the considered list  of  version  numbers
9198              and  thus  doesn't  need  to  be  specified  in  the Boost_ADDI‐
9199              TIONAL_VERSIONS variable (see below).
9200
9201
9202              NOTE for Visual Studio Users:
9203
9204
9205                   Automatic linking is used on MSVC & Borland compilers by default when
9206                   #including things in Boost.  It's important to note that setting
9207                   Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
9208                   should you need this feature.  Automatic linking typically uses static
9209                   libraries with a few exceptions (Boost.Python is one).
9210
9211
9212
9213
9214                   Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
9215                   more details.  Adding a TARGET_LINK_LIBRARIES() as shown in the example
9216                   above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
9217                   gets set to OFF.  It is suggested you avoid automatic linking since it
9218                   will make your application less portable.
9219
9220
9221
9222
9223              =========== The mess that is Boost_ADDITIONAL_VERSIONS  (sorry?)
9224              ============
9225
9226
9227              OK,  so  the  Boost_ADDITIONAL_VERSIONS  variable can be used to
9228              specify a list of boost version numbers  that  should  be  taken
9229              into  account when searching for Boost. Unfortunately boost puts
9230              the version number into the actual filename for  the  libraries,
9231              so this variable will certainly be needed in the future when new
9232              Boost versions are released.
9233
9234
9235              Currently this module searches for the  following  version  num‐
9236              bers:  1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0,
9237              1.35.1, 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0,  1.39,
9238              1.39.0,  1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0,
9239              1.44, 1.44.0, 1.45, 1.45.0, 1.46, 1.46.0
9240
9241
9242              NOTE: If  you  add  a  new  major  1.x  version  in  Boost_ADDI‐
9243              TIONAL_VERSIONS  you  should  add  both  1.x  and 1.x.0 as shown
9244              above.  Official Boost include directories omit the 3rd  version
9245              number  from  include  paths  if it is 0 although not all binary
9246              Boost releases do so.
9247
9248
9249              set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
9250
9251
9252              =====================================              =============
9253              ========================
9254
9255
9256              Variables  used  by this module, they can change the default be‐
9257              haviour and need to be set before calling find_package:
9258
9259
9260                 Boost_USE_MULTITHREADED      Can be set to OFF to use the non-multithreaded
9261                                              boost libraries.  If not specified, defaults
9262                                              to ON.
9263
9264
9265
9266
9267                 Boost_USE_STATIC_LIBS        Can be set to ON to force the use of the static
9268                                              boost libraries. Defaults to OFF.
9269
9270
9271
9272
9273                 Boost_NO_SYSTEM_PATHS        Set to TRUE to suppress searching in system
9274                                              paths (or other locations outside of BOOST_ROOT
9275                                              or BOOST_INCLUDEDIR).  Useful when specifying
9276                                              BOOST_ROOT. Defaults to OFF.
9277                                                [Since CMake 2.8.3]
9278
9279
9280
9281
9282                 Boost_USE_STATIC_RUNTIME     If enabled, searches for boost libraries
9283                                              linked against a static C++ standard library
9284                                              ('s' ABI tag). This option should be set to
9285                                              ON or OFF because the default behavior
9286                                              if not specified is platform dependent
9287                                              for backwards compatibility.
9288                                                [Since CMake 2.8.3]
9289
9290
9291
9292
9293                 Boost_USE_DEBUG_PYTHON       If enabled, searches for boost libraries
9294                                              compiled against a special debug build of
9295                                              Python ('y' ABI tag). Defaults to OFF.
9296                                                [Since CMake 2.8.3]
9297
9298
9299
9300
9301                 Boost_USE_STLPORT            If enabled, searches for boost libraries
9302                                              compiled against the STLPort standard
9303                                              library ('p' ABI tag). Defaults to OFF.
9304                                                [Since CMake 2.8.3]
9305
9306
9307
9308
9309                 Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
9310                                              If enabled, searches for boost libraries
9311                                              compiled against the deprecated STLPort
9312                                              "native iostreams" feature ('n' ABI tag).
9313                                              Defaults to OFF.
9314                                                [Since CMake 2.8.3]
9315
9316
9317
9318
9319              Other Variables used by this module which you may want to set.
9320
9321
9322                 Boost_ADDITIONAL_VERSIONS    A list of version numbers to use for searching
9323                                              the boost include directory.  Please see
9324                                              the documentation above regarding this
9325                                              annoying, but necessary variable :(
9326
9327
9328
9329
9330                 Boost_DEBUG                  Set this to TRUE to enable debugging output
9331                                              of FindBoost.cmake if you are having problems.
9332                                              Please enable this before filing any bug
9333                                              reports.
9334
9335
9336
9337
9338                 Boost_DETAILED_FAILURE_MSG   FindBoost doesn't output detailed information
9339                                              about why it failed or how to fix the problem
9340                                              unless this is set to TRUE or the REQUIRED
9341                                              keyword is specified in find_package().
9342                                                [Since CMake 2.8.0]
9343
9344
9345
9346
9347                 Boost_COMPILER               Set this to the compiler suffix used by Boost
9348                                              (e.g. "-gcc43") if FindBoost has problems finding
9349                                              the proper Boost installation
9350
9351
9352
9353
9354                 Boost_THREADAPI                When building boost.thread, sometimes the name of the
9355                                              library contains an additional "pthread" or "win32"
9356                                              string known as the threadapi.  This can happen when
9357                                              compiling against pthreads on Windows or win32 threads
9358                                              on Cygwin.  You may specify this variable and if set
9359                                              when FindBoost searches for the Boost threading library
9360                                              it will first try to match the threadapi you specify.
9361                                                For Example: libboost_thread_win32-mgw45-mt-1_43.a
9362                                              might be found if you specified "win32" here before
9363                                              falling back on libboost_thread-mgw45-mt-1_43.a.
9364                                                [Since CMake 2.8.3]
9365
9366
9367
9368
9369                 Boost_REALPATH               Resolves symbolic links for discovered boost libraries
9370                                              to assist with packaging.  For example, instead of
9371                                              Boost_SYSTEM_LIBRARY_RELEASE being resolved to
9372                                              "/usr/lib/libboost_system.so" it would be
9373                                              "/usr/lib/libboost_system.so.1.42.0" instead.
9374                                              This does not affect linking and should not be
9375                                              enabled unless the user needs this information.
9376                                                [Since CMake 2.8.3]
9377
9378
9379
9380
9381
9382       FindBullet
9383              Try to find the Bullet physics engine
9384
9385
9386
9387
9388                This module defines the following variables
9389
9390
9391
9392
9393                BULLET_FOUND - Was bullet found
9394                BULLET_INCLUDE_DIRS - the Bullet include directories
9395                BULLET_LIBRARIES - Link to this, by default it includes
9396                                   all bullet components (Dynamics,
9397                                   Collision, LinearMath, & SoftBody)
9398
9399
9400
9401
9402                This module accepts the following variables
9403
9404
9405
9406
9407                BULLET_ROOT - Can be set to bullet install path or Windows build path
9408
9409
9410
9411
9412
9413       FindCABLE
9414              Find CABLE
9415
9416              This module finds if CABLE is installed and determines where the
9417              include  files  and libraries are.  This code sets the following
9418              variables:
9419
9420
9421                CABLE             the path to the cable executable
9422                CABLE_TCL_LIBRARY the path to the Tcl wrapper library
9423                CABLE_INCLUDE_DIR the path to the include directory
9424
9425
9426
9427
9428              To build Tcl wrappers, you should add shared library and link it
9429              to     ${CABLE_TCL_LIBRARY}.      You     should     also    add
9430              ${CABLE_INCLUDE_DIR} as an include directory.
9431
9432
9433       FindCUDA
9434              Tools for building CUDA C files: libraries and  build  dependen‐
9435              cies.
9436
9437              This  script  locates the NVIDIA CUDA C tools. It should work on
9438              linux, windows, and mac and should be reasonably up to date with
9439              CUDA C releases.
9440
9441
9442              This  script makes use of the standard find_package arguments of
9443              <VERSION>, REQUIRED and QUIET.  CUDA_FOUND  will  report  if  an
9444              acceptable version of CUDA was found.
9445
9446
9447              The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR
9448              if the prefix cannot be determined by the location  of  nvcc  in
9449              the  system path and REQUIRED is specified to find_package(). To
9450              use a different installed version of the toolkit set  the  envi‐
9451              ronment   variable  CUDA_BIN_PATH  before  running  cmake  (e.g.
9452              CUDA_BIN_PATH=/usr/local/cuda1.0   instead   of   the    default
9453              /usr/local/cuda) or set CUDA_TOOLKIT_ROOT_DIR after configuring.
9454              If you change the value of CUDA_TOOLKIT_ROOT_DIR, various compo‐
9455              nents that depend on the path will be relocated.
9456
9457
9458              It  might  be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on
9459              certain platforms, or to use a cuda runtime not installed in the
9460              default  location.  In  newer  versions  of the toolkit the cuda
9461              library is included with the graphics driver- be sure  that  the
9462              driver  version  matches what is needed by the cuda runtime ver‐
9463              sion.
9464
9465
9466              The following variables affect the behavior of the macros in the
9467              script  (in  alphebetical  order).  Note that any of these flags
9468              can be changed multiple times in the same directory before call‐
9469              ing    CUDA_ADD_EXECUTABLE,    CUDA_ADD_LIBRARY,   CUDA_COMPILE,
9470              CUDA_COMPILE_PTX or CUDA_WRAP_SRCS.
9471
9472
9473                CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
9474                -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
9475                   Note that making this different from the host code when generating object
9476                   or C files from CUDA code just won't work, because size_t gets defined by
9477                   nvcc in the generated source.  If you compile to PTX and then load the
9478                   file yourself, you can mix bit sizes between device and host.
9479
9480
9481
9482
9483                CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
9484                -- Set to ON if you want the custom build rule to be attached to the source
9485                   file in Visual Studio.  Turn OFF if you add the same cuda file to multiple
9486                   targets.
9487
9488
9489
9490
9491                   This allows the user to build the target from the CUDA file; however, bad
9492                   things can happen if the CUDA source file is added to multiple targets.
9493                   When performing parallel builds it is possible for the custom build
9494                   command to be run more than once and in parallel causing cryptic build
9495                   errors.  VS runs the rules for every source file in the target, and a
9496                   source can have only one rule no matter how many projects it is added to.
9497                   When the rule is run from multiple targets race conditions can occur on
9498                   the generated file.  Eventually everything will get built, but if the user
9499                   is unaware of this behavior, there may be confusion.  It would be nice if
9500                   this script could detect the reuse of source files across multiple targets
9501                   and turn the option off for the user, but no good solution could be found.
9502
9503
9504
9505
9506                CUDA_BUILD_CUBIN (Default OFF)
9507                -- Set to ON to enable and extra compilation pass with the -cubin option in
9508                   Device mode. The output is parsed and register, shared memory usage is
9509                   printed during build.
9510
9511
9512
9513
9514                CUDA_BUILD_EMULATION (Default OFF for device mode)
9515                -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
9516                   when CUDA_BUILD_EMULATION is TRUE.
9517
9518
9519
9520
9521                CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
9522                -- Set to the path you wish to have the generated files placed.  If it is
9523                   blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
9524                   Intermediate files will always be placed in
9525                   CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
9526
9527
9528
9529
9530                CUDA_HOST_COMPILATION_CPP (Default ON)
9531                -- Set to OFF for C compilation of host code.
9532
9533
9534
9535
9536                CUDA_NVCC_FLAGS
9537                CUDA_NVCC_FLAGS_<CONFIG>
9538                -- Additional NVCC command line arguments.  NOTE: multiple arguments must be
9539                   semi-colon delimited (e.g. --compiler-options;-Wall)
9540
9541
9542
9543
9544                CUDA_PROPAGATE_HOST_FLAGS (Default ON)
9545                -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
9546                   dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
9547                   host compiler through nvcc's -Xcompiler flag.  This helps make the
9548                   generated host code match the rest of the system better.  Sometimes
9549                   certain flags give nvcc problems, and this will help you turn the flag
9550                   propagation off.  This does not affect the flags supplied directly to nvcc
9551                   via CUDA_NVCC_FLAGS or through the OPTION flags specified through
9552                   CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS.  Flags used for
9553                   shared library compilation are not affected by this flag.
9554
9555
9556
9557
9558                CUDA_VERBOSE_BUILD (Default OFF)
9559                -- Set to ON to see all the commands used when building the CUDA file.  When
9560                   using a Makefile generator the value defaults to VERBOSE (run make
9561                   VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
9562                   always print the output.
9563
9564
9565
9566
9567              The script creates the following macros (in alphebetical order):
9568
9569
9570                CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
9571                -- Adds the cufft library to the target (can be any target).  Handles whether
9572                   you are in emulation mode or not.
9573
9574
9575
9576
9577                CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
9578                -- Adds the cublas library to the target (can be any target).  Handles
9579                   whether you are in emulation mode or not.
9580
9581
9582
9583
9584                CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
9585                                     [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
9586                -- Creates an executable "cuda_target" which is made up of the files
9587                   specified.  All of the non CUDA C files are compiled using the standard
9588                   build rules specified by CMAKE and the cuda files are compiled to object
9589                   files using nvcc and the host compiler.  In addition CUDA_INCLUDE_DIRS is
9590                   added automatically to include_directories().  Some standard CMake target
9591                   calls can be used on the target after calling this macro
9592                   (e.g. set_target_properties and target_link_libraries), but setting
9593                   properties that adjust compilation flags will not affect code compiled by
9594                   nvcc.  Such flags should be modified before calling CUDA_ADD_EXECUTABLE,
9595                   CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS.
9596
9597
9598
9599
9600                CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
9601                                  [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
9602                -- Same as CUDA_ADD_EXECUTABLE except that a library is created.
9603
9604
9605
9606
9607                CUDA_BUILD_CLEAN_TARGET()
9608                -- Creates a convience target that deletes all the dependency files
9609                   generated.  You should make clean after running this target to ensure the
9610                   dependency files get regenerated.
9611
9612
9613
9614
9615                CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
9616                              [OPTIONS ...] )
9617                -- Returns a list of generated files from the input source files to be used
9618                   with ADD_LIBRARY or ADD_EXECUTABLE.
9619
9620
9621
9622
9623                CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
9624                -- Returns a list of PTX files generated from the input source files.
9625
9626
9627
9628
9629                CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
9630                -- Sets the directories that should be passed to nvcc
9631                   (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
9632                   files.
9633
9634
9635
9636
9637                CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
9638                                 [STATIC | SHARED | MODULE] [OPTIONS ...] )
9639                -- This is where all the magic happens.  CUDA_ADD_EXECUTABLE,
9640                   CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
9641                   function under the hood.
9642
9643
9644
9645
9646                   Given the list of files (file0 file1 ... fileN) this macro generates
9647                   custom commands that generate either PTX or linkable objects (use "PTX" or
9648                   "OBJ" for the format argument to switch).  Files that don't end with .cu
9649                   or have the HEADER_FILE_ONLY property are ignored.
9650
9651
9652
9653
9654                   The arguments passed in after OPTIONS are extra command line options to
9655                   give to nvcc.  You can also specify per configuration options by
9656                   specifying the name of the configuration followed by the options.  General
9657                   options must preceed configuration specific options.  Not all
9658                   configurations need to be specified, only the ones provided will be used.
9659
9660
9661
9662
9663                      OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
9664                      DEBUG -g
9665                      RELEASE --use_fast_math
9666                      RELWITHDEBINFO --use_fast_math;-g
9667                      MINSIZEREL --use_fast_math
9668
9669
9670
9671
9672                   For certain configurations (namely VS generating object files with
9673                   CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
9674                   be produced for the given cuda file.  This is because when you add the
9675                   cuda file to Visual Studio it knows that this file produces an object file
9676                   and will link in the resulting object file automatically.
9677
9678
9679
9680
9681                   This script will also generate a separate cmake script that is used at
9682                   build time to invoke nvcc.  This is for several reasons.
9683
9684
9685
9686
9687                     1. nvcc can return negative numbers as return values which confuses
9688                     Visual Studio into thinking that the command succeeded.  The script now
9689                     checks the error codes and produces errors when there was a problem.
9690
9691
9692
9693
9694                     2. nvcc has been known to not delete incomplete results when it
9695                     encounters problems.  This confuses build systems into thinking the
9696                     target was generated when in fact an unusable file exists.  The script
9697                     now deletes the output files if there was an error.
9698
9699
9700
9701
9702                     3. By putting all the options that affect the build into a file and then
9703                     make the build rule dependent on the file, the output files will be
9704                     regenerated when the options change.
9705
9706
9707
9708
9709                   This script also looks at optional arguments STATIC, SHARED, or MODULE to
9710                   determine when to target the object compilation for a shared library.
9711                   BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
9712                   CUDA_ADD_LIBRARY.  On some systems special flags are added for building
9713                   objects intended for shared libraries.  A preprocessor macro,
9714                   <target_name>_EXPORTS is defined when a shared library compilation is
9715                   detected.
9716
9717
9718
9719
9720                   Flags passed into add_definitions with -D or /D are passed along to nvcc.
9721
9722
9723
9724
9725              The script defines the following variables:
9726
9727
9728                CUDA_VERSION_MAJOR    -- The major version of cuda as reported by nvcc.
9729                CUDA_VERSION_MINOR    -- The minor version.
9730                CUDA_VERSION
9731                CUDA_VERSION_STRING   -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
9732
9733
9734
9735
9736                CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set).
9737                CUDA_SDK_ROOT_DIR     -- Path to the CUDA SDK.  Use this to find files in the
9738                                         SDK.  This script will not directly support finding
9739                                         specific libraries or headers, as that isn't
9740                                         supported by NVIDIA.  If you want to change
9741                                         libraries when the path changes see the
9742                                         FindCUDA.cmake script for an example of how to clear
9743                                         these variables.  There are also examples of how to
9744                                         use the CUDA_SDK_ROOT_DIR to locate headers or
9745                                         libraries, if you so choose (at your own risk).
9746                CUDA_INCLUDE_DIRS     -- Include directory for cuda headers.  Added automatically
9747                                         for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
9748                CUDA_LIBRARIES        -- Cuda RT library.
9749                CUDA_CUFFT_LIBRARIES  -- Device or emulation library for the Cuda FFT
9750                                         implementation (alternative to:
9751                                         CUDA_ADD_CUFFT_TO_TARGET macro)
9752                CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
9753                                         implementation (alterative to:
9754                                         CUDA_ADD_CUBLAS_TO_TARGET macro).
9755
9756
9757
9758
9759
9760
9761
9762                James Bigler, NVIDIA Corp (nvidia.com - jbigler)
9763                Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
9764
9765
9766
9767
9768                Copyright (c) 2008 - 2009 NVIDIA Corporation.  All rights reserved.
9769
9770
9771
9772
9773                Copyright (c) 2007-2009
9774                Scientific Computing and Imaging Institute, University of Utah
9775
9776
9777
9778
9779                This code is licensed under the MIT License.  See the FindCUDA.cmake script
9780                for the text of the license.
9781
9782
9783       FindCURL
9784              Find curl
9785
9786              Find the native CURL headers and libraries.
9787
9788
9789                CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
9790                CURL_LIBRARIES    - List of libraries when using curl.
9791                CURL_FOUND        - True if curl found.
9792
9793
9794       FindCVS
9795
9796
9797              The module defines the following variables:
9798
9799
9800                 CVS_EXECUTABLE - path to cvs command line client
9801                 CVS_FOUND - true if the command line client was found
9802
9803              Example usage:
9804
9805
9806                 find_package(CVS)
9807                 if(CVS_FOUND)
9808                   message("CVS found: ${CVS_EXECUTABLE}")
9809                 endif(CVS_FOUND)
9810
9811
9812       FindCoin3D
9813              Find Coin3D (Open Inventor)
9814
9815              Coin3D is an implementation of the Open Inventor  API.  It  pro‐
9816              vides  data  structures  and  algorithms  for  3D  visualization
9817              http://www.coin3d.org/
9818
9819
9820              This module defines the following variables
9821
9822
9823                COIN3D_FOUND         - system has Coin3D - Open Inventor
9824                COIN3D_INCLUDE_DIRS  - where the Inventor include directory can be found
9825                COIN3D_LIBRARIES     - Link to this to use Coin3D
9826
9827
9828
9829
9830
9831       FindCups
9832              Try to find the Cups printing system
9833
9834              Once done this will define
9835
9836
9837                CUPS_FOUND - system has Cups
9838                CUPS_INCLUDE_DIR - the Cups include directory
9839                CUPS_LIBRARIES - Libraries needed to use Cups
9840                Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which
9841                features this function (i.e. at least 1.1.19)
9842
9843
9844       FindCurses
9845              Find the curses include file and library
9846
9847
9848
9849
9850                CURSES_FOUND - system has Curses
9851                CURSES_INCLUDE_DIR - the Curses include directory
9852                CURSES_LIBRARIES - The libraries needed to use Curses
9853                CURSES_HAVE_CURSES_H - true if curses.h is available
9854                CURSES_HAVE_NCURSES_H - true if ncurses.h is available
9855                CURSES_HAVE_NCURSES_NCURSES_H - true if ncurses/ncurses.h is available
9856                CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available
9857                CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake
9858
9859
9860
9861
9862              Set CURSES_NEED_NCURSES to TRUE before the  FIND_PACKAGE()  com‐
9863              mand if NCurses  functionality is required.
9864
9865
9866       FindCxxTest
9867              Find CxxTest
9868
9869              Find  the  CxxTest suite and declare a helper macro for creating
9870              unit tests and integrating them with CTest. For more details  on
9871              CxxTest see http://cxxtest.tigris.org
9872
9873
9874              INPUT Variables
9875
9876
9877                 CXXTEST_USE_PYTHON [deprecated since 1.3]
9878                     Only used in the case both Python & Perl
9879                     are detected on the system to control
9880                     which CxxTest code generator is used.
9881
9882
9883
9884
9885                     NOTE: In older versions of this Find Module,
9886                     this variable controlled if the Python test
9887                     generator was used instead of the Perl one,
9888                     regardless of which scripting language the
9889                     user had installed.
9890
9891
9892
9893
9894                 CXXTEST_TESTGEN_ARGS (since CMake 2.8.3)
9895                     Specify a list of options to pass to the CxxTest code
9896                     generator.  If not defined, --error-printer is
9897                     passed.
9898
9899
9900
9901
9902              OUTPUT Variables
9903
9904
9905                 CXXTEST_FOUND
9906                     True if the CxxTest framework was found
9907                 CXXTEST_INCLUDE_DIRS
9908                     Where to find the CxxTest include directory
9909                 CXXTEST_PERL_TESTGEN_EXECUTABLE
9910                     The perl-based test generator
9911                 CXXTEST_PYTHON_TESTGEN_EXECUTABLE
9912                     The python-based test generator
9913                 CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3)
9914                     The test generator that is actually used (chosen using user preferences
9915                     and interpreters found in the system)
9916                 CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
9917                     The full path to the Perl or Python executable on the system
9918
9919
9920
9921
9922              MACROS for optional use by CMake users:
9923
9924
9925                  CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
9926                     Creates a CxxTest runner and adds it to the CTest testing suite
9927                     Parameters:
9928                         test_name               The name of the test
9929                         gen_source_file         The generated source filename to be
9930                                                 generated by CxxTest
9931                         input_files_to_testgen  The list of header files containing the
9932                                                 CxxTest::TestSuite's to be included in
9933                                                 this runner
9934
9935                     #==============
9936                     Example Usage:
9937
9938
9939
9940
9941                         find_package(CxxTest)
9942                         if(CXXTEST_FOUND)
9943                             include_directories(${CXXTEST_INCLUDE_DIR})
9944                             enable_testing()
9945
9946
9947
9948
9949                             CXXTEST_ADD_TEST(unittest_foo foo_test.cc
9950                                               ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
9951                             target_link_libraries(unittest_foo foo) # as needed
9952                         endif()
9953
9954
9955
9956
9957                            This will (if CxxTest is found):
9958                            1. Invoke the testgen executable to autogenerate foo_test.cc in the
9959                               binary tree from "foo_test.h" in the current source directory.
9960                            2. Create an executable and test called unittest_foo.
9961
9962                    #=============
9963                    Example foo_test.h:
9964
9965
9966
9967
9968                        #include <cxxtest/TestSuite.h>
9969
9970                        class MyTestSuite : public CxxTest::TestSuite
9971                        {
9972                        public:
9973                           void testAddition( void )
9974                           {
9975                              TS_ASSERT( 1 + 1 > 1 );
9976                              TS_ASSERT_EQUALS( 1 + 1, 2 );
9977                           }
9978                        };
9979
9980
9981
9982
9983
9984       FindCygwin
9985              this module looks for Cygwin
9986
9987
9988
9989
9990
9991       FindDCMTK
9992              find DCMTK libraries and applications
9993
9994
9995
9996
9997
9998       FindDart
9999              Find DART
10000
10001              This  module  looks  for  the  dart  testing  software  and sets
10002              DART_ROOT to point to where it found it.
10003
10004
10005
10006       FindDevIL
10007
10008
10009              This module locates the developer's image  library.  http://ope
10010              nil.sourceforge.net/
10011
10012
10013              This module sets: IL_LIBRARIES the name of the IL library. These
10014              include the full path to the core DevIL library. This one has to
10015              be  linked  into  the application. ILU_LIBRARIES the name of the
10016              ILU library. Again, the full path. This library is  for  filters
10017              and effects, not actual loading. It doesn't have to be linked if
10018              the functionality it provides is not  used.  ILUT_LIBRARIES  the
10019              name  of  the  ILUT library. Full path. This part of the library
10020              interfaces with OpenGL. It is not strictly  needed  in  applica‐
10021              tions.  IL_INCLUDE_DIR  where to find the il.h, ilu.h and ilut.h
10022              files. IL_FOUND this is set to TRUE if all the  above  variables
10023              were  set.  This  will  be  set  to false if ILU or ILUT are not
10024              found, even if they are not needed.  In  most  systems,  if  one
10025              library  is found all the others are as well. That's the way the
10026              DevIL developers release it.
10027
10028
10029       FindDoxygen
10030              This module looks for Doxygen and the path to Graphviz's dot
10031
10032              Doxygen  is  a  documentation  generation  tool.    Please   see
10033              http://www.doxygen.org
10034
10035
10036              This module accepts the following optional variables:
10037
10038
10039                 DOXYGEN_SKIP_DOT       = If true this module will skip trying to find Dot
10040                                          (an optional component often used by Doxygen)
10041
10042
10043
10044
10045              This modules defines the following variables:
10046
10047
10048                 DOXYGEN_EXECUTABLE     = The path to the doxygen command.
10049                 DOXYGEN_FOUND          = Was Doxygen found or not?
10050
10051
10052
10053
10054                 DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
10055                 DOXYGEN_DOT_FOUND      = Was Dot found or not?
10056                 DOXYGEN_DOT_PATH       = The path to dot not including the executable
10057
10058
10059
10060
10061
10062
10063
10064
10065       FindEXPAT
10066              Find expat
10067
10068              Find the native EXPAT headers and libraries.
10069
10070
10071                EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
10072                EXPAT_LIBRARIES    - List of libraries when using expat.
10073                EXPAT_FOUND        - True if expat found.
10074
10075
10076       FindFLEX
10077              Find  flex  executable  and  provides a macro to generate custom
10078              build rules
10079
10080
10081
10082
10083              The module defines the following variables:
10084
10085
10086                FLEX_FOUND - true is flex executable is found
10087                FLEX_EXECUTABLE - the path to the flex executable
10088                FLEX_VERSION - the version of flex
10089                FLEX_LIBRARIES - The flex libraries
10090
10091
10092
10093
10094              The minimum required version of flex can be specified using  the
10095              standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13)
10096
10097
10098
10099
10100
10101              If flex is found on the system, the module provides the macro:
10102
10103
10104                FLEX_TARGET(Name FlexInput FlexOutput [COMPILE_FLAGS <string>])
10105
10106              which  creates  a  custom  command  to generate the <FlexOutput>
10107              file from the <FlexInput> file.   If   COMPILE_FLAGS  option  is
10108              specified,  the  next  parameter  is  added to the flex  command
10109              line. Name is an alias used to  get   details  of   this  custom
10110              command.  Indeed the  macro defines  the following variables:
10111
10112
10113                FLEX_${Name}_DEFINED - true is the macro ran successfully
10114                FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
10115                alias for FlexOutput
10116                FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
10117
10118
10119
10120
10121              Flex  scanners  oftenly  use  tokens  defined by Bison: the code
10122              generated by Flex  depends of the header   generated  by  Bison.
10123              This module also defines a macro:
10124
10125
10126                ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)
10127
10128              which   adds the  required dependency  between a  scanner and  a
10129              parser where  <FlexTarget>  and <BisonTarget>  are   the   first
10130              parameters  of respectively FLEX_TARGET and BISON_TARGET macros.
10131
10132
10133                ====================================================================
10134                Example:
10135
10136
10137
10138
10139                 find_package(BISON)
10140                 find_package(FLEX)
10141
10142
10143
10144
10145                 BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
10146                 FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
10147                 ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
10148
10149
10150
10151
10152                 include_directories(${CMAKE_CURRENT_BINARY_DIR})
10153                 add_executable(Foo
10154                    Foo.cc
10155                    ${BISON_MyParser_OUTPUTS}
10156                    ${FLEX_MyScanner_OUTPUTS}
10157                 )
10158                ====================================================================
10159
10160
10161       FindFLTK
10162              Find the native FLTK includes and library
10163
10164
10165
10166
10167              By default FindFLTK.cmake will search for all of the FLTK compo‐
10168              nents and add them to the FLTK_LIBRARIES variable.
10169
10170
10171                 You can limit the components which get placed in FLTK_LIBRARIES by
10172                 defining one or more of the following three options:
10173
10174
10175
10176
10177                   FLTK_SKIP_OPENGL, set to true to disable searching for opengl and
10178                                     the FLTK GL library
10179                   FLTK_SKIP_FORMS, set to true to disable searching for fltk_forms
10180                   FLTK_SKIP_IMAGES, set to true to disable searching for fltk_images
10181
10182
10183
10184
10185                   FLTK_SKIP_FLUID, set to true if the fluid binary need not be present
10186                                    at build time
10187
10188
10189
10190
10191              The following variables will be defined:
10192
10193
10194                   FLTK_FOUND, True if all components not skipped were found
10195                   FLTK_INCLUDE_DIR, where to find include files
10196                   FLTK_LIBRARIES, list of fltk libraries you should link against
10197                   FLTK_FLUID_EXECUTABLE, where to find the Fluid tool
10198                   FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command
10199
10200
10201
10202
10203              The following cache variables are assigned  but  should  not  be
10204              used. See the FLTK_LIBRARIES variable instead.
10205
10206
10207                   FLTK_BASE_LIBRARY   = the full path to fltk.lib
10208                   FLTK_GL_LIBRARY     = the full path to fltk_gl.lib
10209                   FLTK_FORMS_LIBRARY  = the full path to fltk_forms.lib
10210                   FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
10211
10212
10213       FindFLTK2
10214              Find the native FLTK2 includes and library
10215
10216              The following settings are defined
10217
10218
10219                FLTK2_FLUID_EXECUTABLE, where to find the Fluid tool
10220                FLTK2_WRAP_UI, This enables the FLTK2_WRAP_UI command
10221                FLTK2_INCLUDE_DIR, where to find include files
10222                FLTK2_LIBRARIES, list of fltk2 libraries
10223                FLTK2_FOUND, Don't use FLTK2 if false.
10224
10225              The following settings should not be used in general.
10226
10227
10228                FLTK2_BASE_LIBRARY   = the full path to fltk2.lib
10229                FLTK2_GL_LIBRARY     = the full path to fltk2_gl.lib
10230                FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib
10231
10232
10233       FindFreetype
10234              Locate FreeType library
10235
10236              This module defines
10237
10238
10239                FREETYPE_LIBRARIES, the library to link against
10240                FREETYPE_FOUND, if false, do not try to link to FREETYPE
10241                FREETYPE_INCLUDE_DIRS, where to find headers.
10242                This is the concatenation of the paths:
10243                FREETYPE_INCLUDE_DIR_ft2build
10244                FREETYPE_INCLUDE_DIR_freetype2
10245
10246
10247
10248
10249              $FREETYPE_DIR  is  an environment variable that would correspond
10250              to  the  ./configure  --prefix=$FREETYPE_DIR  used  in  building
10251              FREETYPE.
10252
10253
10254       FindGCCXML
10255              Find the GCC-XML front-end executable.
10256
10257
10258
10259
10260              This module will define the following variables:
10261
10262
10263                GCCXML - the GCC-XML front-end executable.
10264
10265
10266       FindGDAL
10267
10268
10269              Locate gdal
10270
10271
10272              This module accepts the following environment variables:
10273
10274
10275                  GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
10276
10277
10278
10279
10280              This module defines the following CMake variables:
10281
10282
10283                  GDAL_FOUND - True if libgdal is found
10284                  GDAL_LIBRARY - A variable pointing to the GDAL library
10285                  GDAL_INCLUDE_DIR - Where to find the headers
10286
10287
10288       FindGIF
10289
10290
10291              This  module  defines  GIF_LIBRARIES  -  libraries to link to in
10292              order to use GIF  GIF_FOUND,  if  false,  do  not  try  to  link
10293              GIF_INCLUDE_DIR, where to find the headers
10294
10295
10296              $GIF_DIR is an environment variable that would correspond to the
10297              ./configure --prefix=$GIF_DIR
10298
10299
10300       FindGLUT
10301              try to find glut library and include files
10302
10303                GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
10304                GLUT_LIBRARIES, the libraries to link against
10305                GLUT_FOUND, If false, do not try to use GLUT.
10306
10307              Also defined, but not for general use are:
10308
10309
10310                GLUT_glut_LIBRARY = the full path to the glut library.
10311                GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
10312                GLUT_Xi_LIBRARY   = the full path to the Xi Library.
10313
10314
10315       FindGTK
10316              try to find GTK (and glib) and GTKGLArea
10317
10318                GTK_INCLUDE_DIR   - Directories to include to use GTK
10319                GTK_LIBRARIES     - Files to link against to use GTK
10320                GTK_FOUND         - GTK was found
10321                GTK_GL_FOUND      - GTK's GL features were found
10322
10323
10324       FindGTK2
10325              FindGTK2.cmake
10326
10327              This module can find the GTK2 widget libraries  and  several  of
10328              its other optional components like gtkmm, glade, and glademm.
10329
10330
10331              NOTE:  If  you  intend  to  use version checking, CMake 2.6.2 or
10332              later is
10333
10334
10335                     required.
10336
10337
10338
10339
10340              Specify one or more of the following components as you call this
10341              find module. See example below.
10342
10343
10344                 gtk
10345                 gtkmm
10346                 glade
10347                 glademm
10348
10349
10350
10351
10352              The following variables will be defined for your use
10353
10354
10355                 GTK2_FOUND - Were all of your specified components found?
10356                 GTK2_INCLUDE_DIRS - All include directories
10357                 GTK2_LIBRARIES - All libraries
10358
10359
10360
10361
10362                 GTK2_VERSION - The version of GTK2 found (x.y.z)
10363                 GTK2_MAJOR_VERSION - The major version of GTK2
10364                 GTK2_MINOR_VERSION - The minor version of GTK2
10365                 GTK2_PATCH_VERSION - The patch version of GTK2
10366
10367
10368
10369
10370              Optional variables you can define prior to calling this module:
10371
10372
10373                 GTK2_DEBUG - Enables verbose debugging of the module
10374                 GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
10375                 GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
10376                                            search for include files
10377
10378
10379
10380
10381              ================= Example Usage:
10382
10383
10384                 Call find_package() once, here are some examples to pick from:
10385
10386
10387
10388
10389                 Require GTK 2.6 or later
10390                     find_package(GTK2 2.6 REQUIRED gtk)
10391
10392
10393
10394
10395                 Require GTK 2.10 or later and Glade
10396                     find_package(GTK2 2.10 REQUIRED gtk glade)
10397
10398
10399
10400
10401                 Search for GTK/GTKMM 2.8 or later
10402                     find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
10403
10404
10405
10406
10407                 if(GTK2_FOUND)
10408                    include_directories(${GTK2_INCLUDE_DIRS})
10409                    add_executable(mygui mygui.cc)
10410                    target_link_libraries(mygui ${GTK2_LIBRARIES})
10411                 endif()
10412
10413
10414
10415
10416
10417       FindGTest
10418              --------------------
10419
10420              Locate the Google C++ Testing Framework.
10421
10422
10423              Defines the following variables:
10424
10425
10426                 GTEST_FOUND - Found the Google Testing framework
10427                 GTEST_INCLUDE_DIRS - Include directories
10428
10429
10430
10431
10432              Also  defines  the  library variables below as normal variables.
10433              These contain debug/optimized keywords when a debugging  library
10434              is found.
10435
10436
10437                 GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
10438                 GTEST_LIBRARIES - libgtest
10439                 GTEST_MAIN_LIBRARIES - libgtest-main
10440
10441
10442
10443
10444              Accepts the following variables as input:
10445
10446
10447                 GTEST_ROOT - (as a CMake or environment variable)
10448                              The root directory of the gtest install prefix
10449
10450
10451
10452
10453                 GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
10454                                     "MD" or "MT" to enable searching a GTest build tree
10455                                     (defaults: "MD")
10456
10457
10458
10459
10460              Example Usage:
10461
10462
10463                  enable_testing()
10464                  find_package(GTest REQUIRED)
10465                  include_directories(${GTEST_INCLUDE_DIRS})
10466
10467
10468
10469
10470                  add_executable(foo foo.cc)
10471                  target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
10472
10473
10474
10475
10476                  add_test(AllTestsInFoo foo)
10477
10478
10479
10480
10481
10482
10483
10484              If you would like each Google test to show up in CTest as a test
10485              you may use the following macro. NOTE: It will  slow  down  your
10486              tests  by  running an executable for each test and test fixture.
10487              You will also have to rerun CMake after adding or removing tests
10488              or test fixtures.
10489
10490
10491              GTEST_ADD_TESTS(executable extra_args ARGN)
10492
10493
10494                  executable = The path to the test executable
10495                  extra_args = Pass a list of extra arguments to be passed to
10496                               executable enclosed in quotes (or "" for none)
10497                  ARGN =       A list of source files to search for tests & test
10498                               fixtures.
10499
10500
10501
10502
10503                Example:
10504                   set(FooTestArgs --foo 1 --bar 2)
10505                   add_executable(FooTest FooUnitTest.cc)
10506                   GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
10507
10508
10509       FindGettext
10510              Find GNU gettext tools
10511
10512              This module looks for the GNU gettext tools. This module defines
10513              the  following values:
10514
10515
10516                GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
10517                GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
10518                GETTEXT_FOUND: True if gettext has been found.
10519
10520
10521
10522
10523              Additionally it  provides  the  following  macros:  GETTEXT_CRE‐
10524              ATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
10525
10526
10527                  This will create a target "translations" which will convert the
10528                  given input po files into the binary output mo file. If the
10529                  ALL option is used, the translations will also be created when
10530                  building the default target.
10531
10532
10533       FindGit
10534
10535
10536              The module defines the following variables:
10537
10538
10539                 GIT_EXECUTABLE - path to git command line client
10540                 GIT_FOUND - true if the command line client was found
10541
10542              Example usage:
10543
10544
10545                 find_package(Git)
10546                 if(GIT_FOUND)
10547                   message("git found: ${GIT_EXECUTABLE}")
10548                 endif()
10549
10550
10551       FindGnuTLS
10552              Try to find the GNU Transport Layer Security library (gnutls)
10553
10554
10555
10556
10557              Once done this will define
10558
10559
10560                GNUTLS_FOUND - System has gnutls
10561                GNUTLS_INCLUDE_DIR - The gnutls include directory
10562                GNUTLS_LIBRARIES - The libraries needed to use gnutls
10563                GNUTLS_DEFINITIONS - Compiler switches required for using gnutls
10564
10565
10566       FindGnuplot
10567              this module looks for gnuplot
10568
10569
10570
10571
10572              Once done this will define
10573
10574
10575                GNUPLOT_FOUND - system has Gnuplot
10576                GNUPLOT_EXECUTABLE - the Gnuplot executable
10577
10578
10579       FindHDF5
10580              Find  HDF5,  a  library  for reading and writing self describing
10581              array data.
10582
10583
10584
10585
10586              This module invokes the HDF5 wrapper  compiler  that  should  be
10587              installed  alongside  HDF5.   Depending upon the HDF5 Configura‐
10588              tion, the wrapper compiler is called either h5cc or  h5pcc.   If
10589              this  succeeds,  the module will then call the compiler with the
10590              -show argument to see what flags are used when compiling an HDF5
10591              client application.
10592
10593
10594              The  module  will optionally accept the COMPONENTS argument.  If
10595              no COMPONENTS are specified, then the find module  will  default
10596              to  finding  only the HDF5 C library.  If one or more COMPONENTS
10597              are specified, the module will  attempt  to  find  the  language
10598              bindings  for  the  specified  components.   Currently, the only
10599              valid components are C and CXX.  The module does not yet support
10600              finding the Fortran bindings.  If the COMPONENTS argument is not
10601              given, the module will attempt to find only the C bindings.
10602
10603
10604              On  UNIX  systems,  this   module   will   read   the   variable
10605              HDF5_USE_STATIC_LIBRARIES  to determine whether or not to prefer
10606              a static link to a dynamic link for HDF5 and all of it's  depen‐
10607              dencies.    To   use   this   feature,   make   sure   that  the
10608              HDF5_USE_STATIC_LIBRARIES variable is set  before  the  call  to
10609              find_package.
10610
10611
10612              To  provide the module with a hint about where to find your HDF5
10613              installation, you can set the  environment  variable  HDF5_ROOT.
10614              The  Find  module will then look in this path when searching for
10615              HDF5 executables, paths, and libraries.
10616
10617
10618              In addition to finding the includes and  libraries  required  to
10619              compile  an  HDF5  client application, this module also makes an
10620              effort to find tools that come with the HDF5  distribution  that
10621              may be useful for regression testing.
10622
10623
10624              This module will define the following variables:
10625
10626
10627                HDF5_INCLUDE_DIRS - Location of the hdf5 includes
10628                HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)
10629                HDF5_DEFINITIONS - Required compiler definitions for HDF5
10630                HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings.
10631                HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
10632                HDF5_LIBRARIES - Required libraries for all requested bindings
10633                HDF5_FOUND - true if HDF5 was found on the system
10634                HDF5_LIBRARY_DIRS - the full set of library directories
10635                HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support
10636                HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler
10637                HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler
10638                HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool
10639
10640
10641       FindHSPELL
10642              Try to find Hspell
10643
10644              Once done this will define
10645
10646
10647                HSPELL_FOUND - system has Hspell
10648                HSPELL_INCLUDE_DIR - the Hspell include directory
10649                HSPELL_LIBRARIES - The libraries needed to use Hspell
10650                HSPELL_DEFINITIONS - Compiler switches required for using Hspell
10651
10652
10653
10654
10655                HSPELL_VERSION_STRING - The version of Hspell found (x.y)
10656                HSPELL_MAJOR_VERSION  - the major version of Hspell
10657                HSPELL_MINOR_VERSION  - The minor version of Hspell
10658
10659
10660       FindHTMLHelp
10661              This module looks for Microsoft HTML Help Compiler
10662
10663              It defines:
10664
10665
10666                 HTML_HELP_COMPILER     : full path to the Compiler (hhc.exe)
10667                 HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h)
10668                 HTML_HELP_LIBRARY      : full path to the library (htmlhelp.lib)
10669
10670
10671
10672
10673
10674       FindITK
10675              Find an ITK installation or build tree.
10676
10677
10678       FindImageMagick
10679              Find the ImageMagick binary suite.
10680
10681              This module will search for a set of ImageMagick tools specified
10682              as components  in  the  FIND_PACKAGE  call.  Typical  components
10683              include,  but are not limited to (future versions of ImageMagick
10684              might have additional components not listed here):
10685
10686
10687                animate
10688                compare
10689                composite
10690                conjure
10691                convert
10692                display
10693                identify
10694                import
10695                mogrify
10696                montage
10697                stream
10698
10699
10700
10701
10702              If no component is specified in the FIND_PACKAGE call,  then  it
10703              only  searches  for  the  ImageMagick executable directory. This
10704              code defines the following variables:
10705
10706
10707                ImageMagick_FOUND                  - TRUE if all components are found.
10708                ImageMagick_EXECUTABLE_DIR         - Full path to executables directory.
10709                ImageMagick_<component>_FOUND      - TRUE if <component> is found.
10710                ImageMagick_<component>_EXECUTABLE - Full path to <component> executable.
10711
10712
10713
10714
10715              There are also components for the following ImageMagick APIs:
10716
10717
10718                Magick++
10719                MagickWand
10720                MagickCore
10721
10722
10723
10724
10725              For these components the following variables are set:
10726
10727
10728                ImageMagick_FOUND                    - TRUE if all components are found.
10729                ImageMagick_INCLUDE_DIRS             - Full paths to all include dirs.
10730                ImageMagick_LIBRARIES                - Full paths to all libraries.
10731                ImageMagick_<component>_FOUND        - TRUE if <component> is found.
10732                ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs.
10733                ImageMagick_<component>_LIBRARIES    - Full path to <component> libraries.
10734
10735
10736
10737
10738              Example Usages:
10739
10740
10741                FIND_PACKAGE(ImageMagick)
10742                FIND_PACKAGE(ImageMagick COMPONENTS convert)
10743                FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display)
10744                FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
10745                FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert)
10746
10747
10748
10749
10750              Note that  the  standard  FIND_PACKAGE  features  are  supported
10751              (i.e., QUIET, REQUIRED, etc.).
10752
10753
10754       FindJNI
10755              Find JNI java libraries.
10756
10757              This  module finds if Java is installed and determines where the
10758              include files and libraries are. It  also  determines  what  the
10759              name of the library is. This code sets the following variables:
10760
10761
10762
10763                JNI_INCLUDE_DIRS      = the include dirs to use
10764                JNI_LIBRARIES         = the libraries to use
10765                JNI_FOUND             = TRUE if JNI headers and libraries were found.
10766                JAVA_AWT_LIBRARY      = the path to the jawt library
10767                JAVA_JVM_LIBRARY      = the path to the jvm library
10768                JAVA_INCLUDE_PATH     = the include path to jni.h
10769                JAVA_INCLUDE_PATH2    = the include path to jni_md.h
10770                JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
10771
10772
10773
10774
10775
10776       FindJPEG
10777              Find JPEG
10778
10779              Find the native JPEG includes and library This module defines
10780
10781
10782                JPEG_INCLUDE_DIR, where to find jpeglib.h, etc.
10783                JPEG_LIBRARIES, the libraries needed to use JPEG.
10784                JPEG_FOUND, If false, do not try to use JPEG.
10785
10786              also defined, but not for general use are
10787
10788
10789                JPEG_LIBRARY, where to find the JPEG library.
10790
10791
10792       FindJasper
10793              Try to find the Jasper JPEG2000 library
10794
10795              Once done this will define
10796
10797
10798                JASPER_FOUND - system has Jasper
10799                JASPER_INCLUDE_DIR - the Jasper include directory
10800                JASPER_LIBRARIES - The libraries needed to use Jasper
10801
10802
10803       FindJava
10804              Find Java
10805
10806              This  module finds if Java is installed and determines where the
10807              include files and libraries are. This code  sets  the  following
10808              variables:
10809
10810
10811                Java_JAVA_EXECUTABLE    = the full path to the Java runtime
10812                Java_JAVAC_EXECUTABLE   = the full path to the Java compiler
10813                Java_JAR_EXECUTABLE     = the full path to the Java archiver
10814                Java_VERSION_STRING     = Version of the package found (java version), eg. 1.6.0_12
10815                Java_VERSION_MAJOR      = The major version of the package found.
10816                Java_VERSION_MINOR      = The minor version of the package found.
10817                Java_VERSION_PATCH      = The patch version of the package found.
10818                Java_VERSION_TWEAK      = The tweak version of the package found (after '_')
10819                Java_VERSION            = This is set to: $major.$minor.$patch(.$tweak)
10820
10821
10822
10823
10824              The  minimum required version of Java can be specified using the
10825              standard CMake syntax, e.g. FIND_PACKAGE(Java 1.5)
10826
10827
10828              NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaran‐
10829              teed  to be identical. For example some java version may return:
10830              Java_VERSION_STRING  =  1.5.0_17   and   Java_VERSION          =
10831              1.5.0.17
10832
10833
10834              another  example  is  the  Java OEM, with: Java_VERSION_STRING =
10835              1.6.0-oem and Java_VERSION        = 1.6.0
10836
10837
10838              For these components the following variables are set:
10839
10840
10841                Java_FOUND                    - TRUE if all components are found.
10842                Java_INCLUDE_DIRS             - Full paths to all include dirs.
10843                Java_LIBRARIES                - Full paths to all libraries.
10844                Java_<component>_FOUND        - TRUE if <component> is found.
10845
10846
10847
10848
10849              Example Usages:
10850
10851
10852                FIND_PACKAGE(Java)
10853                FIND_PACKAGE(Java COMPONENTS Runtime)
10854                FIND_PACKAGE(Java COMPONENTS Development)
10855
10856
10857
10858
10859
10860       FindKDE3
10861              Find the KDE3 include and library dirs,  KDE  preprocessors  and
10862              define a some macros
10863
10864
10865
10866
10867              This module defines the following variables:
10868
10869
10870                KDE3_DEFINITIONS         - compiler definitions required for compiling KDE software
10871                KDE3_INCLUDE_DIR         - the KDE include directory
10872                KDE3_INCLUDE_DIRS        - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES()
10873                KDE3_LIB_DIR             - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES()
10874                QT_AND_KDECORE_LIBS      - this contains both the Qt and the kdecore library
10875                KDE3_DCOPIDL_EXECUTABLE  - the dcopidl executable
10876                KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable
10877                KDE3_KCFGC_EXECUTABLE    - the kconfig_compiler executable
10878                KDE3_FOUND               - set to TRUE if all of the above has been found
10879
10880
10881
10882
10883              The following user adjustable options are provided:
10884
10885
10886                KDE3_BUILD_TESTS - enable this to build KDE testcases
10887
10888
10889
10890
10891
10892
10893
10894              It  also  adds  the  following  macros  (from  KDE3Macros.cmake)
10895              SRCS_VAR is always the  variable  which  contains  the  list  of
10896              source files for your application or library.
10897
10898
10899              KDE3_AUTOMOC(file1 ... fileN)
10900
10901
10902                  Call this if you want to have automatic moc file handling.
10903                  This means if you include "foo.moc" in the source file foo.cpp
10904                  a moc file for the header foo.h will be created automatically.
10905                  You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES()
10906                  to exclude some files in the list from being processed.
10907
10908
10909
10910
10911              KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )
10912
10913
10914                  If you don't use the KDE3_AUTOMOC() macro, for the files
10915                  listed here moc files will be created (named "foo.moc.cpp")
10916
10917
10918
10919
10920              KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h )
10921
10922
10923                  Use this to generate DCOP skeletions from the listed headers.
10924
10925
10926
10927
10928              KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h )
10929
10930
10931                   Use this to generate DCOP stubs from the listed headers.
10932
10933
10934
10935
10936              KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui )
10937
10938
10939                  Use this to add the Qt designer ui files to your application/library.
10940
10941
10942
10943
10944              KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc )
10945
10946
10947                  Use this to add KDE kconfig compiler files to your application/library.
10948
10949
10950
10951
10952              KDE3_INSTALL_LIBTOOL_FILE(target)
10953
10954
10955                  This will create and install a simple libtool file for the given target.
10956
10957
10958
10959
10960              KDE3_ADD_EXECUTABLE(name file1 ... fileN )
10961
10962
10963                  Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future.
10964
10965
10966
10967
10968              KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )
10969
10970
10971                  Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
10972                  If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
10973                  It creates and installs an appropriate libtool la-file.
10974
10975
10976
10977
10978              KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN )
10979
10980
10981                  Create a KDE application in the form of a module loadable via kdeinit.
10982                  A library named kdeinit_<name> will be created and a small executable which links to it.
10983
10984
10985
10986
10987              The option KDE3_ENABLE_FINAL to enable all-in-one compilation is
10988              no longer supported.
10989
10990
10991
10992
10993
10994              Author: Alexander Neundorf <neundorf@kde.org>
10995
10996
10997       FindKDE4
10998
10999
11000              Find KDE4 and provide all necessary variables and macros to com‐
11001              pile software for it. It looks for KDE 4 in the following direc‐
11002              tories in the given order:
11003
11004
11005                CMAKE_INSTALL_PREFIX
11006                KDEDIRS
11007                /opt/kde4
11008
11009
11010
11011
11012              Please look in FindKDE4Internal.cmake and  KDE4Macros.cmake  for
11013              more information. They are installed with the KDE 4 libraries in
11014              $KDEDIRS/share/apps/cmake/modules/.
11015
11016
11017              Author: Alexander Neundorf <neundorf@kde.org>
11018
11019
11020       FindLAPACK
11021              Find LAPACK library
11022
11023              This module finds an installed fortran library  that  implements
11024              the       LAPACK       linear-algebra       interface       (see
11025              http://www.netlib.org/lapack/).
11026
11027
11028              The approach follows that taken for  the  autoconf  macro  file,
11029              acx_lapack.m4    (distributed    at    http://ac-archive.source
11030              forge.net/ac-archive/acx_lapack.html).
11031
11032
11033              This module sets the following variables:
11034
11035
11036                LAPACK_FOUND - set to true if a library implementing the LAPACK interface
11037                  is found
11038                LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l
11039                  and -L).
11040                LAPACK_LIBRARIES - uncached list of libraries (using full path name) to
11041                  link against to use LAPACK
11042                LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to
11043                  link against to use LAPACK95
11044                LAPACK95_FOUND - set to true if a library implementing the LAPACK f95
11045                  interface is found
11046                BLA_STATIC  if set on this determines what kind of linkage we do (static)
11047                BLA_VENDOR  if set checks only the specified vendor, if not set checks
11048                   all the possibilities
11049                BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
11050
11051              ##  List  of  vendors  (BLA_VENDOR)  valid  in  this  module   #
11052              Intel(mkl), ACML,Apple, NAS, Generic
11053
11054
11055       FindLATEX
11056              Find Latex
11057
11058              This module finds if Latex is installed and determines where the
11059              executables are. This code sets the following variables:
11060
11061
11062
11063                LATEX_COMPILER:       path to the LaTeX compiler
11064                PDFLATEX_COMPILER:    path to the PdfLaTeX compiler
11065                BIBTEX_COMPILER:      path to the BibTeX compiler
11066                MAKEINDEX_COMPILER:   path to the MakeIndex compiler
11067                DVIPS_CONVERTER:      path to the DVIPS converter
11068                PS2PDF_CONVERTER:     path to the PS2PDF converter
11069                LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
11070
11071
11072
11073
11074
11075       FindLibArchive
11076              Find libarchive library and headers
11077
11078              The module defines the following variables:
11079
11080
11081                LibArchive_FOUND        - true if libarchive was found
11082                LibArchive_INCLUDE_DIRS - include search path
11083                LibArchive_LIBRARIES    - libraries to link
11084                LibArchive_VERSION      - libarchive 3-component version number
11085
11086
11087       FindLibXml2
11088              Try to find the LibXml2 xml processing library
11089
11090              Once done this will define
11091
11092
11093                LIBXML2_FOUND - System has LibXml2
11094                LIBXML2_INCLUDE_DIR - The LibXml2 include directory
11095                LIBXML2_LIBRARIES - The libraries needed to use LibXml2
11096                LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
11097                LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
11098
11099
11100       FindLibXslt
11101              Try to find the LibXslt library
11102
11103              Once done this will define
11104
11105
11106                LIBXSLT_FOUND - system has LibXslt
11107                LIBXSLT_INCLUDE_DIR - the LibXslt include directory
11108                LIBXSLT_LIBRARIES - Link these to LibXslt
11109                LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
11110
11111
11112       FindLua50
11113
11114
11115              Locate Lua library This module defines
11116
11117
11118                LUA50_FOUND, if false, do not try to link to Lua
11119                LUA_LIBRARIES, both lua and lualib
11120                LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
11121
11122
11123
11124
11125              Note that the expected include convention is
11126
11127
11128                #include "lua.h"
11129
11130              and not
11131
11132
11133                #include <lua/lua.h>
11134
11135              This is because, the lua location is not  standardized  and  may
11136              exist in locations other than lua/
11137
11138
11139       FindLua51
11140
11141
11142              Locate Lua library This module defines
11143
11144
11145                LUA51_FOUND, if false, do not try to link to Lua
11146                LUA_LIBRARIES
11147                LUA_INCLUDE_DIR, where to find lua.h
11148
11149
11150
11151
11152              Note that the expected include convention is
11153
11154
11155                #include "lua.h"
11156
11157              and not
11158
11159
11160                #include <lua/lua.h>
11161
11162              This  is  because,  the lua location is not standardized and may
11163              exist in locations other than lua/
11164
11165
11166       FindMFC
11167              Find MFC on Windows
11168
11169              Find the native MFC - i.e. decide if an application can link  to
11170              the MFC libraries.
11171
11172
11173                MFC_FOUND - Was MFC support found
11174
11175              You don't need to include anything or link anything to use it.
11176
11177
11178       FindMPEG
11179              Find the native MPEG includes and library
11180
11181              This module defines
11182
11183
11184                MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
11185                MPEG_LIBRARIES, the libraries required to use MPEG.
11186                MPEG_FOUND, If false, do not try to use MPEG.
11187
11188              also defined, but not for general use are
11189
11190
11191                MPEG_mpeg2_LIBRARY, where to find the MPEG library.
11192                MPEG_vo_LIBRARY, where to find the vo library.
11193
11194
11195       FindMPEG2
11196              Find the native MPEG2 includes and library
11197
11198              This module defines
11199
11200
11201                MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc.
11202                MPEG2_LIBRARIES, the libraries required to use MPEG2.
11203                MPEG2_FOUND, If false, do not try to use MPEG2.
11204
11205              also defined, but not for general use are
11206
11207
11208                MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
11209                MPEG2_vo_LIBRARY, where to find the vo library.
11210
11211
11212       FindMPI
11213              Message Passing Interface (MPI) module.
11214
11215
11216
11217
11218              The  Message  Passing Interface (MPI) is a library used to write
11219              high-performance parallel applications that use message passing,
11220              and is typically deployed on a cluster. MPI is a standard inter‐
11221              face (defined by the MPI forum) for which  many  implementations
11222              are  available.  All of these implementations have somewhat dif‐
11223              ferent  compilation   approaches   (different   include   paths,
11224              libraries  to  link  against,  etc.),  and  this module tries to
11225              smooth out those differences.
11226
11227
11228              This module will set the following variables:
11229
11230
11231                 MPI_FOUND                  TRUE if we have found MPI
11232                 MPI_COMPILE_FLAGS          Compilation flags for MPI programs
11233                 MPI_INCLUDE_PATH           Include path(s) for MPI header
11234                 MPI_LINK_FLAGS             Linking flags for MPI programs
11235                 MPI_LIBRARY                First MPI library to link against (cached)
11236                 MPI_EXTRA_LIBRARY          Extra MPI libraries to link against (cached)
11237                 MPI_LIBRARIES              All libraries to link MPI programs against
11238                 MPIEXEC                    Executable for running MPI programs
11239                 MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving it the
11240                                            number of processors to run on
11241                 MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly before the
11242                                            executable to run.
11243                 MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after all other flags.
11244
11245
11246
11247
11248              This module will attempt to auto-detect these settings, first by
11249              looking  for a MPI compiler, which many MPI implementations pro‐
11250              vide as a pass-through to the native compiler  to  simplify  the
11251              compilation  of  MPI programs. The MPI compiler is stored in the
11252              cache variable MPI_COMPILER, and will attempt to look  for  com‐
11253              monly-named drivers mpic++, mpicxx, mpiCC, or mpicc. If the com‐
11254              piler driver is found and recognized, it will be used to set all
11255              of  the  module  variables.  To  skip  this  auto-detection, set
11256              MPI_LIBRARY and MPI_INCLUDE_PATH in the CMake cache.
11257
11258
11259              If no compiler driver is found or the  compiler  driver  is  not
11260              recognized,  this  module  will  then  search for common include
11261              paths and library names to try to detect MPI.
11262
11263
11264              If CMake initially finds a different MPI than was intended,  and
11265              you  want to use the MPI compiler auto-detection for a different
11266              MPI implementation, set MPI_COMPILER to the MPI compiler  driver
11267              you  want  to use (e.g., mpicxx) and then set MPI_LIBRARY to the
11268              string MPI_LIBRARY-NOTFOUND. When you re-configure,  auto-detec‐
11269              tion  of  MPI  will  run again with the newly-specified MPI_COM‐
11270              PILER.
11271
11272
11273              When using MPIEXEC to execute MPI applications, you should typi‐
11274              cally use all of the MPIEXEC flags as follows:
11275
11276
11277                 ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
11278                   ${MPIEXEC_POSTFLAGS} ARGS
11279
11280              where  PROCS is the number of processors on which to execute the
11281              program, EXECUTABLE is the MPI program, and ARGS are  the  argu‐
11282              ments to pass to the MPI program.
11283
11284
11285       FindMatlab
11286              this module looks for Matlab
11287
11288              Defines:
11289
11290
11291                MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
11292                MATLAB_LIBRARIES:   required libraries: libmex, etc
11293                MATLAB_MEX_LIBRARY: path to libmex.lib
11294                MATLAB_MX_LIBRARY:  path to libmx.lib
11295                MATLAB_ENG_LIBRARY: path to libeng.lib
11296
11297
11298       FindMotif
11299              Try to find Motif (or lesstif)
11300
11301              Once done this will define:
11302
11303
11304                MOTIF_FOUND        - system has MOTIF
11305                MOTIF_INCLUDE_DIR  - include paths to use Motif
11306                MOTIF_LIBRARIES    - Link these to use Motif
11307
11308
11309       FindOpenAL
11310
11311
11312              Locate  OpenAL  This module defines OPENAL_LIBRARY OPENAL_FOUND,
11313              if false, do not try  to  link  to  OpenAL   OPENAL_INCLUDE_DIR,
11314              where to find the headers
11315
11316
11317              $OPENALDIR  is  an environment variable that would correspond to
11318              the ./configure --prefix=$OPENALDIR used in building OpenAL.
11319
11320
11321              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
11322              module.
11323
11324
11325       FindOpenGL
11326              Try to find OpenGL
11327
11328              Once done this will define
11329
11330
11331
11332                OPENGL_FOUND        - system has OpenGL
11333                OPENGL_XMESA_FOUND  - system has XMESA
11334                OPENGL_GLU_FOUND    - system has GLU
11335                OPENGL_INCLUDE_DIR  - the GL include directory
11336                OPENGL_LIBRARIES    - Link these to use OpenGL and GLU
11337
11338
11339              If you want to use just GL you can use these values
11340
11341
11342                OPENGL_gl_LIBRARY   - Path to OpenGL Library
11343                OPENGL_glu_LIBRARY  - Path to GLU Library
11344
11345
11346              On  OSX  default to using the framework version of opengl People
11347              will have to change the cache values of OPENGL_glu_LIBRARY   and
11348              OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
11349
11350
11351       FindOpenMP
11352              Finds OpenMP support
11353
11354              This  module can be used to detect OpenMP support in a compiler.
11355              If the compiler supports OpenMP, the flags required  to  compile
11356              with openmp support are set.
11357
11358
11359              The following variables are set:
11360
11361
11362                 OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
11363                 OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
11364                 OPENMP_FOUND - true if openmp is detected
11365
11366
11367
11368
11369              Supported       compilers       can       be       found      at
11370              http://openmp.org/wp/openmp-compilers/
11371
11372
11373       FindOpenSSL
11374              Try to find the OpenSSL encryption library
11375
11376              Once done this will define
11377
11378
11379                OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
11380
11381
11382
11383
11384              Read-Only variables:
11385
11386
11387                OPENSSL_FOUND - system has the OpenSSL library
11388                OPENSSL_INCLUDE_DIR - the OpenSSL include directory
11389                OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
11390
11391
11392       FindOpenSceneGraph
11393              Find OpenSceneGraph
11394
11395              This module searches for the OpenSceneGraph core  "osg"  library
11396              as  well  as  OpenThreads,  and  whatever  additional COMPONENTS
11397              (nodekits) that you specify.
11398
11399
11400                  See http://www.openscenegraph.org
11401
11402
11403
11404
11405              NOTE: To use this module effectively  you  must  either  require
11406              CMake  >=  2.6.3  with  cmake_minimum_required(VERSION 2.6.3) or
11407              download   and   place   FindOpenThreads.cmake,    Findosg_func‐
11408              tions.cmake,  Findosg.cmake, and Find<etc>.cmake files into your
11409              CMAKE_MODULE_PATH.
11410
11411
11412              ==================================
11413
11414
11415              This module accepts the following variables (note mixed case)
11416
11417
11418                  OpenSceneGraph_DEBUG - Enable debugging output
11419
11420
11421
11422
11423                  OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced
11424                                                    automatically
11425
11426
11427
11428
11429              The following environment variables are also respected for find‐
11430              ing  the OSG and it's various components.  CMAKE_PREFIX_PATH can
11431              also be used for this (see find_library() CMake documentation).
11432
11433
11434                  <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file)
11435                  OSG_DIR
11436                  OSGDIR
11437                  OSG_ROOT
11438
11439
11440
11441
11442              This module defines the following output variables:
11443
11444
11445                  OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found?
11446
11447
11448
11449
11450                  OPENSCENEGRAPH_VERSION - The version of the OSG which was found
11451
11452
11453
11454
11455                  OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers
11456
11457
11458
11459
11460                  OPENSCENEGRAPH_LIBRARIES - The OSG libraries
11461
11462
11463
11464
11465              ================================== Example Usage:
11466
11467
11468                find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil)
11469                    # libOpenThreads & libosg automatically searched
11470                include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
11471
11472
11473
11474
11475                add_executable(foo foo.cc)
11476                target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})
11477
11478
11479
11480
11481
11482       FindOpenThreads
11483
11484
11485              OpenThreads is a C++ based threading library. Its largest  user‐
11486              base   seems  to  OpenSceneGraph  so  you  might notice I accept
11487              OSGDIR as an environment path. I consider this part of the Find‐
11488              osg*  suite used to find OpenSceneGraph  components. Each compo‐
11489              nent is separate and you must opt in to each module.
11490
11491
11492              Locate  OpenThreads  This  module  defines   OPENTHREADS_LIBRARY
11493              OPENTHREADS_FOUND,  if  false, do not try to link to OpenThreads
11494              OPENTHREADS_INCLUDE_DIR, where to find the headers
11495
11496
11497              $OPENTHREADS_DIR is an environment variable  that  would  corre‐
11498              spond  to  the  ./configure  --prefix=$OPENTHREADS_DIR  used  in
11499              building osg.
11500
11501
11502              Created by Eric Wing.
11503
11504
11505       FindPHP4
11506              Find PHP4
11507
11508              This module finds if PHP4 is installed and determines where  the
11509              include  files  and  libraries  are. It also determines what the
11510              name of the library is. This code sets the following variables:
11511
11512
11513                PHP4_INCLUDE_PATH       = path to where php.h can be found
11514                PHP4_EXECUTABLE         = full path to the php4 binary
11515
11516
11517
11518
11519
11520       FindPNG
11521              Find the native PNG includes and library
11522
11523
11524
11525
11526              This module defines
11527
11528
11529                PNG_INCLUDE_DIR, where to find png.h, etc.
11530                PNG_LIBRARIES, the libraries to link against to use PNG.
11531                PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
11532                PNG_FOUND, If false, do not try to use PNG.
11533
11534              also defined, but not for general use are
11535
11536
11537                PNG_LIBRARY, where to find the PNG library.
11538
11539              None of the above will be defined unles zlib can be  found.  PNG
11540              depends on Zlib
11541
11542
11543       FindPackageHandleStandardArgs
11544
11545
11546              FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
11547
11548
11549              This  function  is  intended to be used in FindXXX.cmake modules
11550              files. It handles the REQUIRED, QUIET and version-related  argu‐
11551              ments    to   FIND_PACKAGE().   It   also   sets   the   <UPPER‐
11552              CASED_NAME>_FOUND variable. The package is considered  found  if
11553              all variables <var1>... listed contain valid results, e.g. valid
11554              filepaths.
11555
11556
11557              There are two modes of this function. The first argument in both
11558              modes  is  the  name  of  the Find-module where it is called (in
11559              original casing).
11560
11561
11562              The first simple mode looks like this:
11563
11564
11565                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
11566
11567              If the variables <var1> to <varN> are all  valid,  then  <UPPER‐
11568              CASED_NAME>_FOUND  will  be set to TRUE. If DEFAULT_MSG is given
11569              as second argument, then the function will generate itself  use‐
11570              ful  success  and  error  messages. You can also supply a custom
11571              error message for the failure case. This is not recommended.
11572
11573
11574              The second mode is  more  powerful  and  also  supports  version
11575              checking:
11576
11577
11578                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
11579                                                         [VERSION_VAR   <versionvar>
11580                                                         [CONFIG_MODE]
11581                                                         [FAIL_MESSAGE "Custom failure message"] )
11582
11583
11584
11585
11586              As  above,  if  <var1>  through  <varN>  are  all valid, <UPPER‐
11587              CASED_NAME>_FOUND will be set to TRUE. After  REQUIRED_VARS  the
11588              variables  which  are required for this package are listed. Fol‐
11589              lowing VERSION_VAR the name of the  variable  can  be  specified
11590              which  holds the version of the package which has been found. If
11591              this is done, this version will be checked against  the  (poten‐
11592              tially)  specified  required  version used in the find_package()
11593              call. The EXACT keyword is also handled.  The  default  messages
11594              include  information  about the required version and the version
11595              which has been actually found, both if the version is ok or not.
11596              Use  the  option  CONFIG_MODE  if your FindXXX.cmake module is a
11597              wrapper for a find_package(... NO_MODULE) call, in this case all
11598              the  information  provided  by the config-mode of find_package()
11599              will be evaluated automatically. Via FAIL_MESSAGE a custom fail‐
11600              ure  message  can be specified, if this is not used, the default
11601              message will be displayed.
11602
11603
11604              Example for mode 1:
11605
11606
11607                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
11608
11609
11610
11611
11612              LibXml2 is considered to be found, if both  LIBXML2_LIBRARY  and
11613              LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to
11614              TRUE. If it is not found and REQUIRED was used,  it  fails  with
11615              FATAL_ERROR, independent whether QUIET was used or not. If it is
11616              found, success  will  be  reported,  including  the  content  of
11617              <var1>.  On  repeated  Cmake  runs,  the  same  message won't be
11618              printed again.
11619
11620
11621              Example for mode 2:
11622
11623
11624                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
11625                                                           VERSION_VAR BISON_VERSION)
11626
11627              In this case, BISON is considered to be found if the variable(s)
11628              listed  after  REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE
11629              in this case. Also the version of BISON will be checked by using
11630              the version contained in BISON_VERSION. Since no FAIL_MESSAGE is
11631              given, the default messages will be printed.
11632
11633
11634              Another example for mode 2:
11635
11636
11637                  FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
11638                  FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
11639
11640              In this case,  FindAutmoc4.cmake  wraps  a  call  to  FIND_PACK‐
11641              AGE(Automoc4  NO_MODULE) and adds an additional search directory
11642              for automoc4. The following  FIND_PACKAGE_HANDLE_STANDARD_ARGS()
11643              call produces a proper success/error message.
11644
11645
11646       FindPackageMessage
11647
11648
11649              FIND_PACKAGE_MESSAGE(<name>  "message  for  user"  "find  result
11650              details")
11651
11652
11653              This macro is intended  to  be  used  in  FindXXX.cmake  modules
11654              files. It will print a message once for each unique find result.
11655              This is useful for telling the user where a package  was  found.
11656              The  first argument specifies the name (XXX) of the package. The
11657              second argument specifies the  message  to  display.  The  third
11658              argument  lists  details  about  the find result so that if they
11659              change the message will be displayed again. The macro also obeys
11660              the QUIET argument to the find_package command.
11661
11662
11663              Example:
11664
11665
11666                IF(X11_FOUND)
11667                  FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
11668                    "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
11669                ELSE(X11_FOUND)
11670                 ...
11671                ENDIF(X11_FOUND)
11672
11673
11674       FindPerl
11675              Find perl
11676
11677              this module looks for Perl
11678
11679
11680                PERL_EXECUTABLE - the full path to perl
11681                PERL_FOUND      - If false, don't attempt to use perl.
11682
11683
11684       FindPerlLibs
11685              Find Perl libraries
11686
11687              This  module finds if PERL is installed and determines where the
11688              include files and libraries are. It  also  determines  what  the
11689              name of the library is. This code sets the following variables:
11690
11691
11692                PERLLIBS_FOUND    = True if perl.h & libperl were found
11693                PERL_INCLUDE_PATH = path to where perl.h is found
11694                PERL_LIBRARY      = path to libperl
11695                PERL_EXECUTABLE   = full path to the perl binary
11696
11697
11698
11699
11700              The  minimum required version of Perl can be specified using the
11701              standard syntax, e.g. FIND_PACKAGE(PerlLibs 6.0)
11702
11703
11704                The following variables are also available if needed
11705                (introduced after CMake 2.6.4)
11706
11707
11708
11709
11710                PERL_SITESEARCH    = path to the sitesearch install dir
11711                PERL_SITELIB       = path to the sitelib install directory
11712                PERL_VENDORARCH    = path to the vendor arch install directory
11713                PERL_VENDORLIB     = path to the vendor lib install directory
11714                PERL_ARCHLIB       = path to the arch lib install directory
11715                PERL_PRIVLIB       = path to the priv lib install directory
11716                PERL_EXTRA_C_FLAGS = Compilation flags used to build perl
11717
11718
11719
11720
11721
11722       FindPhysFS
11723
11724
11725              Locate PhysFS library This module  defines  PHYSFS_LIBRARY,  the
11726              name  of  the library to link against PHYSFS_FOUND, if false, do
11727              not try to link to  PHYSFS  PHYSFS_INCLUDE_DIR,  where  to  find
11728              physfs.h
11729
11730
11731              $PHYSFSDIR  is  an environment variable that would correspond to
11732              the ./configure --prefix=$PHYSFSDIR used in building PHYSFS.
11733
11734
11735              Created by Eric Wing.
11736
11737
11738       FindPike
11739              Find Pike
11740
11741              This module finds if PIKE is installed and determines where  the
11742              include  files  and  libraries  are. It also determines what the
11743              name of the library is. This code sets the following variables:
11744
11745
11746                PIKE_INCLUDE_PATH       = path to where program.h is found
11747                PIKE_EXECUTABLE         = full path to the pike binary
11748
11749
11750
11751
11752
11753       FindPkgConfig
11754              a pkg-config module for CMake
11755
11756
11757
11758
11759              Usage:
11760
11761
11762                 pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
11763                   checks for all the given modules
11764
11765
11766
11767
11768                 pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
11769                   checks for given modules and uses the first working one
11770
11771
11772
11773
11774              When the 'REQUIRED' argument was set, macros will fail  with  an
11775              error when module(s) could not be found
11776
11777
11778              When  the  'QUIET'  argument  is set, no status messages will be
11779              printed.
11780
11781
11782              It sets the following variables:
11783
11784
11785                 PKG_CONFIG_FOUND         ... true if pkg-config works on the system
11786                 PKG_CONFIG_EXECUTABLE    ... pathname of the pkg-config program
11787                 <PREFIX>_FOUND           ... set to 1 if module(s) exist
11788
11789
11790
11791
11792              For the following variables two sets of values exist; first  one
11793              is  the common one and has the given PREFIX. The second set con‐
11794              tains flags which are given out when pkgconfig was  called  with
11795              the '--static' option.
11796
11797
11798                 <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
11799                 <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
11800                 <XPREFIX>_LDFLAGS        ... all required linker flags
11801                 <XPREFIX>_LDFLAGS_OTHER  ... all other linker flags
11802                 <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
11803                 <XPREFIX>_CFLAGS         ... all required cflags
11804                 <XPREFIX>_CFLAGS_OTHER   ... the other compiler flags
11805
11806
11807
11808
11809                 <XPREFIX> = <PREFIX>        for common case
11810                 <XPREFIX> = <PREFIX>_STATIC for static linking
11811
11812
11813
11814
11815              There  are  some  special  variables whose prefix depends on the
11816              count of given modules. When there is only one module,  <PREFIX>
11817              stays  unchanged.  When  there  are multiple modules, the prefix
11818              will be changed to <PREFIX>_<MODNAME>:
11819
11820
11821                 <XPREFIX>_VERSION    ... version of the module
11822                 <XPREFIX>_PREFIX     ... prefix-directory of the module
11823                 <XPREFIX>_INCLUDEDIR ... include-dir of the module
11824                 <XPREFIX>_LIBDIR     ... lib-dir of the module
11825
11826
11827
11828
11829                 <XPREFIX> = <PREFIX>  when |MODULES| == 1, else
11830                 <XPREFIX> = <PREFIX>_<MODNAME>
11831
11832
11833
11834
11835              A <MODULE> parameter can have the following formats:
11836
11837
11838                 {MODNAME}            ... matches any version
11839                 {MODNAME}>={VERSION} ... at least version <VERSION> is required
11840                 {MODNAME}={VERSION}  ... exactly version <VERSION> is required
11841                 {MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
11842
11843
11844
11845
11846              Examples
11847
11848
11849                 pkg_check_modules (GLIB2   glib-2.0)
11850
11851
11852
11853
11854                 pkg_check_modules (GLIB2   glib-2.0>=2.10)
11855                   requires at least version 2.10 of glib2 and defines e.g.
11856                     GLIB2_VERSION=2.10.3
11857
11858
11859
11860
11861                 pkg_check_modules (FOO     glib-2.0>=2.10 gtk+-2.0)
11862                   requires both glib2 and gtk2, and defines e.g.
11863                     FOO_glib-2.0_VERSION=2.10.3
11864                     FOO_gtk+-2.0_VERSION=2.8.20
11865
11866
11867
11868
11869                 pkg_check_modules (XRENDER REQUIRED xrender)
11870                   defines e.g.:
11871                     XRENDER_LIBRARIES=Xrender;X11
11872                     XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp
11873
11874
11875
11876
11877                 pkg_search_module (BAR     libxml-2.0 libxml2 libxml>=2)
11878
11879
11880       FindPostgreSQL
11881              --------------------------------------------------------------------------
11882
11883              Find the PostgreSQL installation.
11884
11885
11886              Usage: In your CMakeLists.txt file do something like this: ... #
11887              PostgreSQL FIND_PACKAGE(PostgreSQL) ... if( PostgreSQL_FOUND )
11888
11889
11890                 include_directories(${PostgreSQL_INCLUDE_DIRS})
11891                 link_directories(${PostgreSQL_LIBRARY_DIRS})
11892
11893              endif(  PostgreSQL_FOUND  )  ...  Remember  to  include  ${Post‐
11894              greSQL_LIBRARIES} in the target_link_libraries() statement.
11895
11896
11897
11898
11899
11900              In Windows, we make the assumption that, if the PostgreSQL files
11901              are  installed,  the  default  directory  will   be   C:\Program
11902              Files\PostgreSQL.
11903
11904
11905
11906       FindProducer
11907
11908
11909              Though  Producer isn't directly part of OpenSceneGraph, its pri‐
11910              mary user is OSG so I consider this part of the  Findosg*  suite
11911              used  to  find   OpenSceneGraph components. You'll notice that I
11912              accept OSGDIR as an environment path.
11913
11914
11915              Each component is separate and you must opt in to  each  module.
11916              You must  also opt into OpenGL (and OpenThreads?) as these  mod‐
11917              ules won't do it for you. This is to allow you control over your
11918              own   system  piece by piece in case you need to opt out of cer‐
11919              tain components or change the Find  behavior  for  a  particular
11920              module  (perhaps  because  the  default  FindOpenGL.cmake module
11921              doesn't work with your system as an example). If you want to use
11922              a more convenient module that includes everything, use the Find‐
11923              OpenSceneGraph.cmake instead of the Findosg*.cmake modules.
11924
11925
11926              Locate  Producer  This  module  defines  PRODUCER_LIBRARY   PRO‐
11927              DUCER_FOUND,  if  false,  do  not  try  to link to Producer PRO‐
11928              DUCER_INCLUDE_DIR, where to find the headers
11929
11930
11931              $PRODUCER_DIR is an environment variable that  would  correspond
11932              to the ./configure --prefix=$PRODUCER_DIR used in building osg.
11933
11934
11935              Created by Eric Wing.
11936
11937
11938       FindProtobuf
11939
11940
11941              Locate  and  configure  the  Google  Protocol  Buffers  library.
11942              Defines the following variables:
11943
11944
11945                 PROTOBUF_FOUND - Found the Google Protocol Buffers library
11946                 PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers
11947                 PROTOBUF_LIBRARIES - The protobuf library
11948
11949
11950
11951
11952              The following cache variables are also defined:
11953
11954
11955                 PROTOBUF_LIBRARY - The protobuf library
11956                 PROTOBUF_PROTOC_LIBRARY   - The protoc library
11957                 PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers
11958                 PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler
11959
11960
11961
11962
11963                ====================================================================
11964                Example:
11965
11966
11967
11968
11969                 find_package(Protobuf REQUIRED)
11970                 include_directories(${PROTOBUF_INCLUDE_DIRS})
11971
11972
11973
11974
11975                 include_directories(${CMAKE_CURRENT_BINARY_DIR})
11976                 PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
11977                 add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
11978                 target_link_libraries(bar ${PROTOBUF_LIBRARY})
11979
11980
11981
11982
11983              NOTE: You may need to link against pthreads,  depending  on  the
11984              platform.
11985
11986
11987                ====================================================================
11988
11989
11990
11991
11992              PROTOBUF_GENERATE_CPP (public function)
11993
11994
11995                 SRCS = Variable to define with autogenerated
11996                        source files
11997                 HDRS = Variable to define with autogenerated
11998                        header files
11999                 ARGN = proto files
12000
12001
12002
12003
12004                ====================================================================
12005
12006
12007       FindPythonInterp
12008              Find python interpreter
12009
12010              This  module finds if Python interpreter is installed and deter‐
12011              mines where the executables are. This code  sets  the  following
12012              variables:
12013
12014
12015                PYTHONINTERP_FOUND         - Was the Python executable found
12016                PYTHON_EXECUTABLE          - path to the Python interpreter
12017                Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
12018
12019
12020
12021
12022
12023       FindPythonLibs
12024              Find python libraries
12025
12026              This  module  finds  if Python is installed and determines where
12027              the include files and libraries are. It also determines what the
12028              name of the library is. This code sets the following variables:
12029
12030
12031                PYTHONLIBS_FOUND           - have the Python libs been found
12032                PYTHON_LIBRARIES           - path to the python library
12033                PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
12034                PYTHON_INCLUDE_DIRS        - path to where Python.h is found
12035                PYTHON_DEBUG_LIBRARIES     - path to the debug library
12036                Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
12037
12038
12039       FindQt Searches for all installed versions of QT.
12040
12041              This  should only be used if your project can work with multiple
12042              versions of QT.  If not, you should just directly use FindQt4 or
12043              FindQt3.  If  multiple  versions of QT are found on the machine,
12044              then The user must set the option DESIRED_QT_VERSION to the ver‐
12045              sion  they  want  to use.  If only one version of qt is found on
12046              the machine, then the DESIRED_QT_VERSION is set to that  version
12047              and  the   matching  FindQt3 or FindQt4 module is included. Once
12048              the user sets DESIRED_QT_VERSION, then the  FindQt3  or  FindQt4
12049              module is included.
12050
12051
12052                QT_REQUIRED if this is set to TRUE then if CMake can
12053                            not find QT4 or QT3 an error is raised
12054                            and a message is sent to the user.
12055
12056
12057
12058
12059                DESIRED_QT_VERSION OPTION is created
12060                QT4_INSTALLED is set to TRUE if qt4 is found.
12061                QT3_INSTALLED is set to TRUE if qt3 is found.
12062
12063
12064       FindQt3
12065              Locate Qt include paths and libraries
12066
12067              This module defines:
12068
12069
12070                QT_INCLUDE_DIR - where to find qt.h, etc.
12071                QT_LIBRARIES   - the libraries to link against to use Qt.
12072                QT_DEFINITIONS - definitions to use when
12073                                 compiling code that uses Qt.
12074                QT_FOUND       - If false, don't try to use Qt.
12075
12076
12077
12078
12079              If  you need the multithreaded version of Qt, set QT_MT_REQUIRED
12080              to TRUE
12081
12082
12083              Also defined, but not for general use are:
12084
12085
12086                QT_MOC_EXECUTABLE, where to find the moc tool.
12087                QT_UIC_EXECUTABLE, where to find the uic tool.
12088                QT_QT_LIBRARY, where to find the Qt library.
12089                QT_QTMAIN_LIBRARY, where to find the qtmain
12090                 library. This is only required by Qt3 on Windows.
12091
12092
12093       FindQt4
12094              Find QT 4
12095
12096              This module can be used to find Qt4. The most important issue is
12097              that  the Qt4 qmake is available via the system path. This qmake
12098              is then used to detect basically everything  else.  This  module
12099              defines  a  number  of  key  variables and macros.  The variable
12100              QT_USE_FILE is set which is the path to a CMake file that can be
12101              included   to  compile Qt 4 applications and libraries.  It sets
12102              up the compilation environment  for  include  directories,  pre‐
12103              processor defines and populates a QT_LIBRARIES variable.
12104
12105
12106              Typical usage could be something like:
12107
12108
12109                 find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
12110                 include(${QT_USE_FILE})
12111                 add_executable(myexe main.cpp)
12112                 target_link_libraries(myexe ${QT_LIBRARIES})
12113
12114
12115
12116
12117              The minimum required version can be specified using the standard
12118              find_package()-syntax (see example  above).   For  compatibility
12119              with  older versions of FindQt4.cmake it is also possible to set
12120              the variable QT_MIN_VERSION to the minimum required  version  of
12121              Qt4  before  the   find_package(Qt4) command.  If both are used,
12122              the version used in the find_package() command overrides the one
12123              from QT_MIN_VERSION.
12124
12125
12126              When  using  the  components  argument, QT_USE_QT* variables are
12127              automatically set for the QT_USE_FILE to pick up.  If one wishes
12128              to manually set them, the available ones to set include:
12129
12130
12131                                  QT_DONT_USE_QTCORE
12132                                  QT_DONT_USE_QTGUI
12133                                  QT_USE_QT3SUPPORT
12134                                  QT_USE_QTASSISTANT
12135                                  QT_USE_QAXCONTAINER
12136                                  QT_USE_QAXSERVER
12137                                  QT_USE_QTDESIGNER
12138                                  QT_USE_QTMOTIF
12139                                  QT_USE_QTMAIN
12140                                  QT_USE_QTMULTIMEDIA
12141                                  QT_USE_QTNETWORK
12142                                  QT_USE_QTNSPLUGIN
12143                                  QT_USE_QTOPENGL
12144                                  QT_USE_QTSQL
12145                                  QT_USE_QTXML
12146                                  QT_USE_QTSVG
12147                                  QT_USE_QTTEST
12148                                  QT_USE_QTUITOOLS
12149                                  QT_USE_QTDBUS
12150                                  QT_USE_QTSCRIPT
12151                                  QT_USE_QTASSISTANTCLIENT
12152                                  QT_USE_QTHELP
12153                                  QT_USE_QTWEBKIT
12154                                  QT_USE_QTXMLPATTERNS
12155                                  QT_USE_PHONON
12156                                  QT_USE_QTSCRIPTTOOLS
12157                                  QT_USE_QTDECLARATIVE
12158
12159
12160
12161
12162                QT_USE_IMPORTED_TARGETS
12163                      If this variable is set to TRUE, FindQt4.cmake will create imported
12164                      library targets for the various Qt libraries and set the
12165                      library variables like QT_QTCORE_LIBRARY to point at these imported
12166                      targets instead of the library file on disk. This provides much better
12167                      handling of the release and debug versions of the Qt libraries and is
12168                     also always backwards compatible, except for the case that dependencies
12169                     of libraries are exported, these will then also list the names of the
12170                     imported targets as dependency and not the file location on disk. This
12171                     is much more flexible, but requires that FindQt4.cmake is executed before
12172                     such an exported dependency file is processed.
12173
12174
12175
12176
12177              There  are also some files that need processing by some Qt tools
12178              such as moc and uic.  Listed below are macros that may  be  used
12179              to process those files.
12180
12181
12182
12183                macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
12184                      create moc code from a list of files containing Qt class with
12185                      the Q_OBJECT declaration.  Per-direcotry preprocessor definitions
12186                      are also added.  Options may be given to moc, such as those found
12187                      when executing "moc -help".
12188
12189
12190
12191
12192                macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
12193                      create code from a list of Qt designer ui files.
12194                      Options may be given to uic, such as those found
12195                      when executing "uic -help"
12196
12197
12198
12199
12200                macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
12201                      create code from a list of Qt resource files.
12202                      Options may be given to rcc, such as those found
12203                      when executing "rcc -help"
12204
12205
12206
12207
12208                macro QT4_GENERATE_MOC(inputfile outputfile )
12209                      creates a rule to run moc on infile and create outfile.
12210                      Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
12211                      because you need a custom filename for the moc file or something similar.
12212
12213
12214
12215
12216                macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
12217                      This macro is still experimental.
12218                      It can be used to have moc automatically handled.
12219                      So if you have the files foo.h and foo.cpp, and in foo.h a
12220                      a class uses the Q_OBJECT macro, moc has to run on it. If you don't
12221                      want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
12222                      #include "foo.moc"
12223                      in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
12224                      scan all listed files at cmake-time for such included moc files and if it finds
12225                      them cause a rule to be generated to run moc at build time on the
12226                      accompanying header file foo.h.
12227                      If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
12228
12229
12230
12231
12232                macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
12233                      create a the interface header and implementation files with the
12234                      given basename from the given interface xml file and add it to
12235                      the list of sources
12236
12237
12238
12239
12240                macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
12241                      create the interface header and implementation files
12242                      for all listed interface xml files
12243                      the name will be automatically determined from the name of the xml file
12244
12245
12246
12247
12248                macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
12249                      create a dbus adaptor (header and implementation file) from the xml file
12250                      describing the interface, and add it to the list of sources. The adaptor
12251                      forwards the calls to a parent class, defined in parentheader and named
12252                      parentclassname. The name of the generated files will be
12253                      <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
12254                      If <classname> is provided, then it will be used as the classname of the
12255                      adaptor itself.
12256
12257
12258
12259
12260                macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
12261                      generate the xml interface file from the given header.
12262                      If the optional argument interfacename is omitted, the name of the
12263                      interface file is constructed from the basename of the header with
12264                      the suffix .xml appended.
12265                      Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
12266
12267
12268
12269
12270                macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ...
12271                                              ts_files ... OPTIONS ...)
12272                      out: qm_files
12273                      in:  directories sources ts_files
12274                      options: flags to pass to lupdate, such as -extensions to specify
12275                      extensions for a directory scan.
12276                      generates commands to create .ts (vie lupdate) and .qm
12277                      (via lrelease) - files from directories and/or sources. The ts files are
12278                      created and/or updated in the source tree (unless given with full paths).
12279                      The qm files are generated in the build tree.
12280                      Updating the translations can be done by adding the qm_files
12281                      to the source list of your library/executable, so they are
12282                      always updated, or by adding a custom target to control when
12283                      they get updated/generated.
12284
12285
12286
12287
12288                macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
12289                      out: qm_files
12290                      in:  ts_files
12291                      generates commands to create .qm from .ts - files. The generated
12292                      filenames can be found in qm_files. The ts_files
12293                      must exists and are not updated in any way.
12294
12295
12296
12297
12298
12299
12300
12301                Below is a detailed list of variables that FindQt4.cmake sets.
12302                QT_FOUND         If false, don't try to use Qt.
12303                QT4_FOUND        If false, don't try to use Qt 4.
12304
12305
12306
12307
12308                QT_VERSION_MAJOR The major version of Qt found.
12309                QT_VERSION_MINOR The minor version of Qt found.
12310                QT_VERSION_PATCH The patch version of Qt found.
12311
12312
12313
12314
12315                QT_EDITION               Set to the edition of Qt (i.e. DesktopLight)
12316                QT_EDITION_DESKTOPLIGHT  True if QT_EDITION == DesktopLight
12317                QT_QTCORE_FOUND          True if QtCore was found.
12318                QT_QTGUI_FOUND           True if QtGui was found.
12319                QT_QT3SUPPORT_FOUND      True if Qt3Support was found.
12320                QT_QTASSISTANT_FOUND     True if QtAssistant was found.
12321                QT_QTASSISTANTCLIENT_FOUND  True if QtAssistantClient was found.
12322                QT_QAXCONTAINER_FOUND    True if QAxContainer was found (Windows only).
12323                QT_QAXSERVER_FOUND       True if QAxServer was found (Windows only).
12324                QT_QTDBUS_FOUND          True if QtDBus was found.
12325                QT_QTDESIGNER_FOUND      True if QtDesigner was found.
12326                QT_QTDESIGNERCOMPONENTS  True if QtDesignerComponents was found.
12327                QT_QTHELP_FOUND          True if QtHelp was found.
12328                QT_QTMOTIF_FOUND         True if QtMotif was found.
12329                QT_QTMULTIMEDIA_FOUND    True if QtMultimedia was found (since Qt 4.6.0).
12330                QT_QTNETWORK_FOUND       True if QtNetwork was found.
12331                QT_QTNSPLUGIN_FOUND      True if QtNsPlugin was found.
12332                QT_QTOPENGL_FOUND        True if QtOpenGL was found.
12333                QT_QTSQL_FOUND           True if QtSql was found.
12334                QT_QTSVG_FOUND           True if QtSvg was found.
12335                QT_QTSCRIPT_FOUND        True if QtScript was found.
12336                QT_QTSCRIPTTOOLS_FOUND   True if QtScriptTools was found.
12337                QT_QTTEST_FOUND          True if QtTest was found.
12338                QT_QTUITOOLS_FOUND       True if QtUiTools was found.
12339                QT_QTWEBKIT_FOUND        True if QtWebKit was found.
12340                QT_QTXML_FOUND           True if QtXml was found.
12341                QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
12342                QT_PHONON_FOUND          True if phonon was found.
12343                QT_QTDECLARATIVE_FOUND   True if QtDeclarative was found.
12344
12345
12346
12347
12348                QT_MAC_USE_COCOA    For Mac OS X, its whether Cocoa or Carbon is used.
12349                                    In general, this should not be used, but its useful
12350                                    when having platform specific code.
12351
12352
12353
12354
12355                QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
12356                                 You do not need to use this if you include QT_USE_FILE.
12357                                 The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
12358                                 to fit your current build type.  Those are not contained
12359                                 in QT_DEFINITIONS.
12360
12361                QT_INCLUDES      List of paths to all include directories of
12362                                 Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
12363                                 always in this variable even if NOTFOUND,
12364                                 all other INCLUDE_DIRS are
12365                                 only added if they are found.
12366                                 You do not need to use this if you include QT_USE_FILE.
12367
12368
12369
12370
12371
12372                Include directories for the Qt modules are listed here.
12373                You do not need to use these variables if you include QT_USE_FILE.
12374
12375
12376
12377
12378                QT_INCLUDE_DIR              Path to "include" of Qt4
12379                QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support"
12380                QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant"
12381                QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
12382                QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
12383                QT_QAXSERVER_INCLUDE_DIR    Path to "include/ActiveQt" (Windows only)
12384                QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"
12385                QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus"
12386                QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner"
12387                QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
12388                QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui"
12389                QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
12390                QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif"
12391                QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia"
12392                QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork"
12393                QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin"
12394                QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL"
12395                QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
12396                QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql"
12397                QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
12398                QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
12399                QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
12400                QT_QTXML_INCLUDE_DIR        Path to "include/QtXml"
12401                QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
12402                QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
12403                QT_QTSCRIPTTOOLS_INCLUDE_DIR       Path to "include/QtScriptTools"
12404                QT_QTDECLARATIVE_INCLUDE_DIR       Path to "include/QtDeclarative"
12405
12406
12407
12408
12409                QT_BINARY_DIR               Path to "bin" of Qt4
12410                QT_LIBRARY_DIR              Path to "lib" of Qt4
12411                QT_PLUGINS_DIR              Path to "plugins" for Qt4
12412                QT_TRANSLATIONS_DIR         Path to "translations" of Qt4
12413                QT_IMPORTS_DIR              Path to "imports" of Qt4
12414                QT_DOC_DIR                  Path to "doc" of Qt4
12415                QT_MKSPECS_DIR              Path to "mkspecs" of Qt4
12416
12417
12418
12419
12420
12421
12422
12423              The  Qt toolkit may contain both debug and release libraries. In
12424              that case, the following library variables  will  contain  both.
12425              You   do  not  need  to  use  these  variables  if  you  include
12426              QT_USE_FILE, and use QT_LIBRARIES.
12427
12428
12429                QT_QT3SUPPORT_LIBRARY            The Qt3Support library
12430                QT_QTASSISTANT_LIBRARY           The QtAssistant library
12431                QT_QTASSISTANTCLIENT_LIBRARY     The QtAssistantClient library
12432                QT_QAXCONTAINER_LIBRARY           The QAxContainer library (Windows only)
12433                QT_QAXSERVER_LIBRARY                The QAxServer library (Windows only)
12434                QT_QTCORE_LIBRARY                The QtCore library
12435                QT_QTDBUS_LIBRARY                The QtDBus library
12436                QT_QTDESIGNER_LIBRARY            The QtDesigner library
12437                QT_QTDESIGNERCOMPONENTS_LIBRARY  The QtDesignerComponents library
12438                QT_QTGUI_LIBRARY                 The QtGui library
12439                QT_QTHELP_LIBRARY                The QtHelp library
12440                QT_QTMOTIF_LIBRARY               The QtMotif library
12441                QT_QTMULTIMEDIA_LIBRARY          The QtMultimedia library
12442                QT_QTNETWORK_LIBRARY             The QtNetwork library
12443                QT_QTNSPLUGIN_LIBRARY            The QtNsPLugin library
12444                QT_QTOPENGL_LIBRARY              The QtOpenGL library
12445                QT_QTSCRIPT_LIBRARY              The QtScript library
12446                QT_QTSQL_LIBRARY                 The QtSql library
12447                QT_QTSVG_LIBRARY                 The QtSvg library
12448                QT_QTTEST_LIBRARY                The QtTest library
12449                QT_QTUITOOLS_LIBRARY             The QtUiTools library
12450                QT_QTWEBKIT_LIBRARY              The QtWebKit library
12451                QT_QTXML_LIBRARY                 The QtXml library
12452                QT_QTXMLPATTERNS_LIBRARY         The QtXmlPatterns library
12453                QT_QTMAIN_LIBRARY                The qtmain library for Windows
12454                QT_PHONON_LIBRARY                The phonon library
12455                QT_QTSCRIPTTOOLS_LIBRARY         The QtScriptTools library
12456
12457
12458              The QtDeclarative library:             QT_QTDECLARATIVE_LIBRARY
12459
12460
12461              also defined, but NOT for general use are
12462
12463
12464                QT_MOC_EXECUTABLE                   Where to find the moc tool.
12465                QT_UIC_EXECUTABLE                   Where to find the uic tool.
12466                QT_UIC3_EXECUTABLE                  Where to find the uic3 tool.
12467                QT_RCC_EXECUTABLE                   Where to find the rcc tool
12468                QT_DBUSCPP2XML_EXECUTABLE           Where to find the qdbuscpp2xml tool.
12469                QT_DBUSXML2CPP_EXECUTABLE           Where to find the qdbusxml2cpp tool.
12470                QT_LUPDATE_EXECUTABLE               Where to find the lupdate tool.
12471                QT_LRELEASE_EXECUTABLE              Where to find the lrelease tool.
12472                QT_QCOLLECTIONGENERATOR_EXECUTABLE  Where to find the qcollectiongenerator tool.
12473                QT_DESIGNER_EXECUTABLE              Where to find the Qt designer tool.
12474                QT_LINGUIST_EXECUTABLE              Where to find the Qt linguist tool.
12475
12476
12477
12478
12479
12480              These are around for backwards compatibility  they will be set
12481
12482
12483                QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
12484                QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
12485
12486
12487              These variables do _NOT_ have any effect  anymore  (compared  to
12488              FindQt.cmake)
12489
12490
12491                QT_MT_REQUIRED         Qt4 is now always multithreaded
12492
12493
12494              These  variables  are  set  to  ""  Because Qt structure changed
12495              (They make no sense in Qt4)
12496
12497
12498                QT_QT_LIBRARY        Qt-Library is now split
12499
12500
12501       FindQuickTime
12502
12503
12504              Locate QuickTime This module  defines  QUICKTIME_LIBRARY  QUICK‐
12505              TIME_FOUND,  if  false,  do  not  try  to  link  to gdal  QUICK‐
12506              TIME_INCLUDE_DIR, where to find the headers
12507
12508
12509              $QUICKTIME_DIR is an environment variable that would  correspond
12510              to the ./configure --prefix=$QUICKTIME_DIR
12511
12512
12513              Created by Eric Wing.
12514
12515
12516       FindRTI
12517              Try to find M&S HLA RTI libraries
12518
12519              This  module  finds  if any HLA RTI is installed and locates the
12520              standard RTI include files and libraries.
12521
12522
12523              RTI is a simulation  infrastructure  standardized  by  IEEE  and
12524              SISO. It has a well defined C++ API that assures that simulation
12525              applications are independent on a particular RTI implementation.
12526
12527
12528                http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation)
12529
12530
12531
12532
12533              This code sets the following variables:
12534
12535
12536                RTI_INCLUDE_DIR = the directory where RTI includes file are found
12537                RTI_LIBRARIES = The libraries to link against to use RTI
12538                RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM
12539                RTI_FOUND = Set to FALSE if any HLA RTI was not found
12540
12541
12542
12543
12544              Report problems to <certi-devel@nongnu.org>
12545
12546
12547       FindRuby
12548              Find Ruby
12549
12550              This module finds if Ruby is installed and determines where  the
12551              include files and libraries are. Ruby 1.8 and 1.9 are supported.
12552
12553
12554              The  minimum required version of Ruby can be specified using the
12555              standard syntax, e.g. FIND_PACKAGE(Ruby 1.8)
12556
12557
12558              It also determines what the name of the library  is.  This  code
12559              sets the following variables:
12560
12561
12562                RUBY_EXECUTABLE   = full path to the ruby binary
12563                RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library
12564                RUBY_LIBRARY      = full path to the ruby library
12565                RUBY_VERSION      = the version of ruby which was found, e.g. "1.8.7"
12566                RUBY_FOUND        = set to true if ruby ws found successfully
12567
12568
12569
12570
12571                RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
12572
12573
12574       FindSDL
12575
12576
12577              Locate  SDL library This module defines SDL_LIBRARY, the name of
12578              the library to link against SDL_FOUND, if false, do not  try  to
12579              link to SDL SDL_INCLUDE_DIR, where to find SDL.h
12580
12581
12582              This  module  responds  to the the flag: SDL_BUILDING_LIBRARY If
12583              this is defined, then no SDL_main  will  be  linked  in  because
12584              only  applications need main(). Otherwise, it is assumed you are
12585              building an application and this module will attempt  to  locate
12586              and  set  the  the  proper  link  flags  as part of the returned
12587              SDL_LIBRARY variable.
12588
12589
12590              Don't forget to include SDLmain.h and SDLmain.m your project for
12591              the   OS  X  framework  based  version.  (Other versions link to
12592              -lSDLmain which this module will try to find  on  your  behalf.)
12593              Also  for  OS X, this  module will automatically add the -frame‐
12594              work Cocoa on your behalf.
12595
12596
12597
12598
12599
12600              Additional Note: If you see an empty  SDL_LIBRARY_TEMP  in  your
12601              configuration  and  no  SDL_LIBRARY, it means CMake did not find
12602              your SDL library  (SDL.dll, libsdl.so, SDL.framework, etc).  Set
12603              SDL_LIBRARY_TEMP  to  point  to  your SDL library, and configure
12604              again.  Similarly, if you  see  an  empty  SDLMAIN_LIBRARY,  you
12605              should  set  this value as appropriate. These values are used to
12606              generate the final SDL_LIBRARY variable, but when  these  values
12607              are unset, SDL_LIBRARY does not get created.
12608
12609
12610
12611
12612
12613              $SDLDIR  is an environment variable that would correspond to the
12614              ./configure --prefix=$SDLDIR used  in  building  SDL.  l.e.galup
12615              9-20-02
12616
12617
12618              Modified  by  Eric  Wing.   Added  code to assist with automated
12619              building by using environmental variables and providing  a  more
12620              controlled/consistent  search  behavior. Added new modifications
12621              to recognize OS X frameworks and  additional Unix  paths  (Free‐
12622              BSD,  etc).   Also  corrected  the  header search path to follow
12623              "proper" SDL guidelines. Added a search  for  SDLmain  which  is
12624              needed  by  some  platforms. Added a search for threads which is
12625              needed by some platforms.  Added  needed  compile  switches  for
12626              MinGW.
12627
12628
12629              On  OSX,  this will prefer the Framework version (if found) over
12630              others. People will have to manually change the cache values  of
12631              SDL_LIBRARY to override this selection or set the CMake environ‐
12632              ment CMAKE_INCLUDE_PATH to modify the search paths.
12633
12634
12635              Note that the header path has changed  from  SDL/SDL.h  to  just
12636              SDL.h  This  needed to change because "proper" SDL convention is
12637              #include "SDL.h", not <SDL/SDL.h>. This is done for  portability
12638              reasons  because not all systems place things in SDL/ (see Free‐
12639              BSD).
12640
12641
12642       FindSDL_image
12643
12644
12645              Locate SDL_image library This module  defines  SDLIMAGE_LIBRARY,
12646              the  name  of  the  library  to  link against SDLIMAGE_FOUND, if
12647              false, do not try to link to SDL SDLIMAGE_INCLUDE_DIR, where  to
12648              find SDL/SDL.h
12649
12650
12651              $SDLDIR  is an environment variable that would correspond to the
12652              ./configure --prefix=$SDLDIR used in building SDL.
12653
12654
12655              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
12656              module,  but with modifications to recognize OS X frameworks and
12657              additional Unix paths (FreeBSD, etc).
12658
12659
12660       FindSDL_mixer
12661
12662
12663              Locate SDL_mixer library This module  defines  SDLMIXER_LIBRARY,
12664              the  name  of  the  library  to  link against SDLMIXER_FOUND, if
12665              false, do not try to link to SDL SDLMIXER_INCLUDE_DIR, where  to
12666              find SDL/SDL.h
12667
12668
12669              $SDLDIR  is an environment variable that would correspond to the
12670              ./configure --prefix=$SDLDIR used in building SDL.
12671
12672
12673              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
12674              module,  but with modifications to recognize OS X frameworks and
12675              additional Unix paths (FreeBSD, etc).
12676
12677
12678       FindSDL_net
12679
12680
12681              Locate SDL_net library This module defines  SDLNET_LIBRARY,  the
12682              name  of  the library to link against SDLNET_FOUND, if false, do
12683              not try to link against SDLNET_INCLUDE_DIR, where  to  find  the
12684              headers
12685
12686
12687              $SDLDIR  is an environment variable that would correspond to the
12688              ./configure --prefix=$SDLDIR used in building SDL.
12689
12690
12691              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
12692              module,  but with modifications to recognize OS X frameworks and
12693              additional Unix paths (FreeBSD, etc).
12694
12695
12696       FindSDL_sound
12697
12698
12699              Locates the SDL_sound library
12700
12701
12702       FindSDL_ttf
12703
12704
12705              Locate SDL_ttf library This module defines  SDLTTF_LIBRARY,  the
12706              name  of  the library to link against SDLTTF_FOUND, if false, do
12707              not try  to  link  to  SDL  SDLTTF_INCLUDE_DIR,  where  to  find
12708              SDL/SDL.h
12709
12710
12711              $SDLDIR  is an environment variable that would correspond to the
12712              ./configure --prefix=$SDLDIR used in building SDL.
12713
12714
12715              Created by Eric Wing. This was influenced by  the  FindSDL.cmake
12716              module,  but with modifications to recognize OS X frameworks and
12717              additional Unix paths (FreeBSD, etc).
12718
12719
12720       FindSWIG
12721              Find SWIG
12722
12723              This module finds an installed  SWIG.   It  sets  the  following
12724              variables:
12725
12726
12727                SWIG_FOUND - set to true if SWIG is found
12728                SWIG_DIR - the directory where swig is installed
12729                SWIG_EXECUTABLE - the path to the swig executable
12730                SWIG_VERSION   - the version number of the swig executable
12731
12732
12733
12734
12735              The  minimum required version of SWIG can be specified using the
12736              standard syntax, e.g. FIND_PACKAGE(SWIG 1.1)
12737
12738
12739              All information is collected from  the  SWIG_EXECUTABLE  so  the
12740              version  to  be  found  can  be changed from the command line by
12741              means of setting SWIG_EXECUTABLE
12742
12743
12744
12745       FindSelfPackers
12746              Find upx
12747
12748              This module looks for some executable  packers  (i.e.  softwares
12749              that   compress  executables  or  shared  libs  into  on-the-fly
12750              self-extracting executables or shared libs. Examples:
12751
12752
12753                UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html
12754
12755
12756       FindSquish
12757              -- Typical Use
12758
12759
12760
12761
12762              This module can be used to find  Squish  (currently  support  is
12763              aimed at version 3).
12764
12765
12766                SQUISH_FOUND                    If false, don't try to use Squish
12767
12768
12769
12770
12771                SQUISH_INSTALL_DIR              The Squish installation directory (containing bin, lib, etc)
12772                SQUISH_SERVER_EXECUTABLE        The squishserver executable
12773                SQUISH_CLIENT_EXECUTABLE        The squishrunner executable
12774
12775
12776
12777
12778                SQUISH_INSTALL_DIR_FOUND        Was the install directory found?
12779                SQUISH_SERVER_EXECUTABLE_FOUND  Was the server executable found?
12780                SQUISH_CLIENT_EXECUTABLE_FOUND  Was the client executable found?
12781
12782
12783
12784
12785              macro  SQUISH_ADD_TEST(testName  applicationUnderTest  testSuite
12786              testCase)
12787
12788
12789                ENABLE_TESTING()
12790                FIND_PACKAGE(Squish)
12791                IF (SQUISH_FOUND)
12792                  SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
12793                ENDIF (SQUISH_FOUND)
12794
12795
12796
12797
12798
12799       FindSubversion
12800              Extract information from a subversion working copy
12801
12802              The module defines the following variables:
12803
12804
12805                Subversion_SVN_EXECUTABLE - path to svn command line client
12806                Subversion_VERSION_SVN - version of svn command line client
12807                Subversion_FOUND - true if the command line client was found
12808                SUBVERSION_FOUND - same as Subversion_FOUND, set for compatiblity reasons
12809
12810
12811
12812
12813              The minimum required version  of  Subversion  can  be  specified
12814              using the standard syntax, e.g. FIND_PACKAGE(Subversion 1.4)
12815
12816
12817              If  the  command  line client executable is found two macros are
12818              defined:
12819
12820
12821                Subversion_WC_INFO(<dir> <var-prefix>)
12822                Subversion_WC_LOG(<dir> <var-prefix>)
12823
12824              Subversion_WC_INFO extracts information of a subversion  working
12825              copy at a given location. This macro defines the following vari‐
12826              ables:
12827
12828
12829                <var-prefix>_WC_URL - url of the repository (at <dir>)
12830                <var-prefix>_WC_ROOT - root url of the repository
12831                <var-prefix>_WC_REVISION - current revision
12832                <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
12833                <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
12834                <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
12835                <var-prefix>_WC_INFO - output of command `svn info <dir>'
12836
12837              Subversion_WC_LOG retrieves the log message of the base revision
12838              of  a  subversion  working  copy at a given location. This macro
12839              defines the variable:
12840
12841
12842                <var-prefix>_LAST_CHANGED_LOG - last log of base revision
12843
12844              Example usage:
12845
12846
12847                FIND_PACKAGE(Subversion)
12848                IF(SUBVERSION_FOUND)
12849                  Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
12850                  MESSAGE("Current revision is ${Project_WC_REVISION}")
12851                  Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
12852                  MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
12853                ENDIF(SUBVERSION_FOUND)
12854
12855
12856       FindTCL
12857              TK_INTERNAL_PATH was removed.
12858
12859              This module finds if Tcl is installed and determines  where  the
12860              include  files  and  libraries  are. It also determines what the
12861              name of the library is. This code sets the following variables:
12862
12863
12864                TCL_FOUND              = Tcl was found
12865                TK_FOUND               = Tk was found
12866                TCLTK_FOUND            = Tcl and Tk were found
12867                TCL_LIBRARY            = path to Tcl library (tcl tcl80)
12868                TCL_INCLUDE_PATH       = path to where tcl.h can be found
12869                TCL_TCLSH              = path to tclsh binary (tcl tcl80)
12870                TK_LIBRARY             = path to Tk library (tk tk80 etc)
12871                TK_INCLUDE_PATH        = path to where tk.h can be found
12872                TK_WISH                = full path to the wish executable
12873
12874
12875
12876
12877              In an effort to remove some clutter and clear up some issues for
12878              people  who  are  not necessarily Tcl/Tk gurus/developpers, some
12879              variables were moved or removed. Changes compared to  CMake  2.4
12880              are:
12881
12882
12883                 => they were only useful for people writing Tcl/Tk extensions.
12884                 => these libs are not packaged by default with Tcl/Tk distributions.
12885                    Even when Tcl/Tk is built from source, several flavors of debug libs
12886                    are created and there is no real reason to pick a single one
12887                    specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx).
12888                    Let's leave that choice to the user by allowing him to assign
12889                    TCL_LIBRARY to any Tcl library, debug or not.
12890                 => this ended up being only a Win32 variable, and there is a lot of
12891                    confusion regarding the location of this file in an installed Tcl/Tk
12892                    tree anyway (see 8.5 for example). If you need the internal path at
12893                    this point it is safer you ask directly where the *source* tree is
12894                    and dig from there.
12895
12896
12897       FindTIFF
12898              Find TIFF library
12899
12900              Find the native TIFF includes and library This module defines
12901
12902
12903                TIFF_INCLUDE_DIR, where to find tiff.h, etc.
12904                TIFF_LIBRARIES, libraries to link against to use TIFF.
12905                TIFF_FOUND, If false, do not try to use TIFF.
12906
12907              also defined, but not for general use are
12908
12909
12910                TIFF_LIBRARY, where to find the TIFF library.
12911
12912
12913       FindTclStub
12914              TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed.
12915
12916              This module finds Tcl stub libraries. It first finds Tcl include
12917              files and libraries by calling FindTCL.cmake. How to Use the Tcl
12918              Stubs Library:
12919
12920
12921                 http://tcl.activestate.com/doc/howto/stubs.html
12922
12923              Using Stub Libraries:
12924
12925
12926                 http://safari.oreilly.com/0130385603/ch48lev1sec3
12927
12928              This code sets the following variables:
12929
12930
12931                TCL_STUB_LIBRARY       = path to Tcl stub library
12932                TK_STUB_LIBRARY        = path to Tk stub library
12933                TTK_STUB_LIBRARY       = path to ttk stub library
12934
12935
12936
12937
12938              In an effort to remove some clutter and clear up some issues for
12939              people who are not necessarily  Tcl/Tk  gurus/developpers,  some
12940              variables  were  moved or removed. Changes compared to CMake 2.4
12941              are:
12942
12943
12944                 => these libs are not packaged by default with Tcl/Tk distributions.
12945                    Even when Tcl/Tk is built from source, several flavors of debug libs
12946                    are created and there is no real reason to pick a single one
12947                    specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx).
12948                    Let's leave that choice to the user by allowing him to assign
12949                    TCL_STUB_LIBRARY to any Tcl library, debug or not.
12950
12951
12952       FindTclsh
12953              Find tclsh
12954
12955              This module finds if TCL is installed and determines  where  the
12956              include  files  and  libraries  are. It also determines what the
12957              name of the library is. This code sets the following variables:
12958
12959
12960                TCLSH_FOUND = TRUE if tclsh has been found
12961                TCL_TCLSH = the path to the tclsh executable
12962
12963              In cygwin, look for the cygwin version first.  Don't look for it
12964              later to avoid finding the cygwin version on a Win32 build.
12965
12966
12967       FindThreads
12968              This module determines the thread library of the system.
12969
12970              The following variables are set
12971
12972
12973                CMAKE_THREAD_LIBS_INIT     - the thread library
12974                CMAKE_USE_SPROC_INIT       - are we using sproc?
12975                CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
12976                CMAKE_USE_PTHREADS_INIT    - are we using pthreads
12977                CMAKE_HP_PTHREADS_INIT     - are we using hp pthreads
12978
12979              For systems with multiple thread libraries, caller can set
12980
12981
12982                CMAKE_THREAD_PREFER_PTHREAD
12983
12984
12985       FindUnixCommands
12986              Find unix commands from cygwin
12987
12988              This module looks for some usual Unix commands.
12989
12990
12991
12992       FindVTK
12993              Find a VTK installation or build tree.
12994
12995              The  following variables are set if VTK is found.  If VTK is not
12996              found, VTK_FOUND is set to false.
12997
12998
12999                VTK_FOUND         - Set to true when VTK is found.
13000                VTK_USE_FILE      - CMake file to use VTK.
13001                VTK_MAJOR_VERSION - The VTK major version number.
13002                VTK_MINOR_VERSION - The VTK minor version number
13003                                     (odd non-release).
13004                VTK_BUILD_VERSION - The VTK patch level
13005                                     (meaningless for odd minor).
13006                VTK_INCLUDE_DIRS  - Include directories for VTK
13007                VTK_LIBRARY_DIRS  - Link directories for VTK libraries
13008                VTK_KITS          - List of VTK kits, in CAPS
13009                                    (COMMON,IO,) etc.
13010                VTK_LANGUAGES     - List of wrapped languages, in CAPS
13011                                    (TCL, PYHTON,) etc.
13012
13013              The following cache entries must be set by the  user  to  locate
13014              VTK:
13015
13016
13017                VTK_DIR  - The directory containing VTKConfig.cmake.
13018                           This is either the root of the build tree,
13019                           or the lib/vtk directory.  This is the
13020                           only cache entry.
13021
13022              The  following  variables are set for backward compatibility and
13023              should not be used in new code:
13024
13025
13026                USE_VTK_FILE - The full path to the UseVTK.cmake file.
13027                               This is provided for backward
13028                               compatibility.  Use VTK_USE_FILE
13029                               instead.
13030
13031
13032
13033
13034
13035       FindWget
13036              Find wget
13037
13038              This module looks for wget. This module defines  the   following
13039              values:
13040
13041
13042                WGET_EXECUTABLE: the full path to the wget tool.
13043                WGET_FOUND: True if wget has been found.
13044
13045
13046       FindWish
13047              Find wish installation
13048
13049              This  module  finds if TCL is installed and determines where the
13050              include files and libraries are. It  also  determines  what  the
13051              name of the library is. This code sets the following variables:
13052
13053
13054                TK_WISH = the path to the wish executable
13055
13056
13057
13058
13059              if  UNIX  is  defined,  then it will look for the cygwin version
13060              first
13061
13062
13063       FindX11
13064              Find X11 installation
13065
13066              Try to find X11  on  UNIX  systems.  The  following  values  are
13067              defined
13068
13069
13070                X11_FOUND        - True if X11 is available
13071                X11_INCLUDE_DIR  - include directories to use X11
13072                X11_LIBRARIES    - link against these to use X11
13073
13074
13075
13076
13077              and  also  the  following  more  fine grained variables: Include
13078              paths:        X11_ICE_INCLUDE_PATH,                 X11_ICE_LIB,
13079              X11_ICE_FOUND
13080
13081
13082                              X11_X11_INCLUDE_PATH,          X11_X11_LIB
13083                              X11_Xaccessrules_INCLUDE_PATH,                     X11_Xaccess_FOUND
13084                              X11_Xaccessstr_INCLUDE_PATH,                       X11_Xaccess_FOUND
13085                              X11_Xau_INCLUDE_PATH,          X11_Xau_LIB,        X11_Xau_FOUND
13086                              X11_Xcomposite_INCLUDE_PATH,   X11_Xcomposite_LIB, X11_Xcomposite_FOUND
13087                              X11_Xcursor_INCLUDE_PATH,      X11_Xcursor_LIB,    X11_Xcursor_FOUND
13088                              X11_Xdamage_INCLUDE_PATH,      X11_Xdamage_LIB,    X11_Xdamage_FOUND
13089                              X11_Xdmcp_INCLUDE_PATH,        X11_Xdmcp_LIB,      X11_Xdmcp_FOUND
13090                                                             X11_Xext_LIB,       X11_Xext_FOUND
13091                              X11_dpms_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_dpms_FOUND
13092                              X11_XShm_INCLUDE_PATH,         (in X11_Xext_LIB),  X11_XShm_FOUND
13093                              X11_Xshape_INCLUDE_PATH,       (in X11_Xext_LIB),  X11_Xshape_FOUND
13094                              X11_xf86misc_INCLUDE_PATH,     X11_Xxf86misc_LIB,  X11_xf86misc_FOUND
13095                              X11_xf86vmode_INCLUDE_PATH,                        X11_xf86vmode_FOUND
13096                              X11_Xfixes_INCLUDE_PATH,       X11_Xfixes_LIB,     X11_Xfixes_FOUND
13097                              X11_Xft_INCLUDE_PATH,          X11_Xft_LIB,        X11_Xft_FOUND
13098                              X11_Xi_INCLUDE_PATH,           X11_Xi_LIB,         X11_Xi_FOUND
13099                              X11_Xinerama_INCLUDE_PATH,     X11_Xinerama_LIB,   X11_Xinerama_FOUND
13100                              X11_Xinput_INCLUDE_PATH,       X11_Xinput_LIB,     X11_Xinput_FOUND
13101                              X11_Xkb_INCLUDE_PATH,                              X11_Xkb_FOUND
13102                              X11_Xkblib_INCLUDE_PATH,                           X11_Xkb_FOUND
13103                              X11_Xpm_INCLUDE_PATH,          X11_Xpm_LIB,        X11_Xpm_FOUND
13104                              X11_XTest_INCLUDE_PATH,        X11_XTest_LIB,      X11_XTest_FOUND
13105                              X11_Xrandr_INCLUDE_PATH,       X11_Xrandr_LIB,     X11_Xrandr_FOUND
13106                              X11_Xrender_INCLUDE_PATH,      X11_Xrender_LIB,    X11_Xrender_FOUND
13107                              X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND
13108                              X11_Xt_INCLUDE_PATH,           X11_Xt_LIB,         X11_Xt_FOUND
13109                              X11_Xutil_INCLUDE_PATH,                            X11_Xutil_FOUND
13110                              X11_Xv_INCLUDE_PATH,           X11_Xv_LIB,         X11_Xv_FOUND
13111
13112
13113       FindXMLRPC
13114              Find xmlrpc
13115
13116              Find the native XMLRPC headers and libraries.
13117
13118
13119                XMLRPC_INCLUDE_DIRS      - where to find xmlrpc.h, etc.
13120                XMLRPC_LIBRARIES         - List of libraries when using xmlrpc.
13121                XMLRPC_FOUND             - True if xmlrpc found.
13122
13123              XMLRPC modules may be specified as components for this find mod‐
13124              ule. Modules may be listed by running  "xmlrpc-c-config".   Mod‐
13125              ules include:
13126
13127
13128                c++            C++ wrapper code
13129                libwww-client  libwww-based client
13130                cgi-server     CGI-based server
13131                abyss-server   ABYSS-based server
13132
13133              Typical usage:
13134
13135
13136                FIND_PACKAGE(XMLRPC REQUIRED libwww-client)
13137
13138
13139       FindZLIB
13140              Find zlib
13141
13142              Find  the  native ZLIB includes and library. Once done this will
13143              define
13144
13145
13146                ZLIB_INCLUDE_DIRS   - where to find zlib.h, etc.
13147                ZLIB_LIBRARIES      - List of libraries when using zlib.
13148                ZLIB_FOUND          - True if zlib found.
13149
13150
13151
13152
13153                ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
13154                ZLIB_VERSION_MAJOR  - The major version of zlib
13155                ZLIB_VERSION_MINOR  - The minor version of zlib
13156                ZLIB_VERSION_PATCH  - The patch version of zlib
13157                ZLIB_VERSION_TWEAK  - The tweak version of zlib
13158
13159
13160
13161
13162              The following variable are provided for backward compatibility
13163
13164
13165                ZLIB_MAJOR_VERSION  - The major version of zlib
13166                ZLIB_MINOR_VERSION  - The minor version of zlib
13167                ZLIB_PATCH_VERSION  - The patch version of zlib
13168
13169
13170       Findosg
13171
13172
13173
13174
13175
13176              NOTE: It is highly recommended that you use  the  new  FindOpen‐
13177              SceneGraph.cmake introduced in CMake 2.6.3 and not use this Find
13178              module directly.
13179
13180
13181              This is part of the Findosg* suite used to  find  OpenSceneGraph
13182              components.  Each  component  is separate and you must opt in to
13183              each module. You must  also opt into OpenGL and OpenThreads (and
13184              Producer  if needed) as these  modules won't do it for you. This
13185              is to allow you control over your own  system piece by piece  in
13186              case  you  need  to  opt out of certain components or change the
13187              Find behavior for  a  particular  module  (perhaps  because  the
13188              default FindOpenGL.cmake module doesn't work with your system as
13189              an example). If you want to use a more  convenient  module  that
13190              includes everything, use the FindOpenSceneGraph.cmake instead of
13191              the Findosg*.cmake modules.
13192
13193
13194              Locate osg This module defines
13195
13196
13197              OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where  to  find
13198              the  headers  OSG_LIBRARIES  - The libraries to link against for
13199              the OSG (use this)
13200
13201
13202              OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG  debug
13203              library
13204
13205
13206              $OSGDIR  is an environment variable that would correspond to the
13207              ./configure --prefix=$OSGDIR used in building osg.
13208
13209
13210              Created by Eric Wing.
13211
13212
13213       FindosgAnimation
13214
13215
13216              This is part of the Findosg* suite used to  find  OpenSceneGraph
13217              components.  Each  component  is separate and you must opt in to
13218              each module. You must  also opt into OpenGL and OpenThreads (and
13219              Producer  if needed) as these  modules won't do it for you. This
13220              is to allow you control over your own  system piece by piece  in
13221              case  you  need  to  opt out of certain components or change the
13222              Find behavior for  a  particular  module  (perhaps  because  the
13223              default FindOpenGL.cmake module doesn't work with your system as
13224              an example). If you want to use a more  convenient  module  that
13225              includes everything, use the FindOpenSceneGraph.cmake instead of
13226              the Findosg*.cmake modules.
13227
13228
13229              Locate osgAnimation This module defines
13230
13231
13232              OSGANIMATION_FOUND   -   Was   osgAnimation   found?   OSGANIMA‐
13233              TION_INCLUDE_DIR   -   Where   to  find  the  headers  OSGANIMA‐
13234              TION_LIBRARIES - The libraries to link against for the OSG  (use
13235              this)
13236
13237
13238              OSGANIMATION_LIBRARY     -    The    OSG    library    OSGANIMA‐
13239              TION_LIBRARY_DEBUG - The OSG debug library
13240
13241
13242              $OSGDIR is an environment variable that would correspond to  the
13243              ./configure --prefix=$OSGDIR used in building osg.
13244
13245
13246              Created by Eric Wing.
13247
13248
13249       FindosgDB
13250
13251
13252              This  is  part of the Findosg* suite used to find OpenSceneGraph
13253              components. Each component is separate and you must  opt  in  to
13254              each module. You must  also opt into OpenGL and OpenThreads (and
13255              Producer if needed) as these  modules won't do it for you.  This
13256              is  to allow you control over your own  system piece by piece in
13257              case you need to opt out of certain  components  or  change  the
13258              Find  behavior  for  a  particular  module  (perhaps because the
13259              default FindOpenGL.cmake module doesn't work with your system as
13260              an  example).  If  you want to use a more convenient module that
13261              includes everything, use the FindOpenSceneGraph.cmake instead of
13262              the Findosg*.cmake modules.
13263
13264
13265              Locate osgDB This module defines
13266
13267
13268              OSGDB_FOUND - Was osgDB found? OSGDB_INCLUDE_DIR - Where to find
13269              the headers OSGDB_LIBRARIES - The libraries to link against  for
13270              the osgDB (use this)
13271
13272
13273              OSGDB_LIBRARY  -  The  osgDB  library  OSGDB_LIBRARY_DEBUG - The
13274              osgDB debug library
13275
13276
13277              $OSGDIR is an environment variable that would correspond to  the
13278              ./configure --prefix=$OSGDIR used in building osg.
13279
13280
13281              Created by Eric Wing.
13282
13283
13284       FindosgFX
13285
13286
13287              This  is  part of the Findosg* suite used to find OpenSceneGraph
13288              components. Each component is separate and you must  opt  in  to
13289              each module. You must  also opt into OpenGL and OpenThreads (and
13290              Producer if needed) as these  modules won't do it for you.  This
13291              is  to allow you control over your own  system piece by piece in
13292              case you need to opt out of certain  components  or  change  the
13293              Find  behavior  for  a  particular  module  (perhaps because the
13294              default FindOpenGL.cmake module doesn't work with your system as
13295              an  example).  If  you want to use a more convenient module that
13296              includes everything, use the FindOpenSceneGraph.cmake instead of
13297              the Findosg*.cmake modules.
13298
13299
13300              Locate osgFX This module defines
13301
13302
13303              OSGFX_FOUND - Was osgFX found? OSGFX_INCLUDE_DIR - Where to find
13304              the headers OSGFX_LIBRARIES - The libraries to link against  for
13305              the osgFX (use this)
13306
13307
13308              OSGFX_LIBRARY  -  The  osgFX  library  OSGFX_LIBRARY_DEBUG - The
13309              osgFX debug library
13310
13311
13312              $OSGDIR is an environment variable that would correspond to  the
13313              ./configure --prefix=$OSGDIR used in building osg.
13314
13315
13316              Created by Eric Wing.
13317
13318
13319       FindosgGA
13320
13321
13322              This  is  part of the Findosg* suite used to find OpenSceneGraph
13323              components. Each component is separate and you must  opt  in  to
13324              each module. You must  also opt into OpenGL and OpenThreads (and
13325              Producer if needed) as these  modules won't do it for you.  This
13326              is  to allow you control over your own  system piece by piece in
13327              case you need to opt out of certain  components  or  change  the
13328              Find  behavior  for  a  particular  module  (perhaps because the
13329              default FindOpenGL.cmake module doesn't work with your system as
13330              an  example).  If  you want to use a more convenient module that
13331              includes everything, use the FindOpenSceneGraph.cmake instead of
13332              the Findosg*.cmake modules.
13333
13334
13335              Locate osgGA This module defines
13336
13337
13338              OSGGA_FOUND - Was osgGA found? OSGGA_INCLUDE_DIR - Where to find
13339              the headers OSGGA_LIBRARIES - The libraries to link against  for
13340              the osgGA (use this)
13341
13342
13343              OSGGA_LIBRARY  -  The  osgGA  library  OSGGA_LIBRARY_DEBUG - The
13344              osgGA debug library
13345
13346
13347              $OSGDIR is an environment variable that would correspond to  the
13348              ./configure --prefix=$OSGDIR used in building osg.
13349
13350
13351              Created by Eric Wing.
13352
13353
13354       FindosgIntrospection
13355
13356
13357              This  is  part of the Findosg* suite used to find OpenSceneGraph
13358              components. Each component is separate and you must  opt  in  to
13359              each module. You must  also opt into OpenGL and OpenThreads (and
13360              Producer if needed) as these  modules won't do it for you.  This
13361              is  to allow you control over your own  system piece by piece in
13362              case you need to opt out of certain  components  or  change  the
13363              Find  behavior  for  a  particular  module  (perhaps because the
13364              default FindOpenGL.cmake module doesn't work with your system as
13365              an  example).  If  you want to use a more convenient module that
13366              includes everything, use the FindOpenSceneGraph.cmake instead of
13367              the Findosg*.cmake modules.
13368
13369
13370              Locate osgINTROSPECTION This module defines
13371
13372
13373              OSGINTROSPECTION_FOUND  -  Was osgIntrospection found? OSGINTRO‐
13374              SPECTION_INCLUDE_DIR - Where to find the  headers  OSGINTROSPEC‐
13375              TION_LIBRARIES - The libraries to link for osgIntrospection (use
13376              this)
13377
13378
13379              OSGINTROSPECTION_LIBRARY - The osgIntrospection  library  OSGIN‐
13380              TROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
13381
13382
13383              $OSGDIR  is an environment variable that would correspond to the
13384              ./configure --prefix=$OSGDIR used in building osg.
13385
13386
13387              Created by Eric Wing.
13388
13389
13390       FindosgManipulator
13391
13392
13393              This is part of the Findosg* suite used to  find  OpenSceneGraph
13394              components.  Each  component  is separate and you must opt in to
13395              each module. You must  also opt into OpenGL and OpenThreads (and
13396              Producer  if needed) as these  modules won't do it for you. This
13397              is to allow you control over your own  system piece by piece  in
13398              case  you  need  to  opt out of certain components or change the
13399              Find behavior for  a  particular  module  (perhaps  because  the
13400              default FindOpenGL.cmake module doesn't work with your system as
13401              an example). If you want to use a more  convenient  module  that
13402              includes everything, use the FindOpenSceneGraph.cmake instead of
13403              the Findosg*.cmake modules.
13404
13405
13406              Locate osgManipulator This module defines
13407
13408
13409              OSGMANIPULATOR_FOUND - Was  osgManipulator  found?  OSGMANIPULA‐
13410              TOR_INCLUDE_DIR   -  Where  to  find  the  headers  OSGMANIPULA‐
13411              TOR_LIBRARIES - The libraries to link  for  osgManipulator  (use
13412              this)
13413
13414
13415              OSGMANIPULATOR_LIBRARY - The osgManipulator library OSGMANIPULA‐
13416              TOR_LIBRARY_DEBUG - The osgManipulator debug library
13417
13418
13419              $OSGDIR is an environment variable that would correspond to  the
13420              ./configure --prefix=$OSGDIR used in building osg.
13421
13422
13423              Created by Eric Wing.
13424
13425
13426       FindosgParticle
13427
13428
13429              This  is  part of the Findosg* suite used to find OpenSceneGraph
13430              components. Each component is separate and you must  opt  in  to
13431              each module. You must  also opt into OpenGL and OpenThreads (and
13432              Producer if needed) as these  modules won't do it for you.  This
13433              is  to allow you control over your own  system piece by piece in
13434              case you need to opt out of certain  components  or  change  the
13435              Find  behavior  for  a  particular  module  (perhaps because the
13436              default FindOpenGL.cmake module doesn't work with your system as
13437              an  example).  If  you want to use a more convenient module that
13438              includes everything, use the FindOpenSceneGraph.cmake instead of
13439              the Findosg*.cmake modules.
13440
13441
13442              Locate osgParticle This module defines
13443
13444
13445              OSGPARTICLE_FOUND    -    Was   osgParticle   found?   OSGPARTI‐
13446              CLE_INCLUDE_DIR  -  Where  to   find   the   headers   OSGPARTI‐
13447              CLE_LIBRARIES - The libraries to link for osgParticle (use this)
13448
13449
13450              OSGPARTICLE_LIBRARY   -   The   osgParticle   library  OSGPARTI‐
13451              CLE_LIBRARY_DEBUG - The osgParticle debug library
13452
13453
13454              $OSGDIR is an environment variable that would correspond to  the
13455              ./configure --prefix=$OSGDIR used in building osg.
13456
13457
13458              Created by Eric Wing.
13459
13460
13461       FindosgProducer
13462
13463
13464              This  is  part of the Findosg* suite used to find OpenSceneGraph
13465              components. Each component is separate and you must  opt  in  to
13466              each module. You must  also opt into OpenGL and OpenThreads (and
13467              Producer if needed) as these  modules won't do it for you.  This
13468              is  to allow you control over your own  system piece by piece in
13469              case you need to opt out of certain  components  or  change  the
13470              Find  behavior  for  a  particular  module  (perhaps because the
13471              default FindOpenGL.cmake module doesn't work with your system as
13472              an  example).  If  you want to use a more convenient module that
13473              includes everything, use the FindOpenSceneGraph.cmake instead of
13474              the Findosg*.cmake modules.
13475
13476
13477              Locate osgProducer This module defines
13478
13479
13480              OSGPRODUCER_FOUND    -    Was    osgProducer    found?   OSGPRO‐
13481              DUCER_INCLUDE_DIR  -  Where  to   find   the   headers   OSGPRO‐
13482              DUCER_LIBRARIES  -  The  libraries  to link for osgProducer (use
13483              this)
13484
13485
13486              OSGPRODUCER_LIBRARY   -   The   osgProducer   library    OSGPRO‐
13487              DUCER_LIBRARY_DEBUG - The osgProducer debug library
13488
13489
13490              $OSGDIR  is an environment variable that would correspond to the
13491              ./configure --prefix=$OSGDIR used in building osg.
13492
13493
13494              Created by Eric Wing.
13495
13496
13497       FindosgShadow
13498
13499
13500              This is part of the Findosg* suite used to  find  OpenSceneGraph
13501              components.  Each  component  is separate and you must opt in to
13502              each module. You must  also opt into OpenGL and OpenThreads (and
13503              Producer  if needed) as these  modules won't do it for you. This
13504              is to allow you control over your own  system piece by piece  in
13505              case  you  need  to  opt out of certain components or change the
13506              Find behavior for  a  particular  module  (perhaps  because  the
13507              default FindOpenGL.cmake module doesn't work with your system as
13508              an example). If you want to use a more  convenient  module  that
13509              includes everything, use the FindOpenSceneGraph.cmake instead of
13510              the Findosg*.cmake modules.
13511
13512
13513              Locate osgShadow This module defines
13514
13515
13516              OSGSHADOW_FOUND - Was osgShadow found?  OSGSHADOW_INCLUDE_DIR  -
13517              Where to find the headers OSGSHADOW_LIBRARIES - The libraries to
13518              link for osgShadow (use this)
13519
13520
13521              OSGSHADOW_LIBRARY      -       The       osgShadow       library
13522              OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library
13523
13524
13525              $OSGDIR  is an environment variable that would correspond to the
13526              ./configure --prefix=$OSGDIR used in building osg.
13527
13528
13529              Created by Eric Wing.
13530
13531
13532       FindosgSim
13533
13534
13535              This is part of the Findosg* suite used to  find  OpenSceneGraph
13536              components.  Each  component  is separate and you must opt in to
13537              each module. You must  also opt into OpenGL and OpenThreads (and
13538              Producer  if needed) as these  modules won't do it for you. This
13539              is to allow you control over your own  system piece by piece  in
13540              case  you  need  to  opt out of certain components or change the
13541              Find behavior for  a  particular  module  (perhaps  because  the
13542              default FindOpenGL.cmake module doesn't work with your system as
13543              an example). If you want to use a more  convenient  module  that
13544              includes everything, use the FindOpenSceneGraph.cmake instead of
13545              the Findosg*.cmake modules.
13546
13547
13548              Locate osgSim This module defines
13549
13550
13551              OSGSIM_FOUND - Was osgSim found? OSGSIM_INCLUDE_DIR -  Where  to
13552              find  the  headers  OSGSIM_LIBRARIES - The libraries to link for
13553              osgSim (use this)
13554
13555
13556              OSGSIM_LIBRARY - The osgSim library OSGSIM_LIBRARY_DEBUG  -  The
13557              osgSim debug library
13558
13559
13560              $OSGDIR  is an environment variable that would correspond to the
13561              ./configure --prefix=$OSGDIR used in building osg.
13562
13563
13564              Created by Eric Wing.
13565
13566
13567       FindosgTerrain
13568
13569
13570              This is part of the Findosg* suite used to  find  OpenSceneGraph
13571              components.  Each  component  is separate and you must opt in to
13572              each module. You must  also opt into OpenGL and OpenThreads (and
13573              Producer  if needed) as these  modules won't do it for you. This
13574              is to allow you control over your own  system piece by piece  in
13575              case  you  need  to  opt out of certain components or change the
13576              Find behavior for  a  particular  module  (perhaps  because  the
13577              default FindOpenGL.cmake module doesn't work with your system as
13578              an example). If you want to use a more  convenient  module  that
13579              includes everything, use the FindOpenSceneGraph.cmake instead of
13580              the Findosg*.cmake modules.
13581
13582
13583              Locate osgTerrain This module defines
13584
13585
13586              OSGTERRAIN_FOUND - Was osgTerrain found?  OSGTERRAIN_INCLUDE_DIR
13587              - Where to find the headers OSGTERRAIN_LIBRARIES - The libraries
13588              to link for osgTerrain (use this)
13589
13590
13591              OSGTERRAIN_LIBRARY   -   The    osgTerrain    library    OSGTER‐
13592              RAIN_LIBRARY_DEBUG - The osgTerrain debug library
13593
13594
13595              $OSGDIR  is an environment variable that would correspond to the
13596              ./configure --prefix=$OSGDIR used in building osg.
13597
13598
13599              Created by Eric Wing.
13600
13601
13602       FindosgText
13603
13604
13605              This is part of the Findosg* suite used to  find  OpenSceneGraph
13606              components.  Each  component  is separate and you must opt in to
13607              each module. You must  also opt into OpenGL and OpenThreads (and
13608              Producer  if needed) as these  modules won't do it for you. This
13609              is to allow you control over your own  system piece by piece  in
13610              case  you  need  to  opt out of certain components or change the
13611              Find behavior for  a  particular  module  (perhaps  because  the
13612              default FindOpenGL.cmake module doesn't work with your system as
13613              an example). If you want to use a more  convenient  module  that
13614              includes everything, use the FindOpenSceneGraph.cmake instead of
13615              the Findosg*.cmake modules.
13616
13617
13618              Locate osgText This module defines
13619
13620
13621              OSGTEXT_FOUND - Was osgText found? OSGTEXT_INCLUDE_DIR  -  Where
13622              to  find  the  headers OSGTEXT_LIBRARIES - The libraries to link
13623              for osgText (use this)
13624
13625
13626              OSGTEXT_LIBRARY - The osgText  library  OSGTEXT_LIBRARY_DEBUG  -
13627              The osgText debug library
13628
13629
13630              $OSGDIR  is an environment variable that would correspond to the
13631              ./configure --prefix=$OSGDIR used in building osg.
13632
13633
13634              Created by Eric Wing.
13635
13636
13637       FindosgUtil
13638
13639
13640              This is part of the Findosg* suite used to  find  OpenSceneGraph
13641              components.  Each  component  is separate and you must opt in to
13642              each module. You must  also opt into OpenGL and OpenThreads (and
13643              Producer  if needed) as these  modules won't do it for you. This
13644              is to allow you control over your own  system piece by piece  in
13645              case  you  need  to  opt out of certain components or change the
13646              Find behavior for  a  particular  module  (perhaps  because  the
13647              default FindOpenGL.cmake module doesn't work with your system as
13648              an example). If you want to use a more  convenient  module  that
13649              includes everything, use the FindOpenSceneGraph.cmake instead of
13650              the Findosg*.cmake modules.
13651
13652
13653              Locate osgUtil This module defines
13654
13655
13656              OSGUTIL_FOUND - Was osgUtil found? OSGUTIL_INCLUDE_DIR  -  Where
13657              to  find  the  headers OSGUTIL_LIBRARIES - The libraries to link
13658              for osgUtil (use this)
13659
13660
13661              OSGUTIL_LIBRARY - The osgUtil  library  OSGUTIL_LIBRARY_DEBUG  -
13662              The osgUtil debug library
13663
13664
13665              $OSGDIR  is an environment variable that would correspond to the
13666              ./configure --prefix=$OSGDIR used in building osg.
13667
13668
13669              Created by Eric Wing.
13670
13671
13672       FindosgViewer
13673
13674
13675              This is part of the Findosg* suite used to  find  OpenSceneGraph
13676              components.  Each  component  is separate and you must opt in to
13677              each module. You must  also opt into OpenGL and OpenThreads (and
13678              Producer  if needed) as these  modules won't do it for you. This
13679              is to allow you control over your own  system piece by piece  in
13680              case  you  need  to  opt out of certain components or change the
13681              Find behavior for  a  particular  module  (perhaps  because  the
13682              default FindOpenGL.cmake module doesn't work with your system as
13683              an example). If you want to use a more  convenient  module  that
13684              includes everything, use the FindOpenSceneGraph.cmake instead of
13685              the Findosg*.cmake modules.
13686
13687
13688              Locate osgViewer This module defines
13689
13690
13691              OSGVIEWER_FOUND - Was osgViewer found?  OSGVIEWER_INCLUDE_DIR  -
13692              Where to find the headers OSGVIEWER_LIBRARIES - The libraries to
13693              link for osgViewer (use this)
13694
13695
13696              OSGVIEWER_LIBRARY      -       The       osgViewer       library
13697              OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library
13698
13699
13700              $OSGDIR  is an environment variable that would correspond to the
13701              ./configure --prefix=$OSGDIR used in building osg.
13702
13703
13704              Created by Eric Wing.
13705
13706
13707       FindosgVolume
13708
13709
13710              This is part of the Findosg* suite used to  find  OpenSceneGraph
13711              components.  Each  component  is separate and you must opt in to
13712              each module. You must  also opt into OpenGL and OpenThreads (and
13713              Producer  if needed) as these  modules won't do it for you. This
13714              is to allow you control over your own  system piece by piece  in
13715              case  you  need  to  opt out of certain components or change the
13716              Find behavior for  a  particular  module  (perhaps  because  the
13717              default FindOpenGL.cmake module doesn't work with your system as
13718              an example). If you want to use a more  convenient  module  that
13719              includes everything, use the FindOpenSceneGraph.cmake instead of
13720              the Findosg*.cmake modules.
13721
13722
13723              Locate osgVolume This module defines
13724
13725
13726              OSGVOLUME_FOUND - Was osgVolume found?  OSGVOLUME_INCLUDE_DIR  -
13727              Where to find the headers OSGVOLUME_LIBRARIES - The libraries to
13728              link for osgVolume (use this)
13729
13730
13731              OSGVOLUME_LIBRARY    -    The    osgVolume    library    OSGVOL‐
13732              UME_LIBRARY_DEBUG - The osgVolume debug library
13733
13734
13735              $OSGDIR  is an environment variable that would correspond to the
13736              ./configure --prefix=$OSGDIR used in building osg.
13737
13738
13739              Created by Eric Wing.
13740
13741
13742       FindosgWidget
13743
13744
13745              This is part of the Findosg* suite used to  find  OpenSceneGraph
13746              components.  Each  component  is separate and you must opt in to
13747              each module. You must  also opt into OpenGL and OpenThreads (and
13748              Producer  if needed) as these  modules won't do it for you. This
13749              is to allow you control over your own  system piece by piece  in
13750              case  you  need  to  opt out of certain components or change the
13751              Find behavior for  a  particular  module  (perhaps  because  the
13752              default FindOpenGL.cmake module doesn't work with your system as
13753              an example). If you want to use a more  convenient  module  that
13754              includes everything, use the FindOpenSceneGraph.cmake instead of
13755              the Findosg*.cmake modules.
13756
13757
13758              Locate osgWidget This module defines
13759
13760
13761              OSGWIDGET_FOUND - Was osgWidget found?  OSGWIDGET_INCLUDE_DIR  -
13762              Where to find the headers OSGWIDGET_LIBRARIES - The libraries to
13763              link for osgWidget (use this)
13764
13765
13766              OSGWIDGET_LIBRARY    -    The    osgWidget    library    OSGWID‐
13767              GET_LIBRARY_DEBUG - The osgWidget debug library
13768
13769
13770              $OSGDIR  is an environment variable that would correspond to the
13771              ./configure --prefix=$OSGDIR used in building osg.
13772
13773
13774              FindosgWidget.cmake tweaked from Findosg* suite  as  created  by
13775              Eric Wing.
13776
13777
13778       Findosg_functions
13779
13780
13781
13782
13783
13784              This CMake file contains two macros to assist with searching for
13785              OSG libraries and nodekits.
13786
13787
13788
13789       FindwxWidgets
13790              Find a wxWidgets (a.k.a., wxWindows) installation.
13791
13792              This module finds  if  wxWidgets  is  installed  and  selects  a
13793              default configuration to use. wxWidgets is a modular library. To
13794              specify the modules that you will use, you need to name them  as
13795              components to the package:
13796
13797
13798              FIND_PACKAGE(wxWidgets COMPONENTS core base ...)
13799
13800
13801              There are two search branches: a windows style and a unix style.
13802              For windows, the following variables are searched for and set to
13803              defaults  in  case  of  multiple  choices.  Change  them  if the
13804              defaults are not desired (i.e., these are the only variables you
13805              should change to select a configuration):
13806
13807
13808                wxWidgets_ROOT_DIR      - Base wxWidgets directory
13809                                          (e.g., C:/wxWidgets-2.6.3).
13810                wxWidgets_LIB_DIR       - Path to wxWidgets libraries
13811                                          (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
13812                wxWidgets_CONFIGURATION - Configuration to use
13813                                          (e.g., msw, mswd, mswu, mswunivud, etc.)
13814                wxWidgets_EXCLUDE_COMMON_LIBRARIES
13815                                        - Set to TRUE to exclude linking of
13816                                          commonly required libs (e.g., png tiff
13817                                          jpeg zlib regex expat).
13818
13819
13820
13821
13822              For  unix  style  it  uses the wx-config utility. You can select
13823              between  debug/release,  unicode/ansi,  universal/non-universal,
13824              and  static/shared in the QtDialog or ccmake interfaces by turn‐
13825              ing ON/OFF the following variables:
13826
13827
13828                wxWidgets_USE_DEBUG
13829                wxWidgets_USE_UNICODE
13830                wxWidgets_USE_UNIVERSAL
13831                wxWidgets_USE_STATIC
13832
13833
13834
13835
13836              There is also a wxWidgets_CONFIG_OPTIONS variable for all  other
13837              options  that  need  to  be passed to the wx-config utility. For
13838              example, to use the base toolkit found in the  /usr/local  path,
13839              set  the  variable  (before calling the FIND_PACKAGE command) as
13840              such:
13841
13842
13843                SET(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr)
13844
13845
13846
13847
13848              The following are set after the configuration is done  for  both
13849              windows and unix style:
13850
13851
13852                wxWidgets_FOUND            - Set to TRUE if wxWidgets was found.
13853                wxWidgets_INCLUDE_DIRS     - Include directories for WIN32
13854                                             i.e., where to find "wx/wx.h" and
13855                                             "wx/setup.h"; possibly empty for unices.
13856                wxWidgets_LIBRARIES        - Path to the wxWidgets libraries.
13857                wxWidgets_LIBRARY_DIRS     - compile time link dirs, useful for
13858                                             rpath on UNIX. Typically an empty string
13859                                             in WIN32 environment.
13860                wxWidgets_DEFINITIONS      - Contains defines required to compile/link
13861                                             against WX, e.g. WXUSINGDLL
13862                wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link
13863                                             against WX debug builds, e.g. __WXDEBUG__
13864                wxWidgets_CXX_FLAGS        - Include dirs and compiler flags for
13865                                             unices, empty on WIN32. Essentially
13866                                             "`wx-config --cxxflags`".
13867                wxWidgets_USE_FILE         - Convenience include file.
13868
13869
13870
13871
13872              Sample usage:
13873
13874
13875                 # Note that for MinGW users the order of libs is important!
13876                 FIND_PACKAGE(wxWidgets COMPONENTS net gl core base)
13877                 IF(wxWidgets_FOUND)
13878                   INCLUDE(${wxWidgets_USE_FILE})
13879                   # and for each of your dependent executable/library targets:
13880                   TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
13881                 ENDIF(wxWidgets_FOUND)
13882
13883
13884
13885
13886              If wxWidgets is required (i.e., not an optional part):
13887
13888
13889                 FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
13890                 INCLUDE(${wxWidgets_USE_FILE})
13891                 # and for each of your dependent executable/library targets:
13892                 TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
13893
13894
13895       FindwxWindows
13896              Find wxWindows (wxWidgets) installation
13897
13898              This module finds if wxWindows/wxWidgets is installed and deter‐
13899              mines where the include files and libraries are. It also  deter‐
13900              mines  what the name of the library is. Please note this file is
13901              DEPRECATED and replaced by FindwxWidgets.cmake. This  code  sets
13902              the following variables:
13903
13904
13905                WXWINDOWS_FOUND     = system has WxWindows
13906                WXWINDOWS_LIBRARIES = path to the wxWindows libraries
13907                                      on Unix/Linux with additional
13908                                      linker flags from
13909                                      "wx-config --libs"
13910                CMAKE_WXWINDOWS_CXX_FLAGS  = Compiler flags for wxWindows,
13911                                             essentially "`wx-config --cxxflags`"
13912                                             on Linux
13913                WXWINDOWS_INCLUDE_DIR      = where to find "wx/wx.h" and "wx/setup.h"
13914                WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on
13915                                              Unix
13916                WXWINDOWS_DEFINITIONS      = extra defines
13917
13918
13919
13920
13921              OPTIONS If you need OpenGL support please
13922
13923
13924                SET(WXWINDOWS_USE_GL 1)
13925
13926              in your CMakeLists.txt *before* you include this file.
13927
13928
13929                HAVE_ISYSTEM      - true required to replace -I by -isystem on g++
13930
13931
13932
13933
13934              For  convenience  include  Use_wxWindows.cmake in your project's
13935              CMakeLists.txt using INCLUDE(Use_wxWindows).
13936
13937
13938              USAGE
13939
13940
13941                SET(WXWINDOWS_USE_GL 1)
13942                FIND_PACKAGE(wxWindows)
13943
13944
13945
13946
13947              NOTES wxWidgets 2.6.x is supported for  monolithic  builds  e.g.
13948              compiled  in wx/build/msw dir as:
13949
13950
13951                nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1
13952
13953
13954
13955
13956              DEPRECATED
13957
13958
13959                CMAKE_WX_CAN_COMPILE
13960                WXWINDOWS_LIBRARY
13961                CMAKE_WX_CXX_FLAGS
13962                WXWINDOWS_INCLUDE_PATH
13963
13964
13965
13966
13967              AUTHOR  Jan  Woetzel <http://www.mip.informatik.uni-kiel.de/~jw>
13968              (07/2003-01/2006)
13969
13970
13971       FortranCInterface
13972              Fortran/C Interface Detection
13973
13974              This module automatically detects the API by which C and Fortran
13975              languages  interact.   Variables  indicate  if  the  mangling is
13976              found:
13977
13978
13979                 FortranCInterface_GLOBAL_FOUND = Global subroutines and functions
13980                 FortranCInterface_MODULE_FOUND = Module subroutines and functions
13981                                                  (declared by "MODULE PROCEDURE")
13982
13983              A function is provided to generate a C  header  file  containing
13984              macros to mangle symbol names:
13985
13986
13987                 FortranCInterface_HEADER(<file>
13988                                          [MACRO_NAMESPACE <macro-ns>]
13989                                          [SYMBOL_NAMESPACE <ns>]
13990                                          [SYMBOLS [<module>:]<function> ...])
13991
13992              It generates in <file> definitions of the following macros:
13993
13994
13995                 #define FortranCInterface_GLOBAL (name,NAME) ...
13996                 #define FortranCInterface_GLOBAL_(name,NAME) ...
13997                 #define FortranCInterface_MODULE (mod,name, MOD,NAME) ...
13998                 #define FortranCInterface_MODULE_(mod,name, MOD,NAME) ...
13999
14000              These  macros mangle four categories of Fortran symbols, respec‐
14001              tively:
14002
14003
14004                 - Global symbols without '_': call mysub()
14005                 - Global symbols with '_'   : call my_sub()
14006                 - Module symbols without '_': use mymod; call mysub()
14007                 - Module symbols with '_'   : use mymod; call my_sub()
14008
14009              If mangling for a category is not known, its macro is left unde‐
14010              fined. All macros require raw names in both lower case and upper
14011              case. The MACRO_NAMESPACE option replaces the default "FortranC‐
14012              Interface_" prefix with a given namespace "<macro-ns>".
14013
14014
14015              The  SYMBOLS option lists symbols to mangle automatically with C
14016              preprocessor definitions:
14017
14018
14019                 <function>          ==> #define <ns><function> ...
14020                 <module>:<function> ==> #define <ns><module>_<function> ...
14021
14022              If the mangling for some symbol is not known then no  preproces‐
14023              sor  definition is created, and a warning is displayed. The SYM‐
14024              BOL_NAMESPACE option prefixes all preprocessor definitions  gen‐
14025              erated by the SYMBOLS option with a given namespace "<ns>".
14026
14027
14028              Example usage:
14029
14030
14031                 include(FortranCInterface)
14032                 FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_")
14033
14034              This  creates  a  "FC.h"  header  that  defines  mangling macros
14035              FC_GLOBAL(), FC_GLOBAL_(), FC_MODULE(), and FC_MODULE_().
14036
14037
14038              Example usage:
14039
14040
14041                 include(FortranCInterface)
14042                 FortranCInterface_HEADER(FCMangle.h
14043                                          MACRO_NAMESPACE "FC_"
14044                                          SYMBOL_NAMESPACE "FC_"
14045                                          SYMBOLS mysub mymod:my_sub)
14046
14047              This creates a "FCMangle.h" header that defines the same  FC_*()
14048              mangling  macros  as the previous example plus preprocessor sym‐
14049              bols FC_mysub and FC_mymod_my_sub.
14050
14051
14052              Another function is provided to  verify  that  the  Fortran  and
14053              C/C++ compilers work together:
14054
14055
14056                 FortranCInterface_VERIFY([CXX] [QUIET])
14057
14058              It  tests  whether  a simple test executable using Fortran and C
14059              (and C++ when the CXX option is given) compiles and  links  suc‐
14060              cessfully.  The  result is stored in the cache entry FortranCIn‐
14061              terface_VERIFIED_C (or FortranCInterface_VERIFIED_CXX if CXX  is
14062              given)  as  a boolean. If the check fails and QUIET is not given
14063              the function terminates with a  FATAL_ERROR  message  describing
14064              the problem.  The purpose of this check is to stop a build early
14065              for incompatible compiler combinations.
14066
14067
14068              FortranCInterface is aware of possible GLOBAL  and  MODULE  man‐
14069              glings  for  many  Fortran  compilers,  but  it also provides an
14070              interface to specify new possible manglings.  Set the variables
14071
14072
14073                 FortranCInterface_GLOBAL_SYMBOLS
14074                 FortranCInterface_MODULE_SYMBOLS
14075
14076              before including FortranCInterface to specify manglings  of  the
14077              symbols   "MySub",   "My_Sub",  "MyModule:MySub",  and  "My_Mod‐
14078              ule:My_Sub". For example, the code:
14079
14080
14081                 set(FortranCInterface_GLOBAL_SYMBOLS mysub_ my_sub__ MYSUB_)
14082                   #                                  ^^^^^  ^^^^^^   ^^^^^
14083                 set(FortranCInterface_MODULE_SYMBOLS
14084                     __mymodule_MOD_mysub __my_module_MOD_my_sub)
14085                   #   ^^^^^^^^     ^^^^^   ^^^^^^^^^     ^^^^^^
14086                 include(FortranCInterface)
14087
14088              tells FortranCInterface to try  given  GLOBAL  and  MODULE  man‐
14089              glings.  (The  carets  point  at raw symbol names for clarity in
14090              this example but are not needed.)
14091
14092
14093       GetPrerequisites
14094              Functions to analyze and list executable file prerequisites.
14095
14096              This module provides functions to list the .dll, .dylib  or  .so
14097              files that an executable or shared library file depends on. (Its
14098              prerequisites.)
14099
14100
14101              It uses various tools to obtain  the  list  of  required  shared
14102              library files:
14103
14104
14105                 dumpbin (Windows)
14106                 ldd (Linux/Unix)
14107                 otool (Mac OSX)
14108
14109              The following functions are provided by this module:
14110
14111
14112                 get_prerequisites
14113                 list_prerequisites
14114                 list_prerequisites_by_glob
14115                 gp_append_unique
14116                 is_file_executable
14117                 gp_item_default_embedded_path
14118                   (projects can override with gp_item_default_embedded_path_override)
14119                 gp_resolve_item
14120                   (projects can override with gp_resolve_item_override)
14121                 gp_resolved_file_type
14122                   (projects can override with gp_resolved_file_type_override)
14123                 gp_file_type
14124
14125              Requires  CMake  2.6 or greater because it uses function, break,
14126              return and PARENT_SCOPE.
14127
14128
14129                GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse>
14130                                  <dirs>)
14131
14132              Get the list of shared library files required by  <target>.  The
14133              list  in  the variable named <prerequisites_var> should be empty
14134              on first entry to this function.  On  exit,  <prerequisites_var>
14135              will contain the list of required shared library files.
14136
14137
14138              <target>  is  the  full  path  to an executable file. <prerequi‐
14139              sites_var> is the name  of  a  CMake  variable  to  contain  the
14140              results.  <exclude_system>  must be 0 or 1 indicating whether to
14141              include or exclude "system" prerequisites. If <recurse>  is  set
14142              to  1  all  prerequisites will be found recursively, if set to 0
14143              only direct prerequisites are listed. <exepath> is the  path  to
14144              the top level executable used for @executable_path replacment on
14145              the Mac. <dirs> is a list of  paths  where  libraries  might  be
14146              found:  these paths are searched first when a target without any
14147              path info is given. Then  standard  system  locations  are  also
14148              searched: PATH, Framework locations, /usr/lib...
14149
14150
14151                LIST_PREREQUISITES(<target> [<recurse> [<exclude_system> [<verbose>]]])
14152
14153              Print a message listing the prerequisites of <target>.
14154
14155
14156              <target> is the name of a shared library or executable target or
14157              the full path  to  a  shared  library  or  executable  file.  If
14158              <recurse>  is  set  to  1 all prerequisites will be found recur‐
14159              sively, if set  to  0  only  direct  prerequisites  are  listed.
14160              <exclude_system> must be 0 or 1 indicating whether to include or
14161              exclude "system" prerequisites. With <verbose> set to 0 only the
14162              full path names of the prerequisites are printed, set to 1 extra
14163              informatin will be displayed.
14164
14165
14166                LIST_PREREQUISITES_BY_GLOB(<glob_arg> <glob_exp>)
14167
14168              Print the prerequisites of shared library and  executable  files
14169              matching  a globbing pattern. <glob_arg> is GLOB or GLOB_RECURSE
14170              and <glob_exp> is a globbing expression used with "file(GLOB" or
14171              "file(GLOB_RECURSE"  to  retrieve a list of matching files. If a
14172              matching file is executable, its prerequisites are listed.
14173
14174
14175              Any additional (optional) arguments provided are passed along as
14176              the optional arguments to the list_prerequisites calls.
14177
14178
14179                GP_APPEND_UNIQUE(<list_var> <value>)
14180
14181              Append <value> to the list variable <list_var> only if the value
14182              is not already in the list.
14183
14184
14185                IS_FILE_EXECUTABLE(<file> <result_var>)
14186
14187              Return 1 in <result_var> if <file> is  a  binary  executable,  0
14188              otherwise.
14189
14190
14191                GP_ITEM_DEFAULT_EMBEDDED_PATH(<item> <default_embedded_path_var>)
14192
14193              Return the path that others should refer to the item by when the
14194              item is embedded inside a bundle.
14195
14196
14197              Override on a per-project basis by providing a  project-specific
14198              gp_item_default_embedded_path_override function.
14199
14200
14201                GP_RESOLVE_ITEM(<context> <item> <exepath> <dirs> <resolved_item_var>)
14202
14203              Resolve an item into an existing full path file.
14204
14205
14206              Override  on a per-project basis by providing a project-specific
14207              gp_resolve_item_override function.
14208
14209
14210                GP_RESOLVED_FILE_TYPE(<original_file> <file> <exepath> <dirs> <type_var>)
14211
14212              Return the type  of  <file>  with  respect  to  <original_file>.
14213              String  describing  type of prerequisite is returned in variable
14214              named <type_var>.
14215
14216
14217              Use <exepath> and <dirs> if necessary  to  resolve  non-absolute
14218              <file> values -- but only for non-embedded items.
14219
14220
14221              Possible types are:
14222
14223
14224                 system
14225                 local
14226                 embedded
14227                 other
14228
14229              Override  on a per-project basis by providing a project-specific
14230              gp_resolved_file_type_override function.
14231
14232
14233                GP_FILE_TYPE(<original_file> <file> <type_var>)
14234
14235              Return the type  of  <file>  with  respect  to  <original_file>.
14236              String  describing  type of prerequisite is returned in variable
14237              named <type_var>.
14238
14239
14240              Possible types are:
14241
14242
14243                 system
14244                 local
14245                 embedded
14246                 other
14247
14248
14249       InstallRequiredSystemLibraries
14250
14251
14252              By including this file, all library files listed in the variable
14253              CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS   will   be   installed   with
14254              INSTALL(PROGRAMS ...) into bin for WIN32 and lib for  non-WIN32.
14255              If  CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before
14256              including this file, then the INSTALL command is not called. The
14257              user  can  use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to
14258              use a custom install command and install them however they want.
14259              If  it  is  the  MSVC  compiler,  then  the  microsoft  run time
14260              libraries  will  be  found  and  automatically  added   to   the
14261              CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS,     and     installed.     If
14262              CMAKE_INSTALL_DEBUG_LIBRARIES is set and it  is  the  MSVC  com‐
14263              piler, then the debug libraries are installed when available. If
14264              CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then  only  the  debug
14265              libraries  are  installed when both debug and release are avail‐
14266              able. If CMAKE_INSTALL_MFC_LIBRARIES is set  then  the  MFC  run
14267              time  libraries  are  installed  as  well  as  the  CRT run time
14268              libraries. If  CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION  is  set
14269              then  the  libraries are installed to that directory rather than
14270              the default. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is
14271              NOT  set,  then this file warns about required files that do not
14272              exist. You can set this variable to  ON  before  including  this
14273              file  to  avoid  the  warning.  For  example,  the Visual Studio
14274              Express editions do not include the redistributable files, so if
14275              you  include  this  file  on  a  machine  with  only  VS Express
14276              installed, you'll get the warning.
14277
14278
14279       MacroAddFileDependencies
14280              MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...)
14281
14282              Using the macro  MACRO_ADD_FILE_DEPENDENCIES()  is  discouraged.
14283              There  are  usually better ways to specify the correct dependen‐
14284              cies.
14285
14286
14287              MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is  just  a
14288              convenience  wrapper around the OBJECT_DEPENDS source file prop‐
14289              erty. You can just use SET_PROPERTY(SOURCE <file>  APPEND  PROP‐
14290              ERTY OBJECT_DEPENDS depend_files) instead.
14291
14292
14293       Qt4ConfigDependentSettings
14294
14295
14296              This  file  is  included  by  FindQt4.cmake,  don't  include  it
14297              directly.
14298
14299
14300       Qt4Macros
14301
14302
14303              This  file  is  included  by  FindQt4.cmake,  don't  include  it
14304              directly.
14305
14306
14307       SelectLibraryConfigurations
14308
14309
14310              select_library_configurations( basename )
14311
14312
14313              This  macro  takes  a library base name as an argument, and will
14314              choose good  values  for  basename_LIBRARY,  basename_LIBRARIES,
14315              basename_LIBRARY_DEBUG,  and  basename_LIBRARY_RELEASE depending
14316              on   what   has   been   found   and   set.    If   only   base‐
14317              name_LIBRARY_RELEASE   is   defined,   basename_LIBRARY,   base‐
14318              name_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE will be set  to
14319              the  release  value.  If only basename_LIBRARY_DEBUG is defined,
14320              then   basename_LIBRARY,   basename_LIBRARY_DEBUG   and    base‐
14321              name_LIBRARY_RELEASE will take the debug value.
14322
14323
14324              If  the  generator  supports  configuration  types,  then  base‐
14325              name_LIBRARY and basename_LIBRARIES will be set with  debug  and
14326              optimized  flags specifying the library to be used for the given
14327              configuration.  If no build type has been set or  the  generator
14328              in   use  does  not  support  configuration  types,  then  base‐
14329              name_LIBRARY and basename_LIBRARIES will take only  the  release
14330              values.
14331
14332
14333       SquishTestScript
14334
14335
14336
14337
14338
14339              This  script  launches  a GUI test using Squish.  You should not
14340              call the script directly; instead, you should access it via  the
14341              SQUISH_ADD_TEST macro that is defined in FindSquish.cmake.
14342
14343
14344              This  script  starts the Squish server, launches the test on the
14345              client, and finally stops the squish server.  If  any  of  these
14346              steps  fail  (including  if  the tests do not pass) then a fatal
14347              error is raised.
14348
14349
14350
14351       TestBigEndian
14352              Define macro to determine endian type
14353
14354              Check if the system is big endian or little endian
14355
14356
14357                TEST_BIG_ENDIAN(VARIABLE)
14358                VARIABLE - variable to store the result to
14359
14360
14361
14362
14363
14364       TestCXXAcceptsFlag
14365              Test CXX compiler for a flag
14366
14367              Check if the CXX compiler accepts a flag
14368
14369
14370                Macro CHECK_CXX_ACCEPTS_FLAG(FLAGS VARIABLE) -
14371                   checks if the function exists
14372                FLAGS - the flags to try
14373                VARIABLE - variable to store the result
14374
14375
14376
14377
14378
14379       TestForANSIForScope
14380              Check for ANSI for scope support
14381
14382              Check if the compiler restricts the scope of variables  declared
14383              in a for-init-statement to the loop body.
14384
14385
14386                CMAKE_NO_ANSI_FOR_SCOPE - holds result
14387
14388
14389
14390
14391
14392       TestForANSIStreamHeaders
14393              Test for compiler support of ANSI stream headers iostream, etc.
14394
14395              check if the compiler supports the standard ANSI iostream header
14396              (without the .h)
14397
14398
14399                CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
14400
14401
14402
14403
14404
14405       TestForSSTREAM
14406              Test for compiler support of ANSI sstream header
14407
14408              check if the compiler supports the standard ANSI sstream header
14409
14410
14411                CMAKE_NO_ANSI_STRING_STREAM - defined by the results
14412
14413
14414
14415
14416
14417       TestForSTDNamespace
14418              Test for std:: namespace support
14419
14420              check if the compiler supports std:: on stl classes
14421
14422
14423                CMAKE_NO_STD_NAMESPACE - defined by the results
14424
14425
14426
14427
14428
14429       UseEcos
14430              This module defines variables and macros required to build  eCos
14431              application.
14432
14433              This file contains the following macros: ECOS_ADD_INCLUDE_DIREC‐
14434              TORIES() - add the eCos  include  dirs  ECOS_ADD_EXECUTABLE(name
14435              source1   ...   sourceN   )   -   create   an   eCos  executable
14436              ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN )  -  adjusts  the
14437              path of the source files and puts the result into VAR
14438
14439
14440              Macros  for  selecting  the  toolchain: ECOS_USE_ARM_ELF_TOOLS()
14441              - enable the ARM ELF toolchain for the  directory  where  it  is
14442              called  ECOS_USE_I386_ELF_TOOLS()       -  enable  the  i386 ELF
14443              toolchain   for   the   directory    where    it    is    called
14444              ECOS_USE_PPC_EABI_TOOLS()       -  enable  the PowerPC toolchain
14445              for the directory where it is called
14446
14447
14448              It contains the following variables:  ECOS_DEFINITIONS  ECOSCON‐
14449              FIG_EXECUTABLE   ECOS_CONFIG_FILE                -  defaults  to
14450              ecos.ecc, if your eCos configuration file has a different  name,
14451              adjust this variable for internal use only:
14452
14453
14454                ECOS_ADD_TARGET_LIB
14455
14456
14457       UsePkgConfig
14458              obsolete pkg-config module for CMake
14459
14460
14461
14462
14463              Defines the following macros:
14464
14465
14466              PKGCONFIG(package includedir libdir linkflags cflags)
14467
14468
14469              Calling  PKGCONFIG  will fill the desired information into the 4
14470              given arguments,  e.g.  PKGCONFIG(libart-2.0  LIBART_INCLUDE_DIR
14471              LIBART_LINK_DIR  LIBART_LINK_FLAGS  LIBART_CFLAGS) if pkg-config
14472              was NOT found or the specified software package  doesn't  exist,
14473              the  variable will be empty when the function returns, otherwise
14474              they will contain the respective information
14475
14476
14477
14478       UseQt4 Use Module for QT4
14479
14480              Sets up C and C++ to use Qt 4.  It is assumed that  FindQt.cmake
14481              has  already  been  loaded.  See FindQt.cmake for information on
14482              how to load Qt 4 into your CMake project.
14483
14484
14485       UseSWIG
14486              SWIG module for CMake
14487
14488              Defines the following macros:
14489
14490
14491                 SWIG_ADD_MODULE(name language [ files ])
14492                   - Define swig module with given name and specified language
14493                 SWIG_LINK_LIBRARIES(name [ libraries ])
14494                   - Link libraries to swig module
14495
14496              All other macros are for internal use only. To  get  the  actual
14497              name  of the swig module, use: ${SWIG_MODULE_${name}_REAL_NAME}.
14498              Set Source files properties such as CPLUSPLUS and SWIG_FLAGS  to
14499              specify  special  behavior of SWIG. Also global CMAKE_SWIG_FLAGS
14500              can be used to add special flags to all swig calls. Another spe‐
14501              cial  variable  is  CMAKE_SWIG_OUTDIR,  it allows one to specify
14502              where to write all  the  swig  generated  module  (swig  -outdir
14503              option) The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS
14504              may be used to specify extra dependencies for the generated mod‐
14505              ules.  If  the  source  file generated by swig need some special
14506              flag  you  can  use  SET_SOURCE_FILES_PROPERTIES(  ${swig_gener‐
14507              ated_file_fullname}
14508
14509
14510                      PROPERTIES COMPILE_FLAGS "-bla")
14511
14512
14513       Use_wxWindows
14514              ---------------------------------------------------
14515
14516
14517
14518
14519              This convenience include finds if wxWindows is installed and set
14520              the appropriate libs, incdirs, flags etc. author Jan Woetzel <jw
14521              -at- mip.informatik.uni-kiel.de> (07/2003)
14522
14523
14524              USAGE:
14525
14526
14527                 just include Use_wxWindows.cmake
14528                 in your projects CMakeLists.txt
14529
14530              INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
14531
14532
14533                 if you are sure you need GL then
14534
14535              SET(WXWINDOWS_USE_GL 1)
14536
14537
14538                 *before* you include this file.
14539
14540
14541       UsewxWidgets
14542              Convenience include for using wxWidgets library.
14543
14544              Determines if wxWidgets was FOUND and sets the appropriate libs,
14545              incdirs, flags, etc.  INCLUDE_DIRECTORIES  and  LINK_DIRECTORIES
14546              are called.
14547
14548
14549              USAGE
14550
14551
14552                # Note that for MinGW users the order of libs is important!
14553                FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
14554                INCLUDE(${wxWidgets_USE_FILE})
14555                # and for each of your dependant executable/library targets:
14556                TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
14557
14558
14559
14560
14561              DEPRECATED
14562
14563
14564                LINK_LIBRARIES is not called in favor of adding dependencies per target.
14565
14566
14567
14568
14569              AUTHOR
14570
14571
14572                Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
14573
14574

POLICIES

14576       CMP0000
14577              A minimum required CMake version must be specified.
14578
14579              CMake  requires  that  projects  specify the version of CMake to
14580              which they have been written.  This policy has been put in place
14581              so  users trying to build the project may be told when they need
14582              to update their CMake.  Specifying  a  version  also  helps  the
14583              project  build  with  CMake  versions newer than that specified.
14584              Use the cmake_minimum_required command at the top of  your  main
14585              CMakeLists.txt file:
14586
14587
14588                cmake_minimum_required(VERSION <major>.<minor>)
14589
14590              where "<major>.<minor>" is the version of CMake you want to sup‐
14591              port (such as "2.6").  The command will ensure that at least the
14592              given  version  of  CMake  is running and help newer versions be
14593              compatible with the project.  See documentation  of  cmake_mini‐
14594              mum_required for details.
14595
14596
14597              Note  that  the  command  invocation  must  appear in the CMake‐
14598              Lists.txt file itself; a call in an included file is not  suffi‐
14599              cient.   However,  the cmake_policy command may be called to set
14600              policy CMP0000 to OLD  or  NEW  behavior  explicitly.   The  OLD
14601              behavior  is to silently ignore the missing invocation.  The NEW
14602              behavior is to issue an error instead of a warning.  An included
14603              file  may  set  CMP0000  explicitly to affect how this policy is
14604              enforced for the main CMakeLists.txt file.
14605
14606
14607              This policy was introduced in CMake version 2.6.0.
14608
14609
14610       CMP0001
14611              CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
14612
14613              The OLD behavior is to check  CMAKE_BACKWARDS_COMPATIBILITY  and
14614              present  it  to  the  user.   The  NEW  behavior  is  to  ignore
14615              CMAKE_BACKWARDS_COMPATIBILITY completely.
14616
14617
14618              In CMake 2.4 and below the variable  CMAKE_BACKWARDS_COMPATIBIL‐
14619              ITY  was  used to request compatibility with earlier versions of
14620              CMake.  In CMake 2.6 and above all compatibility issues are han‐
14621              dled  by  policies and the cmake_policy command.  However, CMake
14622              must  still  check  CMAKE_BACKWARDS_COMPATIBILITY  for  projects
14623              written for CMake 2.4 and below.
14624
14625
14626              This  policy  was introduced in CMake version 2.6.0.  CMake ver‐
14627              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14628              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14629              explicitly.
14630
14631
14632       CMP0002
14633              Logical target names must be globally unique.
14634
14635              Targets  names  created  with  add_executable,  add_library,  or
14636              add_custom_target  are logical build target names.  Logical tar‐
14637              get names must be globally unique because:
14638
14639
14640                - Unique names may be referenced unambiguously both in CMake
14641                  code and on make tool command lines.
14642                - Logical names are used by Xcode and VS IDE generators
14643                  to produce meaningful project names for the targets.
14644
14645              The logical name of executable and library targets does not have
14646              to  correspond to the physical file names built.  Consider using
14647              the OUTPUT_NAME target property to create two targets  with  the
14648              same physical name while keeping logical names distinct.  Custom
14649              targets must simply have globally unique names (unless one  uses
14650              the  global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Make‐
14651              files generator).
14652
14653
14654              This policy was introduced in CMake version 2.6.0.   CMake  ver‐
14655              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14656              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14657              explicitly.
14658
14659
14660       CMP0003
14661              Libraries  linked  via full path no longer produce linker search
14662              paths.
14663
14664              This policy affects how libraries whose full paths are NOT known
14665              are  found  at link time, but was created due to a change in how
14666              CMake deals with libraries whose full paths are known.  Consider
14667              the code
14668
14669
14670                target_link_libraries(myexe /path/to/libA.so)
14671
14672              CMake  2.4 and below implemented linking to libraries whose full
14673              paths are known by splitting them on the link line into separate
14674              components  consisting of the linker search path and the library
14675              name.  The example code might have produced something like
14676
14677
14678                ... -L/path/to -lA ...
14679
14680              in order to link to library A.  An  analysis  was  performed  to
14681              order  multiple link directories such that the linker would find
14682              library A in the desired location, but there are cases in  which
14683              this  does  not work.  CMake versions 2.6 and above use the more
14684              reliable approach of passing the full path to libraries directly
14685              to  the  linker  in  most  cases.  The example code now produces
14686              something like
14687
14688
14689                ... /path/to/libA.so ....
14690
14691              Unfortunately this change can break code like
14692
14693
14694                target_link_libraries(myexe /path/to/libA.so B)
14695
14696              where "B" is meant to find  "/path/to/libB.so".   This  code  is
14697              wrong  because  the  user is asking the linker to find library B
14698              but has not provided a linker search path (which  may  be  added
14699              with the link_directories command).  However, with the old link‐
14700              ing implementation the code would work accidentally because  the
14701              linker  search  path added for library A allowed library B to be
14702              found.
14703
14704
14705              In order to support projects depending on  linker  search  paths
14706              added  by  linking  to  libraries with known full paths, the OLD
14707              behavior for this policy will add the linker search  paths  even
14708              though  they  are not needed for their own libraries.  When this
14709              policy is set to OLD, CMake will produce a link line such as
14710
14711
14712                ... -L/path/to /path/to/libA.so -lB ...
14713
14714              which will allow library B to be found  as  it  was  previously.
14715              When  this  policy is set to NEW, CMake will produce a link line
14716              such as
14717
14718
14719                ... /path/to/libA.so -lB ...
14720
14721              which more accurately matches what the project specified.
14722
14723
14724              The setting for this policy used when generating the  link  line
14725              is  that  in  effect  when  the target is created by an add_exe‐
14726              cutable or  add_library  command.   For  the  example  described
14727              above, the code
14728
14729
14730                cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)
14731                add_executable(myexe myexe.c)
14732                target_link_libraries(myexe /path/to/libA.so B)
14733
14734              will work and suppress the warning for this policy.  It may also
14735              be updated to work with the corrected linking approach:
14736
14737
14738                cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
14739                link_directories(/path/to) # needed to find library B
14740                add_executable(myexe myexe.c)
14741                target_link_libraries(myexe /path/to/libA.so B)
14742
14743              Even better, library B may be specified with a full path:
14744
14745
14746                add_executable(myexe myexe.c)
14747                target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)
14748
14749              When all items on the link line have known paths CMake does  not
14750              check this policy so it has no effect.
14751
14752
14753              Note that the warning for this policy will be issued for at most
14754              one target.  This avoids flooding users with messages for  every
14755              target  when  setting the policy once will probably fix all tar‐
14756              gets.
14757
14758
14759              This policy was introduced in CMake version 2.6.0.   CMake  ver‐
14760              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14761              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14762              explicitly.
14763
14764
14765       CMP0004
14766              Libraries linked may not have leading or trailing whitespace.
14767
14768              CMake versions 2.4 and below silently removed leading and trail‐
14769              ing whitespace from libraries linked with code like
14770
14771
14772                target_link_libraries(myexe " A ")
14773
14774              This could lead to subtle errors in user projects.
14775
14776
14777              The OLD behavior for this policy is to silently  remove  leading
14778              and trailing whitespace.  The NEW behavior for this policy is to
14779              diagnose the existence of such whitespace as an error.  The set‐
14780              ting  for  this  policy  used when checking the library names is
14781              that in effect when the target is created by  an  add_executable
14782              or add_library command.
14783
14784
14785              This  policy  was introduced in CMake version 2.6.0.  CMake ver‐
14786              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14787              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14788              explicitly.
14789
14790
14791       CMP0005
14792              Preprocessor definition values are now escaped automatically.
14793
14794              This policy determines whether  or  not  CMake  should  generate
14795              escaped  preprocessor  definition  values  added via add_defini‐
14796              tions.  CMake versions 2.4 and below assumed that  only  trivial
14797              values  would  be given for macros in add_definitions calls.  It
14798              did not attempt to escape non-trivial values such as string lit‐
14799              erals  in  generated  build rules.  CMake versions 2.6 and above
14800              support escaping of most values, but cannot assume the user  has
14801              not  added  escapes already in an attempt to work around limita‐
14802              tions in earlier versions.
14803
14804
14805              The OLD behavior for this policy is to place  definition  values
14806              given  to  add_definitions directly in the generated build rules
14807              without attempting to escape anything.   The  NEW  behavior  for
14808              this  policy is to generate correct escapes for all native build
14809              tools automatically.  See documentation of  the  COMPILE_DEFINI‐
14810              TIONS  target property for limitations of the escaping implemen‐
14811              tation.
14812
14813
14814              This policy was introduced in CMake version 2.6.0.   CMake  ver‐
14815              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14816              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14817              explicitly.
14818
14819
14820       CMP0006
14821              Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.
14822
14823              This policy determines whether the install(TARGETS) command must
14824              be given a BUNDLE DESTINATION when asked  to  install  a  target
14825              with  the  MACOSX_BUNDLE  property set.  CMake 2.4 and below did
14826              not distinguish application bundles from normal executables when
14827              installing  targets.   CMake 2.6 provides a BUNDLE option to the
14828              install(TARGETS) command that specifies rules specific to appli‐
14829              cation bundles on the Mac.  Projects should use this option when
14830              installing a target with the MACOSX_BUNDLE property set.
14831
14832
14833              The OLD behavior for this policy is to fall back to the  RUNTIME
14834              DESTINATION  if  a  BUNDLE  DESTINATION  is  not given.  The NEW
14835              behavior for this policy is to produce an error if a bundle tar‐
14836              get is installed without a BUNDLE DESTINATION.
14837
14838
14839              This  policy  was introduced in CMake version 2.6.0.  CMake ver‐
14840              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14841              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14842              explicitly.
14843
14844
14845       CMP0007
14846              list command no longer ignores empty elements.
14847
14848              This policy determines whether  the  list  command  will  ignore
14849              empty  elements  in  the list. CMake 2.4 and below list commands
14850              ignored all empty elements in the  list.   For  example,  a;b;;c
14851              would  have length 3 and not 4. The OLD behavior for this policy
14852              is to ignore empty list elements. The NEW behavior for this pol‐
14853              icy is to correctly count empty elements in a list.
14854
14855
14856              This  policy  was introduced in CMake version 2.6.0.  CMake ver‐
14857              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14858              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14859              explicitly.
14860
14861
14862       CMP0008
14863              Libraries linked by full-path must have  a  valid  library  file
14864              name.
14865
14866              In CMake 2.4 and below it is possible to write code like
14867
14868
14869                target_link_libraries(myexe /full/path/to/somelib)
14870
14871              where "somelib" is supposed to be a valid library file name such
14872              as "libsomelib.a" or  "somelib.lib".   For  Makefile  generators
14873              this  produces  an error at build time because the dependency on
14874              the full path cannot be found.  For VS IDE and Xcode  generators
14875              this  used  to work by accident because CMake would always split
14876              off the library directory and ask the linker to search  for  the
14877              library by name (-lsomelib or somelib.lib).  Despite the failure
14878              with Makefiles, some projects have code like this and build only
14879              with VS and/or Xcode.  This version of CMake prefers to pass the
14880              full path directly to the native build tool, which will fail  in
14881              this case because it does not name a valid library file.
14882
14883
14884              This  policy  determines  what to do with full paths that do not
14885              appear to name a valid library file.  The OLD behavior for  this
14886              policy  is  to  split the library name from the path and ask the
14887              linker to search for it.  The NEW behavior for this policy is to
14888              trust  the  given  path and pass it directly to the native build
14889              tool unchanged.
14890
14891
14892              This policy was introduced in CMake version 2.6.1.   CMake  ver‐
14893              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14894              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14895              explicitly.
14896
14897
14898       CMP0009
14899              FILE GLOB_RECURSE calls should not follow symlinks by default.
14900
14901              In  CMake  2.6.1 and below, FILE GLOB_RECURSE calls would follow
14902              through symlinks, sometimes coming up  with  unexpectedly  large
14903              result  sets  because  of symlinks to top level directories that
14904              contain hundreds of thousands of files.
14905
14906
14907              This policy determines whether or not to follow symlinks encoun‐
14908              tered during a FILE GLOB_RECURSE call. The OLD behavior for this
14909              policy is to follow the symlinks. The NEW behavior for this pol‐
14910              icy  is  not to follow the symlinks by default, but only if FOL‐
14911              LOW_SYMLINKS is given as an additional argument to the FILE com‐
14912              mand.
14913
14914
14915              This  policy  was introduced in CMake version 2.6.2.  CMake ver‐
14916              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14917              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14918              explicitly.
14919
14920
14921       CMP0010
14922              Bad variable reference syntax is an error.
14923
14924              In CMake 2.6.2 and below, incorrect  variable  reference  syntax
14925              such as a missing close-brace ("${FOO") was reported but did not
14926              stop processing of CMake code.  This policy determines whether a
14927              bad  variable  reference is an error.  The OLD behavior for this
14928              policy is to warn about the error, leave the  string  untouched,
14929              and  continue.  The NEW behavior for this policy is to report an
14930              error.
14931
14932
14933              This policy was introduced in CMake version 2.6.3.   CMake  ver‐
14934              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14935              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14936              explicitly.
14937
14938
14939       CMP0011
14940              Included scripts do automatic cmake_policy PUSH and POP.
14941
14942              In  CMake  2.6.2  and  below,  CMake  Policy settings in scripts
14943              loaded by the include() and find_package() commands would affect
14944              the  includer.   Explicit  invocations of cmake_policy(PUSH) and
14945              cmake_policy(POP) were required to isolate  policy  changes  and
14946              protect  the  includer.  While some scripts intend to affect the
14947              policies of their includer, most do not.   In  CMake  2.6.3  and
14948              above,  include()  and find_package() by default PUSH and POP an
14949              entry on the policy stack around an included script, but provide
14950              a  NO_POLICY_SCOPE option to disable it.  This policy determines
14951              whether or not to imply NO_POLICY_SCOPE for compatibility.   The
14952              OLD  behavior  for  this  policy is to imply NO_POLICY_SCOPE for
14953              include() and find_package() commands.   The  NEW  behavior  for
14954              this  policy  is  to  allow  the  commands  to  do their default
14955              cmake_policy PUSH and POP.
14956
14957
14958              This policy was introduced in CMake version 2.6.3.   CMake  ver‐
14959              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
14960              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
14961              explicitly.
14962
14963
14964       CMP0012
14965              if() recognizes numbers and boolean constants.
14966
14967              In  CMake  versions  2.6.4 and lower the if() command implicitly
14968              dereferenced arguments corresponding to  variables,  even  those
14969              named  like  numbers  or  boolean constants, except for 0 and 1.
14970              Numbers and boolean constants such as true, false, yes, no,  on,
14971              off,  y,  n, notfound, ignore (all case insensitive) were recog‐
14972              nized in  some  cases  but  not  all.   For  example,  the  code
14973              "if(TRUE)"  might  have  evaluated  as false.  Numbers such as 2
14974              were recognized only in boolean  expressions  like  "if(NOT  2)"
14975              (leading  to  false)  but  not as a single-argument like "if(2)"
14976              (also leading to false). Later versions of CMake prefer to treat
14977              numbers  and  boolean constants literally, so they should not be
14978              used as variable names.
14979
14980
14981              The OLD behavior for this policy is  to  implicitly  dereference
14982              variables  named  like  numbers  and  boolean constants. The NEW
14983              behavior for this policy is to  recognize  numbers  and  boolean
14984              constants without dereferencing variables with such names.
14985
14986
14987              This  policy  was introduced in CMake version 2.8.0.  CMake ver‐
14988              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
14989              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
14990              explicitly.
14991
14992
14993       CMP0013
14994              Duplicate binary directories are not allowed.
14995
14996              CMake 2.6.3  and  below  silently  permitted  add_subdirectory()
14997              calls  to create the same binary directory multiple times.  Dur‐
14998              ing build system generation files  would  be  written  and  then
14999              overwritten  in  the build tree and could lead to strange behav‐
15000              ior.  CMake 2.6.4 and above explicitly detect  duplicate  binary
15001              directories.   CMake  2.6.4 always considers this case an error.
15002              In CMake 2.8.0 and above this policy determines whether  or  not
15003              the  case  is  an error.  The OLD behavior for this policy is to
15004              allow duplicate binary directories.  The NEW behavior  for  this
15005              policy  is  to  disallow  duplicate  binary  directories with an
15006              error.
15007
15008
15009              This policy was introduced in CMake version 2.8.0.   CMake  ver‐
15010              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
15011              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
15012              explicitly.
15013
15014
15015       CMP0014
15016              Input directories must have CMakeLists.txt.
15017
15018              CMake  versions  before  2.8  silently  ignored  missing  CMake‐
15019              Lists.txt files in directories referenced by  add_subdirectory()
15020              or  subdirs(),  treating them as if present but empty.  In CMake
15021              2.8.0 and above this policy determines whether or not  the  case
15022              is  an  error.   The OLD behavior for this policy is to silently
15023              ignore the problem.  The NEW behavior  for  this  policy  is  to
15024              report an error.
15025
15026
15027              This  policy  was introduced in CMake version 2.8.0.  CMake ver‐
15028              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
15029              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
15030              explicitly.
15031
15032
15033       CMP0015
15034              link_directories() treats paths relative to the source dir.
15035
15036              In CMake 2.8.0 and lower the link_directories()  command  passed
15037              relative  paths  unchanged  to  the  linker.  In CMake 2.8.1 and
15038              above the link_directories() command prefers to interpret  rela‐
15039              tive  paths  with  respect to CMAKE_CURRENT_SOURCE_DIR, which is
15040              consistent with include_directories() and other  commands.   The
15041              OLD  behavior  for this policy is to use relative paths verbatim
15042              in the linker command.  The NEW behavior for this policy  is  to
15043              convert  relative paths to absolute paths by appending the rela‐
15044              tive path to CMAKE_CURRENT_SOURCE_DIR.
15045
15046
15047              This policy was introduced in CMake version 2.8.1.   CMake  ver‐
15048              sion  2.8.4 warns when the policy is not set and uses OLD behav‐
15049              ior.  Use the cmake_policy command to  set  it  to  OLD  or  NEW
15050              explicitly.
15051
15052
15053       CMP0016
15054              target_link_libraries()  reports error if only argument is not a
15055              target.
15056
15057              In CMake 2.8.2 and  lower  the  target_link_libraries()  command
15058              silently  ignored  if  it was called with only one argument, and
15059              this argument wasn't a valid target. In CMake 2.8.3 and above it
15060              reports an error in this case.
15061
15062
15063              This  policy  was introduced in CMake version 2.8.3.  CMake ver‐
15064              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
15065              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
15066              explicitly.
15067
15068
15069       CMP0017
15070              Prefer files from the CMake module directory when including from
15071              there.
15072
15073              Starting  with CMake 2.8.4, if a cmake-module shipped with CMake
15074              (i.e. located in the CMake module directory) calls include()  or
15075              find_package(), the files located in the the CMake module direc‐
15076              tory are prefered over the  files  in  CMAKE_MODULE_PATH.   This
15077              makes  sure that the modules belonging to CMake always get those
15078              files included which they expect, and against  which  they  were
15079              developed  and  tested.  In call other cases, the files found in
15080              CMAKE_MODULE_PATH still take precedence over  the  ones  in  the
15081              CMake  module  directory.  The OLD behaviour is to always prefer
15082              files from CMAKE_MODULE_PATH over files from the  CMake  modules
15083              directory.
15084
15085
15086              This  policy  was introduced in CMake version 2.8.4.  CMake ver‐
15087              sion 2.8.4 warns when the policy is not set and uses OLD  behav‐
15088              ior.   Use  the  cmake_policy  command  to  set it to OLD or NEW
15089              explicitly.
15090
15091

VARIABLES

VARIABLES THAT CHANGE BEHAVIOR

15094       BUILD_SHARED_LIBS
15095              Global flag to cause add_library to create shared  libraries  if
15096              on.
15097
15098              If  present  and true, this will cause all libraries to be built
15099              shared unless the library  was  explicitly  added  as  a  static
15100              library.   This variable is often added to projects as an OPTION
15101              so that each user of a project can decide if they want to  build
15102              the project using shared or static libraries.
15103
15104
15105       CMAKE_BACKWARDS_COMPATIBILITY
15106              Version of cmake required to build project
15107
15108              From  the  point of view of backwards compatibility, this speci‐
15109              fies what version of CMake should be supported. By default  this
15110              value  is  the version number of CMake that you are running. You
15111              can set this to an older version of CMake to support  deprecated
15112              commands  of  CMake  in  projects that were written to use older
15113              versions of CMake. This can be set by the user  or  set  at  the
15114              beginning of a CMakeLists file.
15115
15116
15117       CMAKE_BUILD_TYPE
15118              Specifies the build type for make based generators.
15119
15120              This specifies what build type will be built in this tree.  Pos‐
15121              sible values are empty, Debug, Release, RelWithDebInfo and  Min‐
15122              SizeRel.  This variable is only supported for make based genera‐
15123              tors. If this variable is supported, then CMake will  also  pro‐
15124              vide   initial   values   for   the   variables  with  the  name
15125              CMAKE_C_FLAGS_[Debug|Release|RelWithDebInfo|MinSizeRel].     For
15126              example,  if CMAKE_BUILD_TYPE is Debug, then CMAKE_C_FLAGS_DEBUG
15127              will be added to the CMAKE_C_FLAGS.
15128
15129
15130       CMAKE_COLOR_MAKEFILE
15131              Enables color output when using the Makefile generator.
15132
15133              When enabled, the generated Makefiles will produce colored  out‐
15134              put. Default is ON.
15135
15136
15137       CMAKE_CONFIGURATION_TYPES
15138              Specifies the available build types.
15139
15140              This specifies what build types will be available such as Debug,
15141              Release, RelWithDebInfo etc. This  has  reasonable  defaults  on
15142              most  platforms.  But  can  be  extended  to provide other build
15143              types. See also CMAKE_BUILD_TYPE.
15144
15145
15146       CMAKE_FIND_LIBRARY_PREFIXES
15147              Prefixes to prepend when looking for libraries.
15148
15149              This specifies what prefixes to add to library  names  when  the
15150              find_library  command  looks for libraries. On UNIX systems this
15151              is typically lib, meaning that  when  trying  to  find  the  foo
15152              library it will look for libfoo.
15153
15154
15155       CMAKE_FIND_LIBRARY_SUFFIXES
15156              Suffixes to append when looking for libraries.
15157
15158              This  specifies  what  suffixes to add to library names when the
15159              find_library command looks for  libraries.  On  Windows  systems
15160              this  is  typically  .lib  and .dll, meaning that when trying to
15161              find the foo library it will look for foo.dll etc.
15162
15163
15164       CMAKE_IGNORE_PATH
15165              Path to be ignored by FIND_XXX() commands.
15166
15167              Specifies directories to be ignored by  searches  in  FIND_XXX()
15168              commands  This  is  useful  in cross-compiled environments where
15169              some system directories contain incompatible but possibly  link‐
15170              able  libraries. For example, on cross-compiled cluster environ‐
15171              ments, this allows  a  user  to  ignore  directories  containing
15172              libraries  meant  for  the  front-end  machine that modules like
15173              FindX11 (and others) would normally search. By default  this  is
15174              empty;  it  is  intended  to  be  set  by the project. Note that
15175              CMAKE_IGNORE_PATH takes a list of directory names, NOT a list of
15176              prefixes.  If  you  want  to  ignore  paths under prefixes (bin,
15177              include, lib, etc.), you'll need to specify them explicitly. See
15178              also  CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH,
15179              CMAKE_PROGRAM_PATH.
15180
15181
15182       CMAKE_INCLUDE_PATH
15183              Path used for searching by FIND_FILE() and FIND_PATH().
15184
15185              Specifies a path which will be  used  both  by  FIND_FILE()  and
15186              FIND_PATH().  Both  commands  will  check  each of the contained
15187              directories for the existence of the  file  which  is  currently
15188              searched.  By  default  it is empty, it is intended to be set by
15189              the  project.  See  also  CMAKE_SYSTEM_INCLUDE_PATH,  CMAKE_PRE‐
15190              FIX_PATH.
15191
15192
15193       CMAKE_INSTALL_PREFIX
15194              Install directory used by install.
15195
15196              If "make install" is invoked or INSTALL is built, this directory
15197              is  pre-pended  onto  all  install  directories.  This  variable
15198              defaults to /usr/local on UNIX and c:/Program Files on Windows.
15199
15200
15201       CMAKE_LIBRARY_PATH
15202              Path used for searching by FIND_LIBRARY().
15203
15204              Specifies   a   path  which  will  be  used  by  FIND_LIBRARY().
15205              FIND_LIBRARY() will check each of the contained directories  for
15206              the  existence  of  the  library which is currently searched. By
15207              default it is empty, it is intended to be set  by  the  project.
15208              See also CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_PREFIX_PATH.
15209
15210
15211       CMAKE_MFC_FLAG
15212              Tell cmake to use MFC for an executable or dll.
15213
15214              This  can be set in a CMakeLists.txt file and will enable MFC in
15215              the application.  It should be set to 1 for  static  the  static
15216              MFC  library, and 2 for the shared MFC library.  This is used in
15217              visual studio 6 and 7 project  files.    The  CMakeSetup  dialog
15218              used MFC and the CMakeLists.txt looks like this:
15219
15220
15221              add_definitions(-D_AFXDLL)
15222
15223
15224              set(CMAKE_MFC_FLAG 2)
15225
15226
15227              add_executable(CMakeSetup WIN32 ${SRCS})
15228
15229
15230
15231       CMAKE_MODULE_PATH
15232              List of directories to search for CMake modules.
15233
15234              Commands  like  include() and find_package() search for files in
15235              directories listed by this variable before checking the  default
15236              modules that come with CMake.
15237
15238
15239       CMAKE_NOT_USING_CONFIG_FLAGS
15240              Skip _BUILD_TYPE flags if true.
15241
15242              This is an internal flag used by the generators in CMake to tell
15243              CMake to skip the _BUILD_TYPE flags.
15244
15245
15246       CMAKE_POLICY_DEFAULT_CMP<NNNN>
15247              Default for CMake Policy CMP<NNNN> when  it  is  otherwise  left
15248              unset.
15249
15250              Commands  cmake_minimum_required(VERSION)  and cmake_policy(VER‐
15251              SION) by default leave policies introduced after the given  ver‐
15252              sion unset.  Set CMAKE_POLICY_DEFAULT_CMP<NNNN> to OLD or NEW to
15253              specify the default for policy CMP<NNNN>, where  <NNNN>  is  the
15254              policy number.
15255
15256
15257              This  variable should not be set by a project in CMake code; use
15258              cmake_policy(SET) instead.  Users running  CMake  may  set  this
15259              variable      in      the      cache      (e.g.     -DCMAKE_POL‐
15260              ICY_DEFAULT_CMP<NNNN>=<OLD|NEW>) to set a policy  not  otherwise
15261              set  by the project.  Set to OLD to quiet a policy warning while
15262              using old behavior or to NEW to try building  the  project  with
15263              new behavior.
15264
15265
15266       CMAKE_PREFIX_PATH
15267              Path used for searching by FIND_XXX(), with appropriate suffixes
15268              added.
15269
15270              Specifies a path which will be used by the FIND_XXX()  commands.
15271              It  contains  the  "base"  directories,  the FIND_XXX() commands
15272              append appropriate subdirectories to the  base  directories.  So
15273              FIND_PROGRAM() adds /bin to each of the directories in the path,
15274              FIND_LIBRARY() appends /lib to  each  of  the  directories,  and
15275              FIND_PATH()  and  FIND_FILE() append /include . By default it is
15276              empty, it is intended  to  be  set  by  the  project.  See  also
15277              CMAKE_SYSTEM_PREFIX_PATH,                    CMAKE_INCLUDE_PATH,
15278              CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.
15279
15280
15281       CMAKE_PROGRAM_PATH
15282              Path used for searching by FIND_PROGRAM().
15283
15284              Specifies a path which will be used by FIND_PROGRAM(). FIND_PRO‐
15285              GRAM()  will  check  each  of  the contained directories for the
15286              existence of the program which is currently searched. By default
15287              it  is  empty, it is intended to be set by the project. See also
15288              CMAKE_SYSTEM_PROGRAM_PATH,  CMAKE_PREFIX_PATH.
15289
15290
15291       CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
15292              Don't make the install target depend on the all target.
15293
15294              By default, the "install" target depends on  the  "all"  target.
15295              This  has  the  effect,  that  when "make install" is invoked or
15296              INSTALL is built, first the "all"  target  is  built,  then  the
15297              installation starts. If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set
15298              to TRUE, this dependency is not  created,  so  the  installation
15299              process  will  start  immediately,  independent from whether the
15300              project has been completely built or not.
15301
15302
15303       CMAKE_SYSTEM_IGNORE_PATH
15304              Path to be ignored by FIND_XXX() commands.
15305
15306              Specifies directories to be ignored by  searches  in  FIND_XXX()
15307              commands  This  is  useful  in cross-compiled environments where
15308              some system directories contain incompatible but possibly  link‐
15309              able  libraries. For example, on cross-compiled cluster environ‐
15310              ments, this allows  a  user  to  ignore  directories  containing
15311              libraries  meant  for  the  front-end  machine that modules like
15312              FindX11 (and others) would normally search. By default this con‐
15313              tains a list of directories containing incompatible binaries for
15314              the host system. See also  CMAKE_SYSTEM_PREFIX_PATH,  CMAKE_SYS‐
15315              TEM_LIBRARY_PATH,   CMAKE_SYSTEM_INCLUDE_PATH,   and  CMAKE_SYS‐
15316              TEM_PROGRAM_PATH.
15317
15318
15319       CMAKE_SYSTEM_INCLUDE_PATH
15320              Path used for searching by FIND_FILE() and FIND_PATH().
15321
15322              Specifies a path which will be  used  both  by  FIND_FILE()  and
15323              FIND_PATH().  Both  commands  will  check  each of the contained
15324              directories for the existence of the  file  which  is  currently
15325              searched.  By  default  it contains the standard directories for
15326              the current system. It is NOT intended to  be  modified  by  the
15327              project,  use  CMAKE_INCLUDE_PATH  for this. See also CMAKE_SYS‐
15328              TEM_PREFIX_PATH.
15329
15330
15331       CMAKE_SYSTEM_LIBRARY_PATH
15332              Path used for searching by FIND_LIBRARY().
15333
15334              Specifies  a  path  which  will  be  used   by   FIND_LIBRARY().
15335              FIND_LIBRARY()  will check each of the contained directories for
15336              the existence of the library which  is  currently  searched.  By
15337              default  it  contains  the  standard directories for the current
15338              system. It is NOT intended to be modified by  the  project,  use
15339              CMAKE_LIBRARY_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
15340
15341
15342       CMAKE_SYSTEM_PREFIX_PATH
15343              Path used for searching by FIND_XXX(), with appropriate suffixes
15344              added.
15345
15346              Specifies a path which will be used by the FIND_XXX()  commands.
15347              It  contains  the  "base"  directories,  the FIND_XXX() commands
15348              append appropriate subdirectories to the  base  directories.  So
15349              FIND_PROGRAM() adds /bin to each of the directories in the path,
15350              FIND_LIBRARY() appends /lib to  each  of  the  directories,  and
15351              FIND_PATH()  and  FIND_FILE()  append /include . By default this
15352              contains the standard directories for the current system. It  is
15353              NOT  intended  to  be  modified  by  the project, use CMAKE_PRE‐
15354              FIX_PATH   for   this.   See   also   CMAKE_SYSTEM_INCLUDE_PATH,
15355              CMAKE_SYSTEM_LIBRARY_PATH,     CMAKE_SYSTEM_PROGRAM_PATH,    and
15356              CMAKE_SYSTEM_IGNORE_PATH.
15357
15358
15359       CMAKE_SYSTEM_PROGRAM_PATH
15360              Path used for searching by FIND_PROGRAM().
15361
15362              Specifies a path which will be used by FIND_PROGRAM(). FIND_PRO‐
15363              GRAM()  will  check  each  of  the contained directories for the
15364              existence of the program which is currently searched. By default
15365              it  contains the standard directories for the current system. It
15366              is NOT intended to be modified by the  project,  use  CMAKE_PRO‐
15367              GRAM_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
15368
15369
15370       CMAKE_USER_MAKE_RULES_OVERRIDE
15371              Specify a CMake file that overrides platform information.
15372
15373              CMake  loads  the specified file while enabling support for each
15374              language from either the  project()  or  enable_language()  com‐
15375              mands.  It is loaded after CMake's builtin compiler and platform
15376              information modules have been loaded but before the  information
15377              is  used.   The  file  may set platform information variables to
15378              override CMake's defaults.
15379
15380
15381              This feature is intended for use only in overriding  information
15382              variables  that  must  be set before CMake builds its first test
15383              project to check that the compiler for  a  language  works.   It
15384              should  not  be  used  to  load  a  file  in cases that a normal
15385              include() will work.  Use it only as a last resort for  behavior
15386              that cannot be achieved any other way.  For example, one may set
15387              CMAKE_C_FLAGS_INIT to change the default value used to  initial‐
15388              ize CMAKE_C_FLAGS before it is cached.  The override file should
15389              NOT be used to set anything that could be  set  after  languages
15390              are  enabled, such as variables like CMAKE_RUNTIME_OUTPUT_DIREC‐
15391              TORY that affect the placement of binaries.  Information set  in
15392              the file will be used for try_compile and try_run builds too.
15393
15394

VARIABLES THAT DESCRIBE THE SYSTEM

15396       APPLE  True if running on Mac OSX.
15397
15398              Set to true on Mac OSX.
15399
15400
15401       BORLAND
15402              True of the borland compiler is being used.
15403
15404              This is set to true if the Borland compiler is being used.
15405
15406
15407       CMAKE_CL_64
15408              Using the 64 bit compiler from Microsoft
15409
15410              Set to true when using the 64 bit cl compiler from Microsoft.
15411
15412
15413       CMAKE_COMPILER_2005
15414              Using the Visual Studio 2005 compiler from Microsoft
15415
15416              Set  to true when using the Visual Studio 2005 compiler from Mi‐
15417              crosoft.
15418
15419
15420       CMAKE_HOST_APPLE
15421              True for Apple OSXoperating systems.
15422
15423              Set to true when the host system is Apple OSX.
15424
15425
15426       CMAKE_HOST_SYSTEM
15427              Name of system cmake is being run on.
15428
15429              The same as CMAKE_SYSTEM but for the host system instead of  the
15430              target system when cross compiling.
15431
15432
15433       CMAKE_HOST_SYSTEM_NAME
15434              Name of the OS CMake is running on.
15435
15436              The same as CMAKE_SYSTEM_NAME but for the host system instead of
15437              the target system when cross compiling.
15438
15439
15440       CMAKE_HOST_SYSTEM_PROCESSOR
15441              The name of the CPU CMake is running on.
15442
15443              The same as  CMAKE_SYSTEM_PROCESSOR  but  for  the  host  system
15444              instead of the target system when cross compiling.
15445
15446
15447       CMAKE_HOST_SYSTEM_VERSION
15448              OS version CMake is running on.
15449
15450              The same as CMAKE_SYSTEM_VERSION but for the host system instead
15451              of the target system when cross compiling.
15452
15453
15454       CMAKE_HOST_UNIX
15455              True for UNIX and UNIX like operating systems.
15456
15457              Set to true when the host system is  UNIX  or  UNIX  like  (i.e.
15458              APPLE and CYGWIN).
15459
15460
15461       CMAKE_HOST_WIN32
15462              True on windows systems, including win64.
15463
15464              Set to true when the host system is Windows and on cygwin.
15465
15466
15467       CMAKE_OBJECT_PATH_MAX
15468              Maximum  object  file  full-path  length allowed by native build
15469              tools.
15470
15471              CMake computes for every source file an object file name that is
15472              unique  to the source file and deterministic with respect to the
15473              full path to the source file.  This allows multiple source files
15474              in  a  target  to  share  the same name if they lie in different
15475              directories without rebuilding when one  is  added  or  removed.
15476              However, it can produce long full paths in a few cases, so CMake
15477              shortens the path using a hashing scheme when the full  path  to
15478              an  object file exceeds a limit.  CMake has a built-in limit for
15479              each platform that is sufficient  for  common  tools,  but  some
15480              native  tools  may have a lower limit.  This variable may be set
15481              to specify the limit explicitly.  The value must be  an  integer
15482              no less than 128.
15483
15484
15485       CMAKE_SYSTEM
15486              Name of system cmake is compiling for.
15487
15488              This   variable   is  the  composite  of  CMAKE_SYSTEM_NAME  and
15489              CMAKE_SYSTEM_VERSION,       like        this        ${CMAKE_SYS‐
15490              TEM_NAME}-${CMAKE_SYSTEM_VERSION}.  If  CMAKE_SYSTEM_VERSION  is
15491              not set, then CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.
15492
15493
15494       CMAKE_SYSTEM_NAME
15495              Name of the OS CMake is building for.
15496
15497              This is the name of the operating system on which CMake is  tar‐
15498              geting.    On systems that have the uname command, this variable
15499              is set to the output of uname -s.  Linux, Windows,   and  Darwin
15500              for  Mac  OSX  are  the values found  on the big three operating
15501              systems.
15502
15503
15504       CMAKE_SYSTEM_PROCESSOR
15505              The name of the CPU CMake is building for.
15506
15507              On systems that support uname, this variable is set to the  out‐
15508              put  of uname -p, on windows it is set to the value of the envi‐
15509              ronment variable PROCESSOR_ARCHITECTURE
15510
15511
15512       CMAKE_SYSTEM_VERSION
15513              OS version CMake is building for.
15514
15515              A numeric version string for the system, on systems that support
15516              uname,  this variable is set to the output of uname -r. On other
15517              systems this is set to major-minor version numbers.
15518
15519
15520       CYGWIN True for cygwin.
15521
15522              Set to true when using CYGWIN.
15523
15524
15525       MSVC   True when using Microsoft Visual C
15526
15527              Set to true when the compiler is some version of Microsoft  Vis‐
15528              ual C.
15529
15530
15531       MSVC80 True when using Microsoft Visual C 8.0
15532
15533              Set to true when the compiler is version 8.0 of Microsoft Visual
15534              C.
15535
15536
15537       MSVC_IDE
15538              True when using the Microsoft Visual C IDE
15539
15540              Set to true when the target platform is the Microsoft  Visual  C
15541              IDE, as opposed to the command line compiler.
15542
15543
15544       MSVC_VERSION
15545              The version of Microsoft Visual C/C++ being used if any.
15546
15547              Known version numbers are:
15548
15549
15550                1200 = VS  6.0
15551                1300 = VS  7.0
15552                1310 = VS  7.1
15553                1400 = VS  8.0
15554                1500 = VS  9.0
15555                1600 = VS 10.0
15556
15557
15558       UNIX   True for UNIX and UNIX like operating systems.
15559
15560              Set  to  true  when the target system is UNIX or UNIX like (i.e.
15561              APPLE and CYGWIN).
15562
15563
15564       WIN32  True on windows systems, including win64.
15565
15566              Set to true when the target system is Windows and on cygwin.
15567
15568
15569       XCODE_VERSION
15570              Version of Xcode (Xcode generator only).
15571
15572              Under the Xcode generator, this is the version of Xcode as spec‐
15573              ified in "Xcode.app/Contents/version.plist" (such as "3.1.2").
15574
15575

VARIABLES FOR LANGUAGES

15577       CMAKE_<LANG>_ARCHIVE_APPEND
15578              Rule variable to append to a static archive.
15579
15580              This  is  a  rule  variable  that tells CMake how to append to a
15581              static archive.   It  is  used  in  place  of  CMAKE_<LANG>_CRE‐
15582              ATE_STATIC_LIBRARY  on  some platforms in order to support large
15583              object  counts.   See   also   CMAKE_<LANG>_ARCHIVE_CREATE   and
15584              CMAKE_<LANG>_ARCHIVE_FINISH.
15585
15586
15587       CMAKE_<LANG>_ARCHIVE_CREATE
15588              Rule variable to create a new static archive.
15589
15590              This  is a rule variable that tells CMake how to create a static
15591              archive.    It   is   used   in   place   of   CMAKE_<LANG>_CRE‐
15592              ATE_STATIC_LIBRARY  on  some platforms in order to support large
15593              object  counts.   See   also   CMAKE_<LANG>_ARCHIVE_APPEND   and
15594              CMAKE_<LANG>_ARCHIVE_FINISH.
15595
15596
15597       CMAKE_<LANG>_ARCHIVE_FINISH
15598              Rule variable to finish an existing static archive.
15599
15600              This  is a rule variable that tells CMake how to finish a static
15601              archive.    It   is   used   in   place   of   CMAKE_<LANG>_CRE‐
15602              ATE_STATIC_LIBRARY  on  some platforms in order to support large
15603              object  counts.   See   also   CMAKE_<LANG>_ARCHIVE_CREATE   and
15604              CMAKE_<LANG>_ARCHIVE_APPEND.
15605
15606
15607       CMAKE_<LANG>_COMPILER
15608              The full path to the compiler for LANG.
15609
15610              This  is  the  command that will be used as the <LANG> compiler.
15611              Once set, you can not change this variable.
15612
15613
15614       CMAKE_<LANG>_COMPILER_ABI
15615              An internal variable subject to change.
15616
15617              This is used in determining the compiler ABI and is  subject  to
15618              change.
15619
15620
15621       CMAKE_<LANG>_COMPILER_ID
15622              An internal variable subject to change.
15623
15624              This  is  used  in  determining  the  compiler and is subject to
15625              change.
15626
15627
15628       CMAKE_<LANG>_COMPILER_LOADED
15629              Defined to true if the language is enabled.
15630
15631              When language <LANG> is  enabled  by  project()  or  enable_lan‐
15632              guage() this variable is defined to 1.
15633
15634
15635       CMAKE_<LANG>_COMPILE_OBJECT
15636              Rule variable to compile a single object file.
15637
15638              This is a rule variable that tells CMake how to compile a single
15639              object file for for the language <LANG>.
15640
15641
15642       CMAKE_<LANG>_CREATE_SHARED_LIBRARY
15643              Rule variable to create a shared library.
15644
15645              This is a rule variable that tells CMake how to create a  shared
15646              library for the language <LANG>.
15647
15648
15649       CMAKE_<LANG>_CREATE_SHARED_MODULE
15650              Rule variable to create a shared module.
15651
15652              This  is a rule variable that tells CMake how to create a shared
15653              library for the language <LANG>.
15654
15655
15656       CMAKE_<LANG>_CREATE_STATIC_LIBRARY
15657              Rule variable to create a static library.
15658
15659              This is a rule variable that tells CMake how to create a  static
15660              library for the language <LANG>.
15661
15662
15663       CMAKE_<LANG>_FLAGS_DEBUG
15664              Flags for Debug build type or configuration.
15665
15666              <LANG> flags used when CMAKE_BUILD_TYPE is Debug.
15667
15668
15669       CMAKE_<LANG>_FLAGS_MINSIZEREL
15670              Flags for MinSizeRel build type or configuration.
15671
15672              <LANG>  flags used when CMAKE_BUILD_TYPE is MinSizeRel.Short for
15673              minimum size release.
15674
15675
15676       CMAKE_<LANG>_FLAGS_RELEASE
15677              Flags for Release build type or configuration.
15678
15679              <LANG> flags used when CMAKE_BUILD_TYPE is Release
15680
15681
15682       CMAKE_<LANG>_FLAGS_RELWITHDEBINFO
15683              Flags for RelWithDebInfo type or configuration.
15684
15685              <LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. Short
15686              for Release With Debug Information.
15687
15688
15689       CMAKE_<LANG>_IGNORE_EXTENSIONS
15690              File extensions that should be ignored by the build.
15691
15692              This  is a list of file extensions that may be part of a project
15693              for a given language but are not compiled.
15694
15695
15696       CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
15697              Directories implicitly  searched  by  the  compiler  for  header
15698              files.
15699
15700              CMake  does not explicitly specify these directories on compiler
15701              command lines for language <LANG>.  This prevents system include
15702              directories  from  being  treated as user include directories on
15703              some compilers.
15704
15705
15706       CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
15707              Implicit linker search path detected for language <LANG>.
15708
15709              Compilers typically pass directories containing language runtime
15710              libraries  and  default  library search paths when they invoke a
15711              linker.  These paths are implicit linker search directories  for
15712              the  compiler's  language.   CMake  automatically  detects these
15713              directories for each language and reports the  results  in  this
15714              variable.
15715
15716
15717       CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
15718              Implicit link libraries and flags detected for language <LANG>.
15719
15720              Compilers  typically  pass  language  runtime  library names and
15721              other flags when they invoke a linker.  These flags are implicit
15722              link  options  for the compiler's language.  CMake automatically
15723              detects these libraries and flags for each language and  reports
15724              the results in this variable.
15725
15726
15727       CMAKE_<LANG>_LINKER_PREFERENCE
15728              Preference value for linker language selection.
15729
15730              The "linker language" for executable, shared library, and module
15731              targets is the language whose compiler will invoke  the  linker.
15732              The  LINKER_LANGUAGE  target  property sets the language explic‐
15733              itly.  Otherwise, the linker language is that whose linker pref‐
15734              erence value is highest among languages compiled and linked into
15735              the target.  See also the  CMAKE_<LANG>_LINKER_PREFERENCE_PROPA‐
15736              GATES variable.
15737
15738
15739       CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES
15740              True  if  CMAKE_<LANG>_LINKER_PREFERENCE  propagates across tar‐
15741              gets.
15742
15743              This is used when CMake selects a linker language for a  target.
15744              Languages  compiled  directly into the target are always consid‐
15745              ered.  A language compiled into static libraries linked  by  the
15746              target is considered if this variable is true.
15747
15748
15749       CMAKE_<LANG>_LINK_EXECUTABLE
15750              Rule variable to link and executable.
15751
15752              Rule variable to link and executable for the given language.
15753
15754
15755       CMAKE_<LANG>_OUTPUT_EXTENSION
15756              Extension for the output of a compile for a single file.
15757
15758              This  is  the extension for an object file for the given <LANG>.
15759              For example .obj for C on Windows.
15760
15761
15762       CMAKE_<LANG>_PLATFORM_ID
15763              An internal variable subject to change.
15764
15765              This is used in determining  the  platform  and  is  subject  to
15766              change.
15767
15768
15769       CMAKE_<LANG>_SIZEOF_DATA_PTR
15770              Size of pointer-to-data types for language <LANG>.
15771
15772              This  holds  the size (in bytes) of pointer-to-data types in the
15773              target platform ABI.  It is defined  for  languages  C  and  CXX
15774              (C++).
15775
15776
15777       CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
15778              Extensions of source files for the given language.
15779
15780              This  is  the  list  of  extensions for a given languages source
15781              files.
15782
15783
15784       CMAKE_COMPILER_IS_GNU<LANG>
15785              True if the compiler is GNU.
15786
15787              If the selected <LANG> compiler is the GNU compiler then this is
15788              TRUE, if not it is FALSE.
15789
15790
15791       CMAKE_Fortran_MODDIR_DEFAULT
15792              Fortran default module output directory.
15793
15794              Most  Fortran  compilers write .mod files to the current working
15795              directory.  For those that do not, this is set to "."  and  used
15796              when the Fortran_MODULE_DIRECTORY target property is not set.
15797
15798
15799       CMAKE_Fortran_MODDIR_FLAG
15800              Fortran flag for module output directory.
15801
15802              This  stores  the  flag  needed  to  pass  the value of the For‐
15803              tran_MODULE_DIRECTORY target property to the compiler.
15804
15805
15806       CMAKE_Fortran_MODOUT_FLAG
15807              Fortran flag to enable module output.
15808
15809              Most Fortran compilers write .mod files  out  by  default.   For
15810              others, this stores the flag needed to enable module output.
15811
15812
15813       CMAKE_INTERNAL_PLATFORM_ABI
15814              An internal variable subject to change.
15815
15816              This  is  used in determining the compiler ABI and is subject to
15817              change.
15818
15819
15820       CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
15821              Specify a CMake file that  overrides  platform  information  for
15822              <LANG>.
15823
15824              This       is      a      language-specific      version      of
15825              CMAKE_USER_MAKE_RULES_OVERRIDE loaded only  when  enabling  lan‐
15826              guage <LANG>.
15827
15828

VARIABLES THAT CONTROL THE BUILD

15830       CMAKE_<CONFIG>_POSTFIX
15831              Default filename postfix for libraries under configuration <CON‐
15832              FIG>.
15833
15834              When a non-executable target  is  created  its  <CONFIG>_POSTFIX
15835              target  property  is initialized with the value of this variable
15836              if it is set.
15837
15838
15839       CMAKE_ARCHIVE_OUTPUT_DIRECTORY
15840              Where to put all the ARCHIVE targets when built.
15841
15842              This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY
15843              property  on all the targets. See that target property for addi‐
15844              tional information.
15845
15846
15847       CMAKE_BUILD_WITH_INSTALL_RPATH
15848              Use the install path for the RPATH
15849
15850              Normally CMake uses the build tree for the RPATH  when  building
15851              executables  etc on systems that use RPATH. When the software is
15852              installed the executables etc are relinked by CMake to have  the
15853              install RPATH. If this variable is set to true then the software
15854              is always built with the install path for the RPATH and does not
15855              need to be relinked when installed.
15856
15857
15858       CMAKE_DEBUG_POSTFIX
15859              See variable CMAKE_<CONFIG>_POSTFIX.
15860
15861              This  variable is a special case of the more-general CMAKE_<CON‐
15862              FIG>_POSTFIX variable for the DEBUG configuration.
15863
15864
15865       CMAKE_EXE_LINKER_FLAGS
15866              Linker flags used to create executables.
15867
15868              Flags used by the linker when creating an executable.
15869
15870
15871       CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]
15872              Flag used when linking an executable.
15873
15874              Same as CMAKE_C_FLAGS_* but used by  the  linker  when  creating
15875              executables.
15876
15877
15878       CMAKE_Fortran_MODULE_DIRECTORY
15879              Fortran module output directory.
15880
15881              This variable is used to initialize the Fortran_MODULE_DIRECTORY
15882              property on all the targets. See that target property for  addi‐
15883              tional information.
15884
15885
15886       CMAKE_INCLUDE_CURRENT_DIR
15887              Automatically  add  the current source- and build directories to
15888              the include path.
15889
15890              If this variable is enabled, CMake automatically  adds  in  each
15891              directory     ${CMAKE_CURRENT_SOURCE_DIR}    and    ${CMAKE_CUR‐
15892              RENT_BINARY_DIR} to the include path for this  directory.  These
15893              additional  include  directories do not propagate down to subdi‐
15894              rectories. This is useful mainly for out-of-source builds, where
15895              files  generated  into  the  build  tree  are  included by files
15896              located in the source tree.
15897
15898
15899              By default CMAKE_INCLUDE_CURRENT_DIR is OFF.
15900
15901
15902       CMAKE_INSTALL_NAME_DIR
15903              Mac OSX directory name for installed targets.
15904
15905              CMAKE_INSTALL_NAME_DIR    is    used    to    initialize     the
15906              INSTALL_NAME_DIR  property on all targets. See that target prop‐
15907              erty for more information.
15908
15909
15910       CMAKE_INSTALL_RPATH
15911              The rpath to use for installed targets.
15912
15913              A semicolon-separated  list  specifying  the  rpath  to  use  in
15914              installed  targets (for platforms that support it). This is used
15915              to initialize the target property INSTALL_RPATH for all targets.
15916
15917
15918       CMAKE_INSTALL_RPATH_USE_LINK_PATH
15919              Add paths to linker search and installed rpath.
15920
15921              CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that  if  set  to
15922              true  will append directories in the linker search path and out‐
15923              side the project to the INSTALL_RPATH. This is used to  initial‐
15924              ize the target property INSTALL_RPATH_USE_LINK_PATH for all tar‐
15925              gets.
15926
15927
15928       CMAKE_LIBRARY_OUTPUT_DIRECTORY
15929              Where to put all the LIBRARY targets when built.
15930
15931              This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY
15932              property  on all the targets. See that target property for addi‐
15933              tional information.
15934
15935
15936       CMAKE_LIBRARY_PATH_FLAG
15937              The flag used to add a library search path to a compiler.
15938
15939              The flag used to specify a library directory to the compiler. On
15940              most compilers this is "-L".
15941
15942
15943       CMAKE_LINK_DEF_FILE_FLAG
15944              Linker flag used to specify a .def file for dll creation.
15945
15946              The flag used to add a .def file when creating a dll on Windows,
15947              this is only defined on Windows.
15948
15949
15950       CMAKE_LINK_LIBRARY_FILE_FLAG
15951              Flag used to link a library specified by a path to its file.
15952
15953              The flag used before a library file path is given to the linker.
15954              This is needed only on very few platforms.
15955
15956
15957       CMAKE_LINK_LIBRARY_FLAG
15958              Flag used to link a library into an executable.
15959
15960              The flag used to specify a library to link to an executable.  On
15961              most compilers this is "-l".
15962
15963
15964       CMAKE_NO_BUILTIN_CHRPATH
15965              Do not use the builtin ELF editor to fix RPATHs on installation.
15966
15967              When an ELF binary needs to have a different RPATH after instal‐
15968              lation than it does in the build tree, CMake uses a builtin edi‐
15969              tor to change the RPATH in the installed copy.  If this variable
15970              is  set to true then CMake will relink the binary before instal‐
15971              lation instead of using its builtin editor.
15972
15973
15974       CMAKE_RUNTIME_OUTPUT_DIRECTORY
15975              Where to put all the RUNTIME targets when built.
15976
15977              This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY
15978              property  on all the targets. See that target property for addi‐
15979              tional information.
15980
15981
15982       CMAKE_SKIP_BUILD_RPATH
15983              Do not include RPATHs in the build tree.
15984
15985              Normally CMake uses the build tree for the RPATH  when  building
15986              executables  etc on systems that use RPATH. When the software is
15987              installed the executables etc are relinked by CMake to have  the
15988              install RPATH. If this variable is set to true then the software
15989              is always built with no RPATH.
15990
15991
15992       CMAKE_TRY_COMPILE_CONFIGURATION
15993              Build configuration used for try_compile and try_run projects.
15994
15995              Projects  built  by  try_compile  and  try_run  are  built  syn‐
15996              chronously  during  the  CMake  configuration step.  Therefore a
15997              specific build configuration must be chosen even if  the  gener‐
15998              ated build system supports multiple configurations.
15999
16000
16001       CMAKE_USE_RELATIVE_PATHS
16002              Use relative paths (May not work!).
16003
16004              If  this  is set to TRUE, then the CMake will use relative paths
16005              between the source and binary tree. This option  does  not  work
16006              for  more complicated projects, and relative paths are used when
16007              possible.  In general, it is not possible to move  CMake  gener‐
16008              ated  makefiles  to a different location regardless of the value
16009              of this variable.
16010
16011
16012       EXECUTABLE_OUTPUT_PATH
16013              Old executable location variable.
16014
16015              The target  property  RUNTIME_OUTPUT_DIRECTORY  supercedes  this
16016              variable for a target if it is set.  Executable targets are oth‐
16017              erwise placed in this directory.
16018
16019
16020       LIBRARY_OUTPUT_PATH
16021              Old library location variable.
16022
16023              The  target  properties  ARCHIVE_OUTPUT_DIRECTORY,  LIBRARY_OUT‐
16024              PUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY supercede this vari‐
16025              able for a target if they are set.  Library targets  are  other‐
16026              wise placed in this directory.
16027
16028

VARIABLES THAT PROVIDE INFORMATION

16030       variables  defined  by  cmake, that give information about the project,
16031       and cmake
16032
16033
16034       CMAKE_AR
16035              Name of archiving tool for static libraries.
16036
16037              This specifies name of  the  program  that  creates  archive  or
16038              static libraries.
16039
16040
16041       CMAKE_BINARY_DIR
16042              The path to the top level of the build tree.
16043
16044              This  is  the  full  path  to the top level of the current CMake
16045              build tree. For an in-source build, this would be  the  same  as
16046              CMAKE_SOURCE_DIR.
16047
16048
16049       CMAKE_BUILD_TOOL
16050              Tool used for the actual build process.
16051
16052              This variable is set to the program that will be needed to build
16053              the output of CMake.   If the generator selected was Visual Stu‐
16054              dio  6,  the  CMAKE_MAKE_PROGRAM  will be set to msdev, for Unix
16055              makefiles it will be set to make or gmake, and for Visual Studio
16056              7  it  set  to  devenv.  For Nmake Makefiles the value is nmake.
16057              This can be useful for adding special flags and  commands  based
16058              on the final build environment.
16059
16060
16061       CMAKE_CACHEFILE_DIR
16062              The directory with the CMakeCache.txt file.
16063
16064              This  is  the  full  path  to  the directory that has the CMake‐
16065              Cache.txt file in it.  This is the same as CMAKE_BINARY_DIR.
16066
16067
16068       CMAKE_CACHE_MAJOR_VERSION
16069              Major version of CMake used to create the CMakeCache.txt file
16070
16071              This is stores the major version of CMake used to write a  CMake
16072              cache  file.  It  is  only different when a different version of
16073              CMake is run on a previously created cache file.
16074
16075
16076       CMAKE_CACHE_MINOR_VERSION
16077              Minor version of CMake used to create the CMakeCache.txt file
16078
16079              This is stores the minor version of CMake used to write a  CMake
16080              cache  file.  It  is  only different when a different version of
16081              CMake is run on a previously created cache file.
16082
16083
16084       CMAKE_CACHE_PATCH_VERSION
16085              Patch version of CMake used to create the CMakeCache.txt file
16086
16087              This is stores the patch version of CMake used to write a  CMake
16088              cache  file.  It  is  only different when a different version of
16089              CMake is run on a previously created cache file.
16090
16091
16092       CMAKE_CFG_INTDIR
16093              Build-time reference to per-configuration output subdirectory.
16094
16095              For native build systems supporting multiple  configurations  in
16096              the build tree (such as Visual Studio and Xcode), the value is a
16097              reference to a build-time variable specifying the  name  of  the
16098              per-configuration  output  subdirectory.  On Makefile generators
16099              this evaluates to "." because there is only one configuration in
16100              a build tree.  Example values:
16101
16102
16103                $(IntDir)        = Visual Studio 6
16104                $(OutDir)        = Visual Studio 7, 8, 9
16105                $(Configuration) = Visual Studio 10
16106                $(CONFIGURATION) = Xcode
16107                .                = Make-based tools
16108
16109              Since  these  values  are  evaluated by the native build system,
16110              this variable is suitable only for use  in  command  lines  that
16111              will be evaluated at build time.  Example of intended usage:
16112
16113
16114                add_executable(mytool mytool.c)
16115                add_custom_command(
16116                  OUTPUT out.txt
16117                  COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool
16118                          ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt
16119                  DEPENDS mytool in.txt
16120                  )
16121                add_custom_target(drive ALL DEPENDS out.txt)
16122
16123              Note  that CMAKE_CFG_INTDIR is no longer necessary for this pur‐
16124              pose but has been left for compatibility with existing projects.
16125              Instead  add_custom_command() recognizes executable target names
16126              in      its      COMMAND      option,      so      "${CMAKE_CUR‐
16127              RENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool"  can be replaced by
16128              just "mytool".
16129
16130
16131              This variable is read-only.  Setting it is  undefined  behavior.
16132              In  multi-configuration build systems the value of this variable
16133              is passed as the value of preprocessor symbol "CMAKE_INTDIR"  to
16134              the compilation of all source files.
16135
16136
16137       CMAKE_COMMAND
16138              The full path to the cmake executable.
16139
16140              This  is  the  full  path to the CMake executable cmake which is
16141              useful from custom commands that want to use the cmake -E option
16142              for portable system commands. (e.g. /usr/local/bin/cmake
16143
16144
16145       CMAKE_CROSSCOMPILING
16146              Is CMake currently cross compiling.
16147
16148              This  variable  will  be  set to true by CMake if CMake is cross
16149              compiling. Specifically if the build platform is different  from
16150              the target platform.
16151
16152
16153       CMAKE_CTEST_COMMAND
16154              Full path to ctest command installed with cmake.
16155
16156              This  is  the  full  path to the CTest executable ctest which is
16157              useful from custom commands that  want   to  use  the  cmake  -E
16158              option for portable system commands.
16159
16160
16161       CMAKE_CURRENT_BINARY_DIR
16162              The path to the binary directory currently being processed.
16163
16164              This  the  full  path  to  the build directory that is currently
16165              being processed by cmake.  Each directory added by add_subdirec‐
16166              tory will create a binary directory in the build tree, and as it
16167              is being processed this variable  will  be  set.  For  in-source
16168              builds this is the current source directory being processed.
16169
16170
16171       CMAKE_CURRENT_LIST_DIR
16172              Full directory of the listfile currently being processed.
16173
16174              As  CMake  processes the listfiles in your project this variable
16175              will always be set to the directory where the listfile which  is
16176              currently  being processed (CMAKE_CURRENT_LIST_FILE) is located.
16177              The value has dynamic scope.  When CMake starts processing  com‐
16178              mands  in  a  source file it sets this variable to the directory
16179              where this file is located.  When CMake finishes processing com‐
16180              mands  from  the file it restores the previous value.  Therefore
16181              the value of the variable inside a  macro  or  function  is  the
16182              directory of the file invoking the bottom-most entry on the call
16183              stack, not the directory of the file  containing  the  macro  or
16184              function definition.
16185
16186
16187              See also CMAKE_CURRENT_LIST_FILE.
16188
16189
16190       CMAKE_CURRENT_LIST_FILE
16191              Full path to the listfile currently being processed.
16192
16193              As  CMake  processes the listfiles in your project this variable
16194              will always be set to the one currently  being  processed.   The
16195              value  has dynamic scope.  When CMake starts processing commands
16196              in a source file it sets this variable to the  location  of  the
16197              file.   When CMake finishes processing commands from the file it
16198              restores the previous value.  Therefore the value of  the  vari‐
16199              able  inside  a  macro or function is the file invoking the bot‐
16200              tom-most entry on the call stack, not the  file  containing  the
16201              macro or function definition.
16202
16203
16204              See also CMAKE_PARENT_LIST_FILE.
16205
16206
16207       CMAKE_CURRENT_LIST_LINE
16208              The line number of the current file being processed.
16209
16210              This is the line number of the file currently being processed by
16211              cmake.
16212
16213
16214       CMAKE_CURRENT_SOURCE_DIR
16215              The path to the source directory currently being processed.
16216
16217              This the full path to the source  directory  that  is  currently
16218              being processed by cmake.
16219
16220
16221       CMAKE_DL_LIBS
16222              Name of library containing dlopen and dlcose.
16223
16224              The  name of the library that has dlopen and dlclose in it, usu‐
16225              ally -ldl on most UNIX machines.
16226
16227
16228       CMAKE_EDIT_COMMAND
16229              Full path to cmake-gui or ccmake.
16230
16231              This is the full path to the CMake executable that  can  graphi‐
16232              cally  edit the cache.  For example, cmake-gui, ccmake, or cmake
16233              -i.
16234
16235
16236       CMAKE_EXECUTABLE_SUFFIX
16237              The suffix for executables on this platform.
16238
16239              The suffix to use for the end of an executable if any,  .exe  on
16240              Windows.
16241
16242
16243              CMAKE_EXECUTABLE_SUFFIX_<LANG>   overrides   this  for  language
16244              <LANG>.
16245
16246
16247       CMAKE_EXTRA_GENERATOR
16248              The extra generator used to build the project.
16249
16250              When using the Eclipse, CodeBlocks or KDevelop generators, CMake
16251              generates  Makefiles  (CMAKE_GENERATOR) and additionally project
16252              files for the respective IDE. This IDE project file generator is
16253              stored in CMAKE_EXTRA_GENERATOR (e.g. "Eclipse CDT4").
16254
16255
16256       CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
16257              Additional suffixes for shared libraries.
16258
16259              Extensions  for  shared  libraries  other than that specified by
16260              CMAKE_SHARED_LIBRARY_SUFFIX, if any.  CMake uses this to  recog‐
16261              nize  external shared library files during analysis of libraries
16262              linked by a target.
16263
16264
16265       CMAKE_GENERATOR
16266              The generator used to build the project.
16267
16268              The name of the generator that is being  used  to  generate  the
16269              build files.  (e.g. "Unix Makefiles", "Visual Studio 6", etc.)
16270
16271
16272       CMAKE_HOME_DIRECTORY
16273              Path to top of source tree.
16274
16275              This is the path to the top level of the source tree.
16276
16277
16278       CMAKE_IMPORT_LIBRARY_PREFIX
16279              The prefix for import libraries that you link to.
16280
16281              The  prefix  to use for the name of an import library if used on
16282              this platform.
16283
16284
16285              CMAKE_IMPORT_LIBRARY_PREFIX_<LANG> overrides this  for  language
16286              <LANG>.
16287
16288
16289       CMAKE_IMPORT_LIBRARY_SUFFIX
16290              The suffix for import  libraries that you link to.
16291
16292              The  suffix  to  use for the end of an import library if used on
16293              this platform.
16294
16295
16296              CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG> overrides this  for  language
16297              <LANG>.
16298
16299
16300       CMAKE_LINK_LIBRARY_SUFFIX
16301              The suffix for libraries that you link to.
16302
16303              The suffix to use for the end of a library, .lib on Windows.
16304
16305
16306       CMAKE_MAJOR_VERSION
16307              The Major version of cmake (i.e. the 2 in 2.X.X)
16308
16309              This  specifies  the major version of the CMake executable being
16310              run.
16311
16312
16313       CMAKE_MAKE_PROGRAM
16314              See CMAKE_BUILD_TOOL.
16315
16316              This  variable  is  around  for  backwards  compatibility,   see
16317              CMAKE_BUILD_TOOL.
16318
16319
16320       CMAKE_MINOR_VERSION
16321              The Minor version of cmake (i.e. the 4 in X.4.X).
16322
16323              This  specifies  the minor version of the CMake executable being
16324              run.
16325
16326
16327       CMAKE_PARENT_LIST_FILE
16328              Full path to the parent listfile of the one currently being pro‐
16329              cessed.
16330
16331              As  CMake  processes the listfiles in your project this variable
16332              will always be set to the  listfile  that  included  or  somehow
16333              invoked  the  one currently being processed. See also CMAKE_CUR‐
16334              RENT_LIST_FILE.
16335
16336
16337       CMAKE_PATCH_VERSION
16338              The patch version of cmake (i.e. the 3 in X.X.3).
16339
16340              This specifies the patch version of the CMake  executable  being
16341              run.
16342
16343
16344       CMAKE_PROJECT_NAME
16345              The name of the current project.
16346
16347              This  specifies  name  of  the  current project from the closest
16348              inherited PROJECT command.
16349
16350
16351       CMAKE_RANLIB
16352              Name of randomizing tool for static libraries.
16353
16354              This specifies name of the program that randomizes libraries  on
16355              UNIX, not used on Windows, but may be present.
16356
16357
16358       CMAKE_ROOT
16359              Install directory for running cmake.
16360
16361              This  is  the install root for the running CMake and the Modules
16362              directory can be found here. This is commonly used in this  for‐
16363              mat: ${CMAKE_ROOT}/Modules
16364
16365
16366       CMAKE_SHARED_LIBRARY_PREFIX
16367              The prefix for shared libraries that you link to.
16368
16369              The prefix to use for the name of a shared library, lib on UNIX.
16370
16371
16372              CMAKE_SHARED_LIBRARY_PREFIX_<LANG>  overrides  this for language
16373              <LANG>.
16374
16375
16376       CMAKE_SHARED_LIBRARY_SUFFIX
16377              The suffix for shared libraries that you link to.
16378
16379              The suffix to use for the end of a shared library, .dll on  Win‐
16380              dows.
16381
16382
16383              CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>  overrides  this for language
16384              <LANG>.
16385
16386
16387       CMAKE_SHARED_MODULE_PREFIX
16388              The prefix for loadable modules that you link to.
16389
16390              The prefix to use for the name of  a  loadable  module  on  this
16391              platform.
16392
16393
16394              CMAKE_SHARED_MODULE_PREFIX_<LANG>  overrides  this  for language
16395              <LANG>.
16396
16397
16398       CMAKE_SHARED_MODULE_SUFFIX
16399              The suffix for shared libraries that you link to.
16400
16401              The suffix to use for the end of a loadable module on this plat‐
16402              form
16403
16404
16405              CMAKE_SHARED_MODULE_SUFFIX_<LANG>  overrides  this  for language
16406              <LANG>.
16407
16408
16409       CMAKE_SIZEOF_VOID_P
16410              Size of a void pointer.
16411
16412              This is set to the size of a pointer  on  the  machine,  and  is
16413              determined by a try compile. If a 64 bit size is found, then the
16414              library search path is modified to look  for  64  bit  libraries
16415              first.
16416
16417
16418       CMAKE_SKIP_RPATH
16419              If true, do not add run time path information.
16420
16421              If  this is set to TRUE, then the rpath information is not added
16422              to compiled executables.  The default is to add  rpath  informa‐
16423              tion  if  the  platform supports it.This allows for easy running
16424              from the build tree.
16425
16426
16427       CMAKE_SOURCE_DIR
16428              The path to the top level of the source tree.
16429
16430              This is the full path to the top  level  of  the  current  CMake
16431              source  tree.  For an in-source build, this would be the same as
16432              CMAKE_BINARY_DIR.
16433
16434
16435       CMAKE_STANDARD_LIBRARIES
16436              Libraries linked into every executable and shared library.
16437
16438              This is the list of libraries that are linked into all  executa‐
16439              bles and libraries.
16440
16441
16442       CMAKE_STATIC_LIBRARY_PREFIX
16443              The prefix for static libraries that you link to.
16444
16445              The prefix to use for the name of a static library, lib on UNIX.
16446
16447
16448              CMAKE_STATIC_LIBRARY_PREFIX_<LANG>  overrides  this for language
16449              <LANG>.
16450
16451
16452       CMAKE_STATIC_LIBRARY_SUFFIX
16453              The suffix for static libraries that you link to.
16454
16455              The suffix to use for the end of a static library, .lib on  Win‐
16456              dows.
16457
16458
16459              CMAKE_STATIC_LIBRARY_SUFFIX_<LANG>  overrides  this for language
16460              <LANG>.
16461
16462
16463       CMAKE_TWEAK_VERSION
16464              The tweak version of cmake (i.e. the 1 in X.X.X.1).
16465
16466              This specifies the tweak version of the CMake  executable  being
16467              run.  Releases use tweak < 20000000 and development versions use
16468              the date format CCYYMMDD for the tweak level.
16469
16470
16471       CMAKE_USING_VC_FREE_TOOLS
16472              True if free visual studio tools being used.
16473
16474              This is set to true if the compiler is Visual Studio free tools.
16475
16476
16477       CMAKE_VERBOSE_MAKEFILE
16478              Create verbose makefiles if on.
16479
16480              This variable defaults to false. You can set  this  variable  to
16481              true to make CMake produce verbose makefiles that show each com‐
16482              mand line as it is used.
16483
16484
16485       CMAKE_VERSION
16486              The full version of cmake in major.minor.patch[.tweak[-id]] for‐
16487              mat.
16488
16489              This  specifies  the  full version of the CMake executable being
16490              run.  This variable is defined by  versions  2.6.3  and  higher.
16491              See    variables    CMAKE_MAJOR_VERSION,    CMAKE_MINOR_VERSION,
16492              CMAKE_PATCH_VERSION, and CMAKE_TWEAK_VERSION for individual ver‐
16493              sion  components.   The  [-id]  component appears in non-release
16494              versions and may be arbitrary text.
16495
16496
16497       PROJECT_BINARY_DIR
16498              Full path to build directory for project.
16499
16500              This is the binary directory of the most recent PROJECT command.
16501
16502
16503       PROJECT_NAME
16504              Name of the project given to the project command.
16505
16506              This is the name given to the most recent PROJECT command.
16507
16508
16509       PROJECT_SOURCE_DIR
16510              Top level source directory for the current project.
16511
16512              This is the source directory of the most recent PROJECT command.
16513
16514
16515       [Project name]_BINARY_DIR
16516              Top level binary directory for the named project.
16517
16518              A variable is created with the name used in the PROJECT command,
16519              and  is the binary directory for the project.   This can be use‐
16520              ful when SUBDIR is used to connect several projects.
16521
16522
16523       [Project name]_SOURCE_DIR
16524              Top level source directory for the named project.
16525
16526              A variable is created with the name used in the PROJECT command,
16527              and  is the source directory for the project.   This can be use‐
16528              ful when add_subdirectory is used to connect several projects.
16529
16530
16532       Copyright 2000-2009 Kitware, Inc., Insight  Software  Consortium.   All
16533       rights reserved.
16534
16535
16536       Redistribution and use in source and binary forms, with or without mod‐
16537       ification, are permitted provided that  the  following  conditions  are
16538       met:
16539
16540
16541       Redistributions  of source code must retain the above copyright notice,
16542       this list of conditions and the following disclaimer.
16543
16544
16545       Redistributions in binary  form  must  reproduce  the  above  copyright
16546       notice,  this  list  of  conditions and the following disclaimer in the
16547       documentation and/or other materials provided with the distribution.
16548
16549
16550       Neither the names of Kitware, Inc., the  Insight  Software  Consortium,
16551       nor  the  names of their contributors may be used to endorse or promote
16552       products derived from this software without specific prior written per‐
16553       mission.
16554
16555
16556       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16557       IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT  NOT  LIMITED
16558       TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC‐
16559       ULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER  OR
16560       CONTRIBUTORS  BE  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
16561       EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT  NOT  LIMITED  TO,
16562       PROCUREMENT  OF  SUBSTITUTE  GOODS  OR  SERVICES; LOSS OF USE, DATA, OR
16563       PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  OF
16564       LIABILITY,  WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
16565       NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  OF  THE  USE  OF  THIS
16566       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16567
16568

SEE ALSO

16570       ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmake‐
16571       modules(1), cmakeprops(1), cmakevars(1)
16572
16573
16574       The following resources are available to get help using CMake:
16575
16576
16577       Home Page
16578              http://www.cmake.org
16579
16580              The primary starting point for learning about CMake.
16581
16582
16583       Frequently Asked Questions
16584              http://www.cmake.org/Wiki/CMake_FAQ
16585
16586              A Wiki is provided containing answers to frequently asked  ques‐
16587              tions.
16588
16589
16590       Online Documentation
16591              http://www.cmake.org/HTML/Documentation.html
16592
16593              Links to available documentation may be found on this web page.
16594
16595
16596       Mailing List
16597              http://www.cmake.org/HTML/MailingLists.html
16598
16599              For  help  and  discussion  about using cmake, a mailing list is
16600              provided at cmake@cmake.org. The list  is  member-post-only  but
16601              one  may  sign  up  on the CMake web page. Please first read the
16602              full documentation at http://www.cmake.org before posting  ques‐
16603              tions to the list.
16604
16605
16606       Summary of helpful links:
16607
16608
16609         Home: http://www.cmake.org
16610         Docs: http://www.cmake.org/HTML/Documentation.html
16611         Mail: http://www.cmake.org/HTML/MailingLists.html
16612         FAQ:  http://www.cmake.org/Wiki/CMake_FAQ
16613
16614

AUTHOR

16616       This manual page was generated by the "--help-man" option.
16617
16618
16619
16620
16621cmake 2.8.4                     March 31, 2011                        cmake(1)
Impressum