diff options
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index a5e8294..ff217c3 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -413,19 +413,16 @@ void cmLocalVisualStudio6Generator compileFlags += cflags; } - const char* lang = this->GetSourceFileLanguage(*(*sf)); - if(lang) + const std::string& lang = this->GetSourceFileLanguage(*(*sf)); + if(lang == "CXX") { - if(strcmp(lang, "CXX") == 0) - { - // force a C++ file type - compileFlags += " /TP "; - } - else if(strcmp(lang, "C") == 0) - { - // force to c file type - compileFlags += " /TC "; - } + // force a C++ file type + compileFlags += " /TP "; + } + else if(lang == "C") + { + // force to c file type + compileFlags += " /TC "; } // Add per-source and per-configuration preprocessor definitions. @@ -469,7 +466,7 @@ void cmLocalVisualStudio6Generator } bool excludedFromBuild = - (lang && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY")); + (!lang.empty() && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY")); // Check for extra object-file dependencies. const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS"); @@ -1255,8 +1252,8 @@ void cmLocalVisualStudio6Generator if(targetBuilds) { // Get the language to use for linking. - const char* linkLanguage = target.GetLinkerLanguage(); - if(!linkLanguage) + const std::string& linkLanguage = target.GetLinkerLanguage(); + if(linkLanguage.empty()) { cmSystemTools::Error ("CMake can not determine linker language for target: ", @@ -1677,8 +1674,8 @@ void cmLocalVisualStudio6Generator if(target.GetType() >= cmTarget::EXECUTABLE && target.GetType() <= cmTarget::OBJECT_LIBRARY) { - const char* linkLanguage = target.GetLinkerLanguage(); - if(!linkLanguage) + const std::string& linkLanguage = target.GetLinkerLanguage(); + if(linkLanguage.empty()) { cmSystemTools::Error ("CMake can not determine linker language for target: ", @@ -1745,11 +1742,11 @@ void cmLocalVisualStudio6Generator std::string minsizeDefines = " "; std::string debugrelDefines = " "; - this->JoinDefines(definesSet, defines, 0); - this->JoinDefines(debugDefinesSet, debugDefines, 0); - this->JoinDefines(releaseDefinesSet, releaseDefines, 0); - this->JoinDefines(minsizeDefinesSet, minsizeDefines, 0); - this->JoinDefines(debugrelDefinesSet, debugrelDefines, 0); + this->JoinDefines(definesSet, defines, ""); + this->JoinDefines(debugDefinesSet, debugDefines, ""); + this->JoinDefines(releaseDefinesSet, releaseDefines, ""); + this->JoinDefines(minsizeDefinesSet, minsizeDefines, ""); + this->JoinDefines(debugrelDefinesSet, debugrelDefines, ""); flags += defines; flagsDebug += debugDefines; |