summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index edb0610..284a2a6 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -421,12 +421,16 @@ void cmLocalVisualStudio6Generator
compileFlags += cflags;
}
- const char* lang = this->GlobalGenerator->
- GetLanguageFromExtension((*sf)->GetSourceExtension().c_str());
+ const char* lang = this->GetSourceFileLanguage(*(*sf));
if(lang && strcmp(lang, "CXX") == 0)
{
// force a C++ file type
compileFlags += " /TP ";
+ }
+ else if(strcmp(lang, "C") == 0)
+ {
+ // force to c file type
+ compileFlags += " /TC ";
}
// Check for extra object-file dependencies.