summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-24 15:00:45 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-24 15:00:45 (GMT)
commitc83a834d29965e245e1e93fcda0e98e58e775f9f (patch)
tree53346c7a70423f7ab83db15e69f26a2468d66961 /Source/cmGlobalGenerator.h
parent5792d3a38a67c8e3fffa7e2743a106a87ff7096c (diff)
downloadCMake-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/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 878be11..26690af 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -78,7 +78,8 @@ public:
/**
* Try to determine system infomation, get it from another generator
*/
- virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen);
+ virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
+ cmMakefile* mf);
/**
* Try running cmake and building a file. This is used for dynalically
@@ -321,11 +322,13 @@ protected:
std::map<cmStdString,cmTarget *> TotalTargets;
private:
+ cmMakefile* TryCompileOuterMakefile;
float FirstTimeProgress;
// If you add a new map here, make sure it is copied
// in EnableLanguagesFromGenerator
std::map<cmStdString, bool> IgnoreExtensions;
std::map<cmStdString, bool> LanguageEnabled;
+ std::set<cmStdString> LanguagesReady; // Ready for try_compile
std::map<cmStdString, cmStdString> OutputExtensions;
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
std::map<cmStdString, cmStdString> ExtensionToLanguage;