summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx198
1 files changed, 150 insertions, 48 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 40d416f..6fffecb 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -2,7 +2,7 @@
#include "cmake.h"
void cmDocumentVariables::DefineVariables(cmake* cm)
-{
+{
// Subsection: variables defined by cmake, that give
// information about the project, and cmake
cm->DefineProperty
@@ -18,21 +18,21 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is the full path to the CMake executable cmake which is "
"useful from custom commands that want to use the cmake -E "
"option for portable system commands. "
- "(e.g. /usr/local/bin/cmake", false,
+ "(e.g. /usr/local/bin/cmake", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_BINARY_DIR", cmProperty::VARIABLE,
"The path to the top level of the build tree.",
"This is the full path to the top level of the current CMake "
"build tree. For an in-source build, this would be the same "
- "as CMAKE_SOURCE_DIR. ", false,
+ "as CMAKE_SOURCE_DIR. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
"The path to the top level of the source tree.",
"This is the full path to the top level of the current CMake "
"source tree. For an in-source build, this would be the same "
- "as CMAKE_BINARY_DIR. ", false,
+ "as CMAKE_BINARY_DIR. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CURRENT_BINARY_DIR", cmProperty::VARIABLE,
@@ -42,13 +42,13 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"add_subdirectory will create a binary directory in the build "
"tree, and as it is being processed this variable will be set. "
"For in-source builds this is the current source directory "
- "being processed.", false,
+ "being processed.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CURRENT_SOURCE_DIR", cmProperty::VARIABLE,
"The path to the source directory currently being processed.",
"This the full path to the source directory that is currently "
- "being processed by cmake. ", false,
+ "being processed by cmake. ", false,
"Variables that Provide Information");
cm->DefineProperty
@@ -74,8 +74,28 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
("CMAKE_CURRENT_LIST_LINE", cmProperty::VARIABLE,
"The line number of the current file being processed.",
"This is the line number of the file currently being"
- " processed by cmake.", false,
+ " processed by cmake.", false,
"Variables that Provide Information");
+
+ cm->DefineProperty
+ ("CMAKE_CURRENT_LIST_DIR", cmProperty::VARIABLE,
+ "Full directory of the listfile currently being processed.",
+ "As CMake processes the listfiles in your project this "
+ "variable will always be set to the directory where the listfile which "
+ "is currently being processed (CMAKE_CURRENT_LIST_FILE) is located. "
+ "The value has dynamic scope. "
+ "When CMake starts processing commands in a source file "
+ "it sets this variable to the directory where this file is located. "
+ "When CMake finishes processing commands from the file it "
+ "restores the previous value. "
+ "Therefore the value of the variable inside a macro or "
+ "function is the directory of the file invoking the bottom-most entry on "
+ "the call stack, not the directory of the file containing the macro or "
+ "function definition."
+ "\n"
+ "See also CMAKE_CURRENT_LIST_FILE.",false,
+ "Variables that Provide Information");
+
cm->DefineProperty
("CMAKE_BUILD_TOOL", cmProperty::VARIABLE,
"Tool used for the actual build process.",
@@ -87,7 +107,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"and for Visual Studio 7 it set to devenv. For "
"Nmake Makefiles the value is nmake. This can be "
"useful for adding special flags and commands based"
- " on the final build environment. ", false,
+ " on the final build environment. ", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE,
@@ -101,7 +121,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The directory with the CMakeCache.txt file.",
"This is the full path to the directory that has the "
"CMakeCache.txt file in it. This is the same as "
- "CMAKE_BINARY_DIR.", false,
+ "CMAKE_BINARY_DIR.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CACHE_MAJOR_VERSION", cmProperty::VARIABLE,
@@ -109,7 +129,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is stores the major version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_CACHE_MINOR_VERSION", cmProperty::VARIABLE,
@@ -117,18 +137,18 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is stores the minor version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CACHE_PATCH_VERSION", cmProperty::VARIABLE,
"Patch version of CMake used to create the CMakeCache.txt file",
"This is stores the patch version of CMake used to "
"write a CMake cache file. It is only different when "
"a different version of CMake is run on a previously "
- "created cache file.", false,
+ "created cache file.", false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CFG_INTDIR", cmProperty::VARIABLE,
"Build-time reference to per-configuration output subdirectory.",
@@ -168,7 +188,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"is passed as the value of preprocessor symbol \"CMAKE_INTDIR\" to "
"the compilation of all source files.",false,
"Variables that Provide Information");
-
+
cm->DefineProperty
("CMAKE_CTEST_COMMAND", cmProperty::VARIABLE,
"Full path to ctest command installed with cmake.",
@@ -442,8 +462,27 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables that Provide Information");
- // Variables defined by cmake, that change the behavior
+ // Variables defined by cmake, that change the behavior
// of cmake
+
+ cm->DefineProperty
+ ("CMAKE_POLICY_DEFAULT_CMP<NNNN>", cmProperty::VARIABLE,
+ "Default for CMake Policy CMP<NNNN> when it is otherwise left unset.",
+ "Commands cmake_minimum_required(VERSION) and cmake_policy(VERSION) "
+ "by default leave policies introduced after the given version unset. "
+ "Set CMAKE_POLICY_DEFAULT_CMP<NNNN> to OLD or NEW to specify the "
+ "default for policy CMP<NNNN>, where <NNNN> is the policy number."
+ "\n"
+ "This variable should not be set by a project in CMake code; "
+ "use cmake_policy(SET) instead. "
+ "Users running CMake may set this variable in the cache "
+ "(e.g. -DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>) "
+ "to set a policy not otherwise set by the project. "
+ "Set to OLD to quiet a policy warning while using old behavior "
+ "or to NEW to try building the project with new behavior.",
+ false,
+ "Variables That Change Behavior");
+
cm->DefineProperty
("CMAKE_FIND_LIBRARY_PREFIXES", cmProperty::VARIABLE,
"Prefixes to prepend when looking for libraries.",
@@ -587,7 +626,39 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"directories for the current system. It is NOT intended "
"to be modified by the project, use CMAKE_PREFIX_PATH for this. See also "
"CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH, "
- "CMAKE_SYSTEM_PROGRAM_PATH.", false,
+ "CMAKE_SYSTEM_PROGRAM_PATH, and CMAKE_SYSTEM_IGNORE_PATH.", false,
+ "Variables That Change Behavior");
+
+ cm->DefineProperty
+ ("CMAKE_SYSTEM_IGNORE_PATH", cmProperty::VARIABLE,
+ "Path to be ignored by FIND_XXX() commands.",
+ "Specifies directories to be ignored by searches in FIND_XXX() commands "
+ "This is useful in cross-compiled environments where some system "
+ "directories contain incompatible but possibly linkable libraries. For "
+ "example, on cross-compiled cluster environments, this allows a user to "
+ "ignore directories containing libraries meant for the front-end "
+ "machine that modules like FindX11 (and others) would normally search. "
+ "By default this contains a list of directories containing incompatible "
+ "binaries for the host system. "
+ "See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_LIBRARY_PATH, "
+ "CMAKE_SYSTEM_INCLUDE_PATH, and CMAKE_SYSTEM_PROGRAM_PATH.", false,
+ "Variables That Change Behavior");
+
+ cm->DefineProperty
+ ("CMAKE_IGNORE_PATH", cmProperty::VARIABLE,
+ "Path to be ignored by FIND_XXX() commands.",
+ "Specifies directories to be ignored by searches in FIND_XXX() commands "
+ "This is useful in cross-compiled environments where some system "
+ "directories contain incompatible but possibly linkable libraries. For "
+ "example, on cross-compiled cluster environments, this allows a user to "
+ "ignore directories containing libraries meant for the front-end "
+ "machine that modules like FindX11 (and others) would normally search. "
+ "By default this is empty; it is intended to be set by the project. "
+ "Note that CMAKE_IGNORE_PATH takes a list of directory names, NOT a "
+ "list of prefixes. If you want to ignore paths under prefixes (bin, "
+ "include, lib, etc.), you'll need to specify them explicitly. "
+ "See also CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH, "
+ "CMAKE_PROGRAM_PATH.", false,
"Variables That Change Behavior");
cm->DefineProperty
@@ -649,7 +720,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"builds too."
,false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("BUILD_SHARED_LIBS", cmProperty::VARIABLE,
"Global flag to cause add_library to create shared libraries if on.",
@@ -660,14 +731,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"they want to build the project using shared or static "
"libraries.",false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("CMAKE_NOT_USING_CONFIG_FLAGS", cmProperty::VARIABLE,
"Skip _BUILD_TYPE flags if true.",
"This is an internal flag used by the generators in "
"CMake to tell CMake to skip the _BUILD_TYPE flags.",false,
"Variables That Change Behavior");
-
+
cm->DefineProperty
("CMAKE_MFC_FLAG", cmProperty::VARIABLE,
"Tell cmake to use MFC for an executable or dll.",
@@ -758,19 +829,19 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"True if running on Mac OSX.",
"Set to true on Mac OSX.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("BORLAND", cmProperty::VARIABLE,
"True of the borland compiler is being used.",
"This is set to true if the Borland compiler is being used.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("CYGWIN", cmProperty::VARIABLE,
"True for cygwin.",
"Set to true when using CYGWIN.",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("MSVC", cmProperty::VARIABLE,
"True when using Microsoft Visual C",
@@ -822,7 +893,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Set to true when the target system is UNIX or UNIX like "
"(i.e. APPLE and CYGWIN).",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("WIN32", cmProperty::VARIABLE,
"True on windows systems, including win64.",
@@ -849,7 +920,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Set to true when the host system is UNIX or UNIX like "
"(i.e. APPLE and CYGWIN).",false,
"Variables That Describe the System");
-
+
cm->DefineProperty
("CMAKE_HOST_WIN32", cmProperty::VARIABLE,
"True on windows systems, including win64.",
@@ -874,7 +945,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"The value must be an integer no less than 128.",false,
"Variables That Describe the System");
- // Variables that affect the building of object files and
+ // Variables that affect the building of object files and
// targets.
//
cm->DefineProperty
@@ -1066,6 +1137,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable for a target if they are set. "
"Library targets are otherwise placed in this directory.",false,
"Variables that Control the Build");
+ cm->DefineProperty
+ ("CMAKE_TRY_COMPILE_CONFIGURATION", cmProperty::VARIABLE,
+ "Build configuration used for try_compile and try_run projects.",
+ "Projects built by try_compile and try_run are built "
+ "synchronously during the CMake configuration step. "
+ "Therefore a specific build configuration must be chosen even "
+ "if the generated build system supports multiple configurations.",false,
+ "Variables that Control the Build");
// Variables defined when the a language is enabled These variables will
@@ -1087,7 +1166,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is the command that will be used as the <LANG> compiler. "
"Once set, you can not change this variable.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_COMPILER_ID", cmProperty::VARIABLE,
"An internal variable subject to change.",
@@ -1131,54 +1210,54 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"If the selected <LANG> compiler is the GNU "
"compiler then this is TRUE, if not it is FALSE.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_DEBUG", cmProperty::VARIABLE,
"Flags for Debug build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is Debug.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_MINSIZEREL", cmProperty::VARIABLE,
"Flags for MinSizeRel build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is MinSizeRel."
"Short for minimum size release.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_RELEASE", cmProperty::VARIABLE,
"Flags for Release build type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is Release",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_FLAGS_RELWITHDEBINFO", cmProperty::VARIABLE,
"Flags for RelWithDebInfo type or configuration.",
"<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. "
"Short for Release With Debug Information.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_COMPILE_OBJECT", cmProperty::VARIABLE,
"Rule variable to compile a single object file.",
"This is a rule variable that tells CMake how to "
"compile a single object file for for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_SHARED_LIBRARY", cmProperty::VARIABLE,
"Rule variable to create a shared library.",
"This is a rule variable that tells CMake how to "
"create a shared library for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_SHARED_MODULE", cmProperty::VARIABLE,
"Rule variable to create a shared module.",
"This is a rule variable that tells CMake how to "
"create a shared library for the language <LANG>.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_CREATE_STATIC_LIBRARY", cmProperty::VARIABLE,
"Rule variable to create a static library.",
@@ -1270,20 +1349,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"See also the CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variable.",
false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_LINK_EXECUTABLE ", cmProperty::VARIABLE,
"Rule variable to link and executable.",
"Rule variable to link and executable for the given language.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_OUTPUT_EXTENSION", cmProperty::VARIABLE,
"Extension for the output of a compile for a single file.",
"This is the extension for an object file for "
"the given <LANG>. For example .obj for C on Windows.",false,
"Variables for Languages");
-
+
cm->DefineProperty
("CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS", cmProperty::VARIABLE,
"Extensions of source files for the given language.",
@@ -1297,17 +1376,40 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable is defined to 1.",
false,"Variables for Languages");
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODDIR_FLAG", cmProperty::VARIABLE,
+ "Fortran flag for module output directory.",
+ "This stores the flag needed to pass the value of the "
+ "Fortran_MODULE_DIRECTORY target property to the compiler.",
+ false,"Variables for Languages");
+
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODDIR_DEFAULT", cmProperty::VARIABLE,
+ "Fortran default module output directory.",
+ "Most Fortran compilers write .mod files to the current working "
+ "directory. "
+ "For those that do not, this is set to \".\" and used when the "
+ "Fortran_MODULE_DIRECTORY target property is not set.",
+ false,"Variables for Languages");
+
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODOUT_FLAG", cmProperty::VARIABLE,
+ "Fortran flag to enable module output.",
+ "Most Fortran compilers write .mod files out by default. "
+ "For others, this stores the flag needed to enable module output.",
+ false,"Variables for Languages");
+
// variables that are used by cmake but not to be documented
- cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_2", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_3", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_4", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_5", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_6", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_7", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_8", cmProperty::VARIABLE,0,0);
- cm->DefineProperty("CMAKE_MATCH_9", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_2", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_3", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_4", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_5", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_6", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_7", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_8", cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MATCH_9", cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_<LANG>_COMPILER_ARG1",
cmProperty::VARIABLE,0,0);