diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-01-20 13:00:00 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-21 09:19:13 -0500 |
commit | 9db532f44dc014303e308e43b097175b8827508c (patch) | |
tree | e8dca2a118f40e4f9af1bbb70dfb984e428c3aad /Source | |
parent | 941c09616bc214db77e3b1b7e5229517db08b45c (diff) | |
download | cmake-9db532f44dc014303e308e43b097175b8827508c.tar.gz |
cmInstall*Generator: std::string params
Several construction parameters converted to std::string
Also made a few class members const
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallCommand.cxx | 40 | ||||
-rw-r--r-- | Source/cmInstallDirectoryGenerator.cxx | 16 | ||||
-rw-r--r-- | Source/cmInstallDirectoryGenerator.h | 20 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.h | 20 | ||||
-rw-r--r-- | Source/cmInstallFilesCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmInstallFilesGenerator.cxx | 19 | ||||
-rw-r--r-- | Source/cmInstallFilesGenerator.h | 18 | ||||
-rw-r--r-- | Source/cmInstallProgramsCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmInstallScriptGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmInstallScriptGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmInstallSubdirectoryGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmInstallSubdirectoryGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmInstallTargetGenerator.h | 20 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 2 |
17 files changed, 122 insertions, 119 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 54b85cd900..5088379471 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -93,13 +93,12 @@ std::unique_ptr<cmInstallTargetGenerator> CreateInstallTargetGenerator( cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(target.GetMakefile()); target.SetHaveInstallRule(true); - const char* component = namelink ? args.GetNamelinkComponent().c_str() - : args.GetComponent().c_str(); + const std::string& component = + namelink ? args.GetNamelinkComponent() : args.GetComponent(); auto g = cm::make_unique<cmInstallTargetGenerator>( - target.GetName(), destination.c_str(), impLib, - args.GetPermissions().c_str(), args.GetConfigurations(), component, - message, args.GetExcludeFromAll(), args.GetOptional() || forceOpt, - backtrace); + target.GetName(), destination, impLib, args.GetPermissions(), + args.GetConfigurations(), component, message, args.GetExcludeFromAll(), + args.GetOptional() || forceOpt, backtrace); target.AddInstallGenerator(g.get()); return g; } @@ -122,9 +121,9 @@ std::unique_ptr<cmInstallFilesGenerator> CreateInstallFilesGenerator( cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(mf); return cm::make_unique<cmInstallFilesGenerator>( - absFiles, destination.c_str(), programs, args.GetPermissions().c_str(), - args.GetConfigurations(), args.GetComponent().c_str(), message, - args.GetExcludeFromAll(), args.GetRename().c_str(), args.GetOptional()); + absFiles, destination, programs, args.GetPermissions(), + args.GetConfigurations(), args.GetComponent(), message, + args.GetExcludeFromAll(), args.GetRename(), args.GetOptional()); } std::unique_ptr<cmInstallFilesGenerator> CreateInstallFilesGenerator( @@ -198,13 +197,13 @@ bool HandleScriptMode(std::vector<std::string> const& args, } helper.Makefile->AddInstallGenerator( cm::make_unique<cmInstallScriptGenerator>( - script.c_str(), false, component.c_str(), exclude_from_all)); + script, false, component.c_str(), exclude_from_all)); } else if (doing_code) { doing_code = false; std::string const& code = arg; helper.Makefile->AddInstallGenerator( cm::make_unique<cmInstallScriptGenerator>( - code.c_str(), true, component.c_str(), exclude_from_all)); + code, true, component.c_str(), exclude_from_all)); } } @@ -1202,9 +1201,8 @@ bool HandleDirectoryMode(std::vector<std::string> const& args, // Create the directory install generator. helper.Makefile->AddInstallGenerator( cm::make_unique<cmInstallDirectoryGenerator>( - dirs, destination, permissions_file.c_str(), permissions_dir.c_str(), - configurations, component.c_str(), message, exclude_from_all, - literal_args.c_str(), optional)); + dirs, destination, permissions_file, permissions_dir, configurations, + component, message, exclude_from_all, literal_args, optional)); // Tell the global generator about any installation component names // specified. @@ -1294,10 +1292,9 @@ bool HandleExportAndroidMKMode(std::vector<std::string> const& args, // Create the export install generator. helper.Makefile->AddInstallGenerator( cm::make_unique<cmInstallExportGenerator>( - &exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(), - ica.GetConfigurations(), ica.GetComponent().c_str(), message, - ica.GetExcludeFromAll(), fname.c_str(), name_space.c_str(), exportOld, - true)); + &exportSet, ica.GetDestination(), ica.GetPermissions(), + ica.GetConfigurations(), ica.GetComponent(), message, + ica.GetExcludeFromAll(), fname, name_space, exportOld, true)); return true; #else @@ -1408,10 +1405,9 @@ bool HandleExportMode(std::vector<std::string> const& args, // Create the export install generator. helper.Makefile->AddInstallGenerator( cm::make_unique<cmInstallExportGenerator>( - &exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(), - ica.GetConfigurations(), ica.GetComponent().c_str(), message, - ica.GetExcludeFromAll(), fname.c_str(), name_space.c_str(), exportOld, - false)); + &exportSet, ica.GetDestination(), ica.GetPermissions(), + ica.GetConfigurations(), ica.GetComponent(), message, + ica.GetExcludeFromAll(), fname, name_space, exportOld, false)); return true; } diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 259c7f76dd..7e3148a895 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallDirectoryGenerator.h" +#include <utility> + #include "cmGeneratorExpression.h" #include "cmInstallType.h" #include "cmLocalGenerator.h" @@ -11,17 +13,17 @@ cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector<std::string> const& dirs, const char* dest, - const char* file_permissions, const char* dir_permissions, - std::vector<std::string> const& configurations, const char* component, - MessageLevel message, bool exclude_from_all, const char* literal_args, + std::string file_permissions, std::string dir_permissions, + std::vector<std::string> const& configurations, std::string const& component, + MessageLevel message, bool exclude_from_all, std::string literal_args, bool optional) - : cmInstallGenerator(dest, configurations, component, message, + : cmInstallGenerator(dest, configurations, component.c_str(), message, exclude_from_all) , LocalGenerator(nullptr) , Directories(dirs) - , FilePermissions(file_permissions) - , DirPermissions(dir_permissions) - , LiteralArguments(literal_args) + , FilePermissions(std::move(file_permissions)) + , DirPermissions(std::move(dir_permissions)) + , LiteralArguments(std::move(literal_args)) , Optional(optional) { // We need per-config actions if destination have generator expressions. diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h index 84c06948e8..e53e81c4db 100644 --- a/Source/cmInstallDirectoryGenerator.h +++ b/Source/cmInstallDirectoryGenerator.h @@ -21,12 +21,12 @@ class cmInstallDirectoryGenerator : public cmInstallGenerator { public: cmInstallDirectoryGenerator(std::vector<std::string> const& dirs, - const char* dest, const char* file_permissions, - const char* dir_permissions, + const char* dest, std::string file_permissions, + std::string dir_permissions, std::vector<std::string> const& configurations, - const char* component, MessageLevel message, - bool exclude_from_all, const char* literal_args, - bool optional = false); + std::string const& component, + MessageLevel message, bool exclude_from_all, + std::string literal_args, bool optional = false); ~cmInstallDirectoryGenerator() override; bool Compute(cmLocalGenerator* lg) override; @@ -41,11 +41,11 @@ protected: Indent indent, std::vector<std::string> const& dirs); cmLocalGenerator* LocalGenerator; - std::vector<std::string> Directories; - std::string FilePermissions; - std::string DirPermissions; - std::string LiteralArguments; - bool Optional; + std::vector<std::string> const Directories; + std::string const FilePermissions; + std::string const DirPermissions; + std::string const LiteralArguments; + bool const Optional; }; #endif diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index cba68bed4b..ff32ef10c7 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -18,16 +18,16 @@ #include "cmSystemTools.h" cmInstallExportGenerator::cmInstallExportGenerator( - cmExportSet* exportSet, const char* destination, - const char* file_permissions, std::vector<std::string> const& configurations, - const char* component, MessageLevel message, bool exclude_from_all, - const char* filename, const char* name_space, bool exportOld, bool android) - : cmInstallGenerator(destination, configurations, component, message, - exclude_from_all) + cmExportSet* exportSet, std::string const& destination, + std::string file_permissions, std::vector<std::string> const& configurations, + std::string const& component, MessageLevel message, bool exclude_from_all, + std::string filename, std::string name_space, bool exportOld, bool android) + : cmInstallGenerator(destination.c_str(), configurations, component.c_str(), + message, exclude_from_all) , ExportSet(exportSet) - , FilePermissions(file_permissions) - , FileName(filename) - , Namespace(name_space) + , FilePermissions(std::move(file_permissions)) + , FileName(std::move(filename)) + , Namespace(std::move(name_space)) , ExportOld(exportOld) , LocalGenerator(nullptr) { diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index f44127e3d9..cf28b35d8d 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -23,12 +23,12 @@ class cmLocalGenerator; class cmInstallExportGenerator : public cmInstallGenerator { public: - cmInstallExportGenerator(cmExportSet* exportSet, const char* dest, - const char* file_permissions, + cmInstallExportGenerator(cmExportSet* exportSet, std::string const& dest, + std::string file_permissions, const std::vector<std::string>& configurations, - const char* component, MessageLevel message, - bool exclude_from_all, const char* filename, - const char* name_space, bool exportOld, + std::string const& component, MessageLevel message, + bool exclude_from_all, std::string filename, + std::string name_space, bool exportOld, bool android); ~cmInstallExportGenerator() override; @@ -52,11 +52,11 @@ protected: void ComputeTempDir(); size_t GetMaxConfigLength() const; - cmExportSet* ExportSet; - std::string FilePermissions; - std::string FileName; - std::string Namespace; - bool ExportOld; + cmExportSet* const ExportSet; + std::string const FilePermissions; + std::string const FileName; + std::string const Namespace; + bool const ExportOld; cmLocalGenerator* LocalGenerator; std::string TempDir; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index bfc735904e..3c59f0180a 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -115,8 +115,8 @@ static void CreateInstallGenerator(cmMakefile& makefile, } // Use a file install generator. - const char* no_permissions = ""; - const char* no_rename = ""; + const std::string no_permissions; + const std::string no_rename; bool no_exclude_from_all = false; std::string no_component = makefile.GetSafeDefinition("CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"); @@ -124,8 +124,8 @@ static void CreateInstallGenerator(cmMakefile& makefile, cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(&makefile); makefile.AddInstallGenerator(cm::make_unique<cmInstallFilesGenerator>( - files, destination.c_str(), false, no_permissions, no_configurations, - no_component.c_str(), message, no_exclude_from_all, no_rename)); + files, destination, false, no_permissions, no_configurations, no_component, + message, no_exclude_from_all, no_rename)); } /** diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index f5b69a5d48..e470ff8e76 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesGenerator.h" +#include <utility> + #include "cmGeneratorExpression.h" #include "cmInstallType.h" #include "cmStringAlgorithms.h" @@ -9,16 +11,17 @@ class cmLocalGenerator; cmInstallFilesGenerator::cmInstallFilesGenerator( - std::vector<std::string> const& files, const char* dest, bool programs, - const char* file_permissions, std::vector<std::string> const& configurations, - const char* component, MessageLevel message, bool exclude_from_all, - const char* rename, bool optional) - : cmInstallGenerator(dest, configurations, component, message, - exclude_from_all) + std::vector<std::string> const& files, std::string const& dest, + bool programs, std::string file_permissions, + std::vector<std::string> const& configurations, std::string const& component, + MessageLevel message, bool exclude_from_all, std::string rename, + bool optional) + : cmInstallGenerator(dest.c_str(), configurations, component.c_str(), + message, exclude_from_all) , LocalGenerator(nullptr) , Files(files) - , FilePermissions(file_permissions) - , Rename(rename) + , FilePermissions(std::move(file_permissions)) + , Rename(std::move(rename)) , Programs(programs) , Optional(optional) { diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index a6800375bb..82666033b8 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -21,11 +21,11 @@ class cmInstallFilesGenerator : public cmInstallGenerator { public: cmInstallFilesGenerator(std::vector<std::string> const& files, - const char* dest, bool programs, - const char* file_permissions, + std::string const& dest, bool programs, + std::string file_permissions, std::vector<std::string> const& configurations, - const char* component, MessageLevel message, - bool exclude_from_all, const char* rename, + std::string const& component, MessageLevel message, + bool exclude_from_all, std::string rename, bool optional = false); ~cmInstallFilesGenerator() override; @@ -42,11 +42,11 @@ protected: std::vector<std::string> const& files); cmLocalGenerator* LocalGenerator; - std::vector<std::string> Files; - std::string FilePermissions; - std::string Rename; - bool Programs; - bool Optional; + std::vector<std::string> const Files; + std::string const FilePermissions; + std::string const Rename; + bool const Programs; + bool const Optional; }; #endif diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 2fd9bad453..be07fd4d4a 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -89,8 +89,8 @@ static void FinalAction(cmMakefile& makefile, std::string const& dest, } // Use a file install generator. - const char* no_permissions = ""; - const char* no_rename = ""; + const std::string no_permissions; + const std::string no_rename; bool no_exclude_from_all = false; std::string no_component = makefile.GetSafeDefinition("CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"); @@ -98,8 +98,8 @@ static void FinalAction(cmMakefile& makefile, std::string const& dest, cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(&makefile); makefile.AddInstallGenerator(cm::make_unique<cmInstallFilesGenerator>( - files, destination.c_str(), true, no_permissions, no_configurations, - no_component.c_str(), message, no_exclude_from_all, no_rename)); + files, destination, true, no_permissions, no_configurations, no_component, + message, no_exclude_from_all, no_rename)); } /** diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index ea294556b2..77680d25d8 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -3,6 +3,7 @@ #include "cmInstallScriptGenerator.h" #include <ostream> +#include <utility> #include <vector> #include "cmGeneratorExpression.h" @@ -11,13 +12,13 @@ #include "cmPolicies.h" #include "cmScriptGenerator.h" -cmInstallScriptGenerator::cmInstallScriptGenerator(const char* script, +cmInstallScriptGenerator::cmInstallScriptGenerator(std::string script, bool code, const char* component, bool exclude_from_all) : cmInstallGenerator(nullptr, std::vector<std::string>(), component, MessageDefault, exclude_from_all) - , Script(script) + , Script(std::move(script)) , Code(code) , AllowGenex(false) { diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h index 7efa321691..d22c6ecc40 100644 --- a/Source/cmInstallScriptGenerator.h +++ b/Source/cmInstallScriptGenerator.h @@ -19,7 +19,7 @@ class cmLocalGenerator; class cmInstallScriptGenerator : public cmInstallGenerator { public: - cmInstallScriptGenerator(const char* script, bool code, + cmInstallScriptGenerator(std::string script, bool code, const char* component, bool exclude_from_all); ~cmInstallScriptGenerator() override; @@ -32,8 +32,8 @@ protected: void AddScriptInstallRule(std::ostream& os, Indent indent, std::string const& script); - std::string Script; - bool Code; + std::string const Script; + bool const Code; cmLocalGenerator* LocalGenerator; bool AllowGenex; }; diff --git a/Source/cmInstallSubdirectoryGenerator.cxx b/Source/cmInstallSubdirectoryGenerator.cxx index 5405b7cdec..8b45972895 100644 --- a/Source/cmInstallSubdirectoryGenerator.cxx +++ b/Source/cmInstallSubdirectoryGenerator.cxx @@ -4,6 +4,7 @@ #include <memory> #include <sstream> +#include <utility> #include <vector> #include "cmLocalGenerator.h" @@ -13,11 +14,11 @@ #include "cmSystemTools.h" cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator( - cmMakefile* makefile, const char* binaryDirectory, bool excludeFromAll) + cmMakefile* makefile, std::string binaryDirectory, bool excludeFromAll) : cmInstallGenerator(nullptr, std::vector<std::string>(), nullptr, MessageDefault, excludeFromAll) , Makefile(makefile) - , BinaryDirectory(binaryDirectory) + , BinaryDirectory(std::move(binaryDirectory)) { } diff --git a/Source/cmInstallSubdirectoryGenerator.h b/Source/cmInstallSubdirectoryGenerator.h index b99bdd5ff8..f9cd0f1f9d 100644 --- a/Source/cmInstallSubdirectoryGenerator.h +++ b/Source/cmInstallSubdirectoryGenerator.h @@ -20,7 +20,7 @@ class cmInstallSubdirectoryGenerator : public cmInstallGenerator { public: cmInstallSubdirectoryGenerator(cmMakefile* makefile, - const char* binaryDirectory, + std::string binaryDirectory, bool excludeFromAll); ~cmInstallSubdirectoryGenerator() override; @@ -33,8 +33,8 @@ public: protected: void GenerateScript(std::ostream& os) override; - cmMakefile* Makefile; - std::string BinaryDirectory; + cmMakefile* const Makefile; + std::string const BinaryDirectory; cmLocalGenerator* LocalGenerator; }; diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 69c9b7ed20..d2fc2ea996 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -25,15 +25,15 @@ #include "cmake.h" cmInstallTargetGenerator::cmInstallTargetGenerator( - std::string targetName, const char* dest, bool implib, - const char* file_permissions, std::vector<std::string> const& configurations, - const char* component, MessageLevel message, bool exclude_from_all, + std::string targetName, std::string const& dest, bool implib, + std::string file_permissions, std::vector<std::string> const& configurations, + std::string const& component, MessageLevel message, bool exclude_from_all, bool optional, cmListFileBacktrace backtrace) - : cmInstallGenerator(dest, configurations, component, message, - exclude_from_all) + : cmInstallGenerator(dest.c_str(), configurations, component.c_str(), + message, exclude_from_all) , TargetName(std::move(targetName)) , Target(nullptr) - , FilePermissions(file_permissions) + , FilePermissions(std::move(file_permissions)) , ImportLibrary(implib) , Optional(optional) , Backtrace(std::move(backtrace)) diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index 8730454b12..e21001f888 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -23,11 +23,11 @@ class cmInstallTargetGenerator : public cmInstallGenerator { public: cmInstallTargetGenerator( - std::string targetName, const char* dest, bool implib, - const char* file_permissions, - std::vector<std::string> const& configurations, const char* component, - MessageLevel message, bool exclude_from_all, bool optional, - cmListFileBacktrace backtrace = cmListFileBacktrace()); + std::string targetName, std::string const& dest, bool implib, + std::string file_permissions, + std::vector<std::string> const& configurations, + std::string const& component, MessageLevel message, bool exclude_from_all, + bool optional, cmListFileBacktrace backtrace = cmListFileBacktrace()); ~cmInstallTargetGenerator() override; /** Select the policy for installing shared library linkable name @@ -106,13 +106,13 @@ protected: const std::string& toDestDirPath); void IssueCMP0095Warning(const std::string& unescapedRpath); - std::string TargetName; + std::string const TargetName; cmGeneratorTarget* Target; - std::string FilePermissions; + std::string const FilePermissions; NamelinkModeType NamelinkMode; - bool ImportLibrary; - bool Optional; - cmListFileBacktrace Backtrace; + bool const ImportLibrary; + bool const Optional; + cmListFileBacktrace const Backtrace; }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ed857e5ac4..02dedc1359 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3004,7 +3004,7 @@ class cmInstallTargetGeneratorLocal : public cmInstallTargetGenerator { public: cmInstallTargetGeneratorLocal(cmLocalGenerator* lg, std::string const& t, - const char* dest, bool implib) + std::string const& dest, bool implib) : cmInstallTargetGenerator( t, dest, implib, "", std::vector<std::string>(), "Unspecified", cmInstallGenerator::SelectMessageLevel(lg->GetMakefile()), false, @@ -3049,8 +3049,8 @@ void cmLocalGenerator::GenerateTargetInstallRules( case cmStateEnums::STATIC_LIBRARY: case cmStateEnums::MODULE_LIBRARY: { // Use a target install generator. - cmInstallTargetGeneratorLocal g(this, l->GetName(), - destination.c_str(), false); + cmInstallTargetGeneratorLocal g(this, l->GetName(), destination, + false); g.Generate(os, config, configurationTypes); } break; case cmStateEnums::SHARED_LIBRARY: { @@ -3058,19 +3058,19 @@ void cmLocalGenerator::GenerateTargetInstallRules( // Special code to handle DLL. Install the import library // to the normal destination and the DLL to the runtime // destination. - cmInstallTargetGeneratorLocal g1(this, l->GetName(), - destination.c_str(), true); + cmInstallTargetGeneratorLocal g1(this, l->GetName(), destination, + true); g1.Generate(os, config, configurationTypes); // We also skip over the leading slash given by the user. destination = l->Target->GetRuntimeInstallPath().substr(1); cmSystemTools::ConvertToUnixSlashes(destination); - cmInstallTargetGeneratorLocal g2(this, l->GetName(), - destination.c_str(), false); + cmInstallTargetGeneratorLocal g2(this, l->GetName(), destination, + false); g2.Generate(os, config, configurationTypes); #else // Use a target install generator. - cmInstallTargetGeneratorLocal g(this, l->GetName(), - destination.c_str(), false); + cmInstallTargetGeneratorLocal g(this, l->GetName(), destination, + false); g.Generate(os, config, configurationTypes); #endif } break; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index dc741d3ddc..668a27daad 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1748,7 +1748,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, } this->AddInstallGenerator(cm::make_unique<cmInstallSubdirectoryGenerator>( - subMf, binPath.c_str(), excludeFromAll)); + subMf, binPath, excludeFromAll)); } const std::string& cmMakefile::GetCurrentSourceDirectory() const |