mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
ENH: Add global computed property IN_TRY_COMPILE.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user