diff options
author | Brad King <brad.king@kitware.com> | 2011-01-24 15:00:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-01-24 15:00:45 (GMT) |
commit | c83a834d29965e245e1e93fcda0e98e58e775f9f (patch) | |
tree | 53346c7a70423f7ab83db15e69f26a2468d66961 /Source/cmMakefile.cxx | |
parent | 5792d3a38a67c8e3fffa7e2743a106a87ff7096c (diff) | |
download | CMake-c83a834d29965e245e1e93fcda0e98e58e775f9f.zip CMake-c83a834d29965e245e1e93fcda0e98e58e775f9f.tar.gz CMake-c83a834d29965e245e1e93fcda0e98e58e775f9f.tar.bz2 |
try_compile: Allow only languages loaded in caller (#11469)
During a try_compile cmGlobalGenerator::EnableLanguage uses results from
the outer project. Reject attempts to enable languages in the test
project that are not "ready" in the outer project. Mark a language as
"ready" when all its information has been loaded and we are ready to
generate build rules.
This also avoids infinite recursion introduced by commit 295b5b60 (Honor
CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile, 2010-06-29) for projects
that set CMAKE_USER_MAKE_RULES_OVERRIDE to a file that uses try_compile.
The file is loaded along with the information for a given langauge so
the language is not yet "ready".
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8eece6b..c438011 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2691,7 +2691,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir, } // to save time we pass the EnableLanguage info directly gg->EnableLanguagesFromGenerator - (this->LocalGenerator->GetGlobalGenerator()); + (this->LocalGenerator->GetGlobalGenerator(), this); if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", |