diff options
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index d9425e6..02469d1 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -125,7 +125,7 @@ void cmMakefileLibraryTargetGenerator::WriteObjectLibraryRules() depends, commands, true); // Write the main driver rule to build everything in this target. - this->WriteTargetDriverRule(this->Target->GetName().c_str(), false); + this->WriteTargetDriverRule(this->Target->GetName(), false); } //---------------------------------------------------------------------------- @@ -138,7 +138,7 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules() linkRuleVar += "_CREATE_STATIC_LIBRARY"; if(this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION") && - this->Makefile->GetDefinition((linkRuleVar+"_IPO").c_str())) + this->Makefile->GetDefinition(linkRuleVar+"_IPO")) { linkRuleVar += "_IPO"; } @@ -146,7 +146,7 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules() std::string extraFlags; this->LocalGenerator->GetStaticLibraryFlags(extraFlags, cmSystemTools::UpperCase(this->ConfigName), this->Target); - this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), false); + this->WriteLibraryRules(linkRuleVar, extraFlags, false); } //---------------------------------------------------------------------------- @@ -169,13 +169,13 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) std::string linkFlagsConfig = "LINK_FLAGS_"; linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName); this->LocalGenerator->AppendFlags - (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + (extraFlags, this->Target->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags (extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); this->AddModuleDefinitionFlag(extraFlags); - this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); + this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } //---------------------------------------------------------------------------- @@ -193,12 +193,12 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) std::string linkFlagsConfig = "LINK_FLAGS_"; linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName); this->LocalGenerator->AppendFlags - (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + (extraFlags, this->Target->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags (extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); this->AddModuleDefinitionFlag(extraFlags); - this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); + this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } //---------------------------------------------------------------------------- @@ -216,11 +216,11 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink) std::string linkFlagsConfig = "LINK_FLAGS_"; linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName); this->LocalGenerator->AppendFlags - (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + (extraFlags, this->Target->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS", this->ConfigName); - this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); + this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } //---------------------------------------------------------------------------- @@ -326,19 +326,19 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Construct the output path version of the names for use in command // arguments. std::string targetOutPathPDB = - this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE, + this->Convert(targetFullPathPDB,cmLocalGenerator::NONE, cmLocalGenerator::SHELL); std::string targetOutPath = - this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT, + this->Convert(targetFullPath,cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); std::string targetOutPathSO = - this->Convert(targetFullPathSO.c_str(),cmLocalGenerator::START_OUTPUT, + this->Convert(targetFullPathSO,cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); std::string targetOutPathReal = - this->Convert(targetFullPathReal.c_str(),cmLocalGenerator::START_OUTPUT, + this->Convert(targetFullPathReal,cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); std::string targetOutPathImport = - this->Convert(targetFullPathImport.c_str(),cmLocalGenerator::START_OUTPUT, + this->Convert(targetFullPathImport,cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); if(!this->NoRuleMessages) @@ -382,31 +382,31 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Clean files associated with this library. std::vector<std::string> libCleanFiles; - libCleanFiles.push_back(this->Convert(targetFullPath.c_str(), + libCleanFiles.push_back(this->Convert(targetFullPath, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); if(targetNameReal != targetName) { - libCleanFiles.push_back(this->Convert(targetFullPathReal.c_str(), + libCleanFiles.push_back(this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); } if(targetNameSO != targetName && targetNameSO != targetNameReal) { - libCleanFiles.push_back(this->Convert(targetFullPathSO.c_str(), + libCleanFiles.push_back(this->Convert(targetFullPathSO, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); } if(!targetNameImport.empty()) { - libCleanFiles.push_back(this->Convert(targetFullPathImport.c_str(), + libCleanFiles.push_back(this->Convert(targetFullPathImport, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); std::string implib; if(this->Target->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->Convert(implib.c_str(), + libCleanFiles.push_back(this->Convert(implib, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); } @@ -416,7 +416,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // cleaned. We do not want to delete the .pdb file just before // linking the target. this->CleanFiles.push_back - (this->Convert(targetFullPathPDB.c_str(), + (this->Convert(targetFullPathPDB, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); @@ -467,7 +467,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules std::string responseVar = "CMAKE_"; responseVar += linkLanguage; responseVar += "_USE_RESPONSE_FILE_FOR_OBJECTS"; - if(this->Makefile->IsOn(responseVar.c_str())) + if(this->Makefile->IsOn(responseVar)) { useResponseFileForObjects = true; } @@ -479,7 +479,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules std::string responseVar = "CMAKE_"; responseVar += linkLanguage; responseVar += "_USE_RESPONSE_FILE_FOR_LIBRARIES"; - if(this->Makefile->IsOn(responseVar.c_str())) + if(this->Makefile->IsOn(responseVar)) { useResponseFileForLibs = true; } @@ -498,21 +498,21 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules std::string arCreateVar = "CMAKE_"; arCreateVar += linkLanguage; arCreateVar += "_ARCHIVE_CREATE"; - if(const char* rule = this->Makefile->GetDefinition(arCreateVar.c_str())) + if(const char* rule = this->Makefile->GetDefinition(arCreateVar)) { cmSystemTools::ExpandListArgument(rule, archiveCreateCommands); } std::string arAppendVar = "CMAKE_"; arAppendVar += linkLanguage; arAppendVar += "_ARCHIVE_APPEND"; - if(const char* rule = this->Makefile->GetDefinition(arAppendVar.c_str())) + if(const char* rule = this->Makefile->GetDefinition(arAppendVar)) { cmSystemTools::ExpandListArgument(rule, archiveAppendCommands); } std::string arFinishVar = "CMAKE_"; arFinishVar += linkLanguage; arFinishVar += "_ARCHIVE_FINISH"; - if(const char* rule = this->Makefile->GetDefinition(arFinishVar.c_str())) + if(const char* rule = this->Makefile->GetDefinition(arFinishVar)) { cmSystemTools::ExpandListArgument(rule, archiveFinishCommands); } @@ -580,7 +580,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->Target->GetSupportDirectory(); - objectDir = this->Convert(objectDir.c_str(), + objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -611,7 +611,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules { // Convert to a path for the native build tool. install_name_dir = - this->LocalGenerator->Convert(install_name_dir.c_str(), + this->LocalGenerator->Convert(install_name_dir, cmLocalGenerator::NONE, cmLocalGenerator::SHELL, false); vars.TargetInstallNameDir = install_name_dir.c_str(); @@ -745,7 +745,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Write the build rule. this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - targetFullPathReal.c_str(), + targetFullPathReal, depends, commands, false); // Some targets have more than one output file. Create rules to @@ -764,7 +764,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules } // Write the main driver rule to build everything in this target. - this->WriteTargetDriverRule(targetFullPath.c_str(), relink); + this->WriteTargetDriverRule(targetFullPath, relink); // Clean all the possible library names and symlinks. this->CleanFiles.insert(this->CleanFiles.end(), @@ -783,7 +783,7 @@ cmMakefileLibraryTargetGenerator fvar += "_OSX_"; fvar += name; fvar += "_VERSION_FLAG"; - const char* flag = this->Makefile->GetDefinition(fvar.c_str()); + const char* flag = this->Makefile->GetDefinition(fvar); // Skip if no such flag. if(!flag) |