diff options
author | David Cole <david.cole@kitware.com> | 2012-06-21 15:54:52 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-06-21 15:54:52 (GMT) |
commit | e5ebb7740535a849e77ffdec0ce32d5ff0c3b69d (patch) | |
tree | 05333bf1cbcbba0cbd2441af020d90789a501e71 /Source/cmLocalGenerator.cxx | |
parent | 14576fc096f0ee575d6b6254fc7f231330e025f9 (diff) | |
parent | 2c2fbaf0e5902d62a4321cdac125778a2170ec5d (diff) | |
download | CMake-e5ebb7740535a849e77ffdec0ce32d5ff0c3b69d.zip CMake-e5ebb7740535a849e77ffdec0ce32d5ff0c3b69d.tar.gz CMake-e5ebb7740535a849e77ffdec0ce32d5ff0c3b69d.tar.bz2 |
Merge topic 'no-source-language-crash'
2c2fbaf Do not crash on unknown source language (#13323)
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 46c92cb..0cfb36b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2865,10 +2865,13 @@ cmLocalGenerator bool replaceExt = this->NeedBackwardsCompatibility(2, 4); if(!replaceExt) { - std::string repVar = "CMAKE_"; - repVar += source.GetLanguage(); - repVar += "_OUTPUT_EXTENSION_REPLACE"; - replaceExt = this->Makefile->IsOn(repVar.c_str()); + if(const char* lang = source.GetLanguage()) + { + std::string repVar = "CMAKE_"; + repVar += lang; + repVar += "_OUTPUT_EXTENSION_REPLACE"; + replaceExt = this->Makefile->IsOn(repVar.c_str()); + } } // Remove the source extension if it is to be replaced. |