"Fossies" - the Fresh Open Source Software Archive

Member "cmake-3.6.2-win32-x86/share/cmake-3.6/Help/command/include.rst" (7 Sep 2016, 1057 Bytes) of archive /windows/misc/cmake-3.6.2-win32-x86.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.


Load and run CMake code from a file or module.


include(<file|module> [OPTIONAL] [RESULT_VARIABLE ] [NO_POLICY_SCOPE])

Load and run CMake code from the file given. Variable reads and writes access the scope of the caller (dynamic scoping). If OPTIONAL is present, then no error is raised if the file does not exist. If RESULT_VARIABLE is given the variable will be set to the full filename which has been included or NOTFOUND if it failed.

If a module is specified instead of a file, the file with name .cmake is searched first in :variable:CMAKE_MODULE_PATH, then in the CMake module directory. There is one exception to this: if the file which calls include() is located itself in the CMake module directory, then first the CMake module directory is searched and :variable:CMAKE_MODULE_PATH afterwards. See also policy :policy:CMP0017.

See the :command:cmake_policy command documentation for discussion of the NO_POLICY_SCOPE option.