diff options
author | Brad King <brad.king@kitware.com> | 2016-03-07 18:31:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-07 18:52:38 (GMT) |
commit | 72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b (patch) | |
tree | c4011b95d6067e77f6074026d4ad9d5b381eee5b /Source/cmGlobalGenerator.h | |
parent | 8256d021c8324779c7269658a094848ebeafb82e (diff) | |
download | CMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.zip CMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.tar.gz CMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.tar.bz2 |
Diagnose recursive project/enable_language without crashing (#15999)
Calling `project()` or `enable_language()` from a toolchain file will
infinitely recurse since those commands load the toolchain file.
Diagnose and reject this case with an error message instead of crashing
when the stack eventually overflows.
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r-- | Source/cmGlobalGenerator.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 48fa704..6e819d3 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -457,6 +457,7 @@ private: // in EnableLanguagesFromGenerator std::map<std::string, bool> IgnoreExtensions; std::set<std::string> LanguagesReady; // Ready for try_compile + std::set<std::string> LanguagesInProgress; std::map<std::string, std::string> OutputExtensions; std::map<std::string, std::string> LanguageToOutputExtension; std::map<std::string, std::string> ExtensionToLanguage; |