summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-11 22:00:36 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-11 22:00:36 (GMT)
commit2e2f9b4be338c98bdcb42d51193c9c755fd04f33 (patch)
tree2309e729f61cb51c12eb58f6fef53d1a4b23c03e /Source/cmake.cxx
parent5a834b0bb0bc2889bb67bdaac37ce9b17d4f0f59 (diff)
downloadCMake-2e2f9b4be338c98bdcb42d51193c9c755fd04f33.zip
CMake-2e2f9b4be338c98bdcb42d51193c9c755fd04f33.tar.gz
CMake-2e2f9b4be338c98bdcb42d51193c9c755fd04f33.tar.bz2
ENH: Add global computed property IN_TRY_COMPILE.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c2714d0..8f36aab 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3303,6 +3303,11 @@ void cmake::DefineProperties(cmake *cm)
"at the beginning of native build system generation. "
"This property causes it to display details of its analysis to stderr.");
+ cm->DefineProperty
+ ("IN_TRY_COMPILE", cmProperty::GLOBAL,
+ "Read-only property that is true during a try-compile configuration.",
+ "True when building a project inside a TRY_COMPILE or TRY_RUN command.");
+
// ================================================================
// define variables as well
// ================================================================
@@ -3512,7 +3517,11 @@ const char *cmake::GetProperty(const char* prop, cmProperty::ScopeType scope)
}
this->SetProperty("COMMANDS",output.c_str());
}
-
+ else if ( propname == "IN_TRY_COMPILE" )
+ {
+ this->SetProperty("IN_TRY_COMPILE",
+ this->GetIsInTryCompile()? "1":"0");
+ }
return this->Properties.GetPropertyValue(prop, scope, chain);
}