summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-13 10:42:50 -0400
committerKen Martin <ken.martin@kitware.com>2002-09-13 10:42:50 -0400
commit6132184cc3a3832463308fa45d7fda17f3df067e (patch)
tree59c853ecf53c4332fc28b5fec6061ba8690e6212 /Source/cmMakefile.cxx
parentc1da4c9570d57f641f35038bbadb926398d4236c (diff)
downloadcmake-6132184cc3a3832463308fa45d7fda17f3df067e.tar.gz
better trycompile and enable langiages
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 4c4cd6be2f..fc7622c381 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;