ENH: Bug #371 - Add build configuration for try compiles using cmake variable
This commit is contained in:
parent
37149fc5b3
commit
467fa9dfb3
|
@ -114,7 +114,17 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
|
||||||
{
|
{
|
||||||
makeCommand += "ALL_BUILD";
|
makeCommand += "ALL_BUILD";
|
||||||
}
|
}
|
||||||
makeCommand += " - Debug\"";
|
makeCommand += " - ";
|
||||||
|
if ( m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION") )
|
||||||
|
{
|
||||||
|
makeCommand +=
|
||||||
|
m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
makeCommand += "Debug";
|
||||||
|
}
|
||||||
|
makeCommand += "\"";
|
||||||
int retVal;
|
int retVal;
|
||||||
int timeout = cmGlobalGenerator::s_TryCompileTimeout;
|
int timeout = cmGlobalGenerator::s_TryCompileTimeout;
|
||||||
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,
|
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,
|
||||||
|
|
|
@ -75,7 +75,17 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
||||||
#endif
|
#endif
|
||||||
makeCommand += " ";
|
makeCommand += " ";
|
||||||
makeCommand += projectName;
|
makeCommand += projectName;
|
||||||
makeCommand += ".sln /build Debug /project ";
|
makeCommand += ".sln /build ";
|
||||||
|
if ( m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION") )
|
||||||
|
{
|
||||||
|
makeCommand +=
|
||||||
|
m_LocalGenerators[0]->GetMakefile()->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
makeCommand += "Debug";
|
||||||
|
}
|
||||||
|
makeCommand += " /project ";
|
||||||
if (targetName)
|
if (targetName)
|
||||||
{
|
{
|
||||||
makeCommand += targetName;
|
makeCommand += targetName;
|
||||||
|
|
Loading…
Reference in New Issue