summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4c4cd6b..fc7622c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1354,7 +1354,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
cmake cm;
cm.SetIsInTryCompile(true);
cmGlobalGenerator *gg =
- cm.CreateGlobalGenerator(this->m_LocalGenerator->GetGlobalGenerator()->GetName());
+ cm.CreateGlobalGenerator(m_LocalGenerator->GetGlobalGenerator()->GetName());
if (!gg)
{
cmSystemTools::Error(
@@ -1371,6 +1371,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
cm.SetStartDirectory(srcdir);
cm.SetStartOutputDirectory(bindir);
+ // to save time we pass the EnableLanguage info directly
+ gg->EnableLanguagesFromGenerator(m_LocalGenerator->GetGlobalGenerator(),
+ this);
+
if (cm.Configure(cmakeCommand.c_str()) != 0)
{
cmSystemTools::Error(
@@ -1390,7 +1394,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
}
// finally call the generator to actually build the resulting project
- int ret = gg->TryCompile(srcdir,bindir,projectName, targetName);
+ int ret =
+ m_LocalGenerator->GetGlobalGenerator()->TryCompile(srcdir,bindir,
+ projectName,
+ targetName);
cmSystemTools::ChangeDirectory(cwd.c_str());
return ret;