Document CMAKE_TRY_COMPILE_CONFIGURATION variable

Also reference it from try_compile and try_run since it affects those
commands.
This commit is contained in:
Brad King 2011-01-17 17:23:15 -05:00
parent 56efc60fa0
commit 052c2ae1aa
3 changed files with 15 additions and 2 deletions

View File

@ -1121,6 +1121,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable for a target if they are set. " "this variable for a target if they are set. "
"Library targets are otherwise placed in this directory.",false, "Library targets are otherwise placed in this directory.",false,
"Variables that Control the Build"); "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 // Variables defined when the a language is enabled These variables will

View File

@ -94,7 +94,9 @@ public:
"Return the success or failure in " "Return the success or failure in "
"RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags " "RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags "
"to the cmake that is run during the build. " "to the cmake that is run during the build. "
""; "Set variable CMAKE_TRY_COMPILE_CONFIGURATION to choose a build "
"configuration."
;
} }
cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile); cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile);

View File

@ -93,7 +93,10 @@ public:
"that when crosscompiling, the cache variables will have to be set " "that when crosscompiling, the cache variables will have to be set "
"manually to the output of the executable. You can also \"guard\" the " "manually to the output of the executable. You can also \"guard\" the "
"calls to try_run with if(CMAKE_CROSSCOMPILING) and provide an " "calls to try_run with if(CMAKE_CROSSCOMPILING) and provide an "
"easy-to-preset alternative for this case.\n"; "easy-to-preset alternative for this case.\n"
"Set variable CMAKE_TRY_COMPILE_CONFIGURATION to choose a build "
"configuration."
;
} }
cmTypeMacro(cmTryRunCommand, cmCoreTryCompile); cmTypeMacro(cmTryRunCommand, cmCoreTryCompile);