summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-12-06 17:38:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-12-06 17:38:04 (GMT)
commit2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3 (patch)
treed69f29f6b80c576c270383404834bd14a27b7a1d /Source/cmGlobalGenerator.cxx
parente3bb6683dedc2e896689a2b202a5c1ee6e373e18 (diff)
downloadCMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.zip
CMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.tar.gz
CMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.tar.bz2
BUG: fix for bug 1396, object files could not be used as sources any more
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index beef256..6b02c96 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -330,6 +330,16 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionFromExtension(const cha
return "";
}
const char* lang = this->GetLanguageFromExtension(ext);
+ if(!lang || *lang == 0)
+ {
+ // if no language is found then check to see if it is already an
+ // ouput extension for some language. In that case it should be ignored
+ // and in this map, so it will not be compiled but will just be used.
+ if(m_OutputExtensions.count(ext))
+ {
+ return ext;
+ }
+ }
return this->GetLanguageOutputExtensionForLanguage(lang);
}
@@ -362,6 +372,11 @@ void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
if(outputExtension)
{
m_LanguageToOutputExtension[l] = outputExtension;
+ m_OutputExtensions[outputExtension] = outputExtension;
+ if(outputExtension[0] == '.')
+ {
+ m_OutputExtensions[outputExtension+1] = outputExtension+1;
+ }
}
std::string linkerPrefVar = std::string("CMAKE_") +
@@ -676,6 +691,7 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen )
this->m_IgnoreExtensions = gen->m_IgnoreExtensions;
this->m_LanguageToOutputExtension = gen->m_LanguageToOutputExtension;
this->m_LanguageToLinkerPreference = gen->m_LanguageToLinkerPreference;
+ this->m_OutputExtensions = gen->m_OutputExtensions;
}
//----------------------------------------------------------------------------