From 67ac3ea5036f946557abb5ba7fde0bee4f17ace2 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 23 Sep 2004 08:51:06 -0400 Subject: ENH: fix problems with .def and RC files --- Modules/CMakeRCInformation.cmake | 2 +- Source/cmGlobalGenerator.cxx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index a83609c..ceb5cfd 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -15,7 +15,7 @@ SET (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_ENV_INIT} $ENV{RCFLAGS} ${CMAKE_RC_FLAGS_I # now define the following rule variables # CMAKE_RC_COMPILE_OBJECT - +SET(CMAKE_INCLUDE_FLAG_RC "-I") # compile a Resource file into an object file IF(NOT CMAKE_RC_COMPILE_OBJECT) SET(CMAKE_RC_COMPILE_OBJECT diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 023bccc..e95bb5e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -312,6 +312,10 @@ void cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* lang) { + if(!lang) + { + return ""; + } if(m_LanguageToOutputExtension.count(lang) > 0) { return m_LanguageToOutputExtension[lang].c_str(); @@ -321,6 +325,10 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* const char* cmGlobalGenerator::GetLanguageOutputExtensionFromExtension(const char* ext) { + if(!ext) + { + return ""; + } const char* lang = this->GetLanguageFromExtension(ext); return this->GetLanguageOutputExtensionForLanguage(lang); } -- cgit v0.12