diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 795048b7d..ae9c73173 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1007,7 +1007,7 @@ void cmGlobalGenerator::ClearEnabledLanguages() this->LanguageEnabled.clear(); } -bool cmGlobalGenerator::IsDependedOn(const char* project, +bool cmGlobalGenerator::IsDependedOn(const std::string& project, cmTarget const* targetIn) { // Get all local gens for this project @@ -1615,7 +1615,7 @@ void cmGlobalGenerator::CheckLocalGenerators() } int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, - const char *projectName, + const std::string& projectName, const std::string& target, bool fast, std::string *output, cmMakefile *mf) { @@ -1663,8 +1663,9 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, } void cmGlobalGenerator::GenerateBuildCommand( - std::vector& makeCommand, const char*, const char*, const char*, - const std::string&, const char*, bool, std::vector const&) + std::vector& makeCommand, const char*, const std::string&, + const char*, const std::string&, const char*, bool, + std::vector const&) { makeCommand.push_back( "cmGlobalGenerator::GenerateBuildCommand not implemented"); @@ -1672,7 +1673,7 @@ void cmGlobalGenerator::GenerateBuildCommand( int cmGlobalGenerator::Build( const char *, const char *bindir, - const char *projectName, const std::string& target, + const std::string& projectName, const std::string& target, std::string *output, const char *makeCommandCSTR, const char *config, diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4779682bc..ce285d686 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -106,7 +106,7 @@ public: * loaded commands, not as part of the usual build process. */ virtual int TryCompile(const char *srcdir, const char *bindir, - const char *projectName, + const std::string& projectName, const std::string& targetName, bool fast, std::string *output, cmMakefile* mf); @@ -118,7 +118,7 @@ public: * done first. */ int Build(const char *srcdir, const char *bindir, - const char *projectName, const std::string& targetName, + const std::string& projectName, const std::string& targetName, std::string *output, const char *makeProgram, const char *config, bool clean, bool fast, @@ -130,7 +130,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char *projectName, const char *projectDir, + const std::string& projectName, const char *projectDir, const std::string& targetName, const char* config, bool fast, std::vector const& makeOptions = std::vector() ); @@ -223,7 +223,7 @@ public: /** If check to see if the target is linked to by any other target in the project */ - bool IsDependedOn(const char* project, cmTarget const* target); + bool IsDependedOn(const std::string& project, cmTarget const* target); ///! Find a local generator by its startdirectory cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index b0279956b..954fb1708 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -552,7 +552,7 @@ bool cmGlobalNinjaGenerator::UsingMinGW = false; void cmGlobalNinjaGenerator ::GenerateBuildCommand(std::vector& makeCommand, const char* makeProgram, - const char* /*projectName*/, + const std::string& /*projectName*/, const char* /*projectDir*/, const std::string& targetName, const char* /*config*/, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 41d151026..e422e36a1 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -194,7 +194,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 74b8e987a..735887e08 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -566,7 +566,7 @@ cmGlobalUnixMakefileGenerator3 void cmGlobalUnixMakefileGenerator3 ::GenerateBuildCommand(std::vector& makeCommand, const char* makeProgram, - const char* /*projectName*/, + const std::string& /*projectName*/, const char* /*projectDir*/, const std::string& targetName, const char* /*config*/, diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index f97ae9b82..ffdf6fb34 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -110,7 +110,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 1346e13ff..a2991e100 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -311,7 +311,7 @@ std::string cmGlobalVisualStudio10Generator::FindDevEnvCommand() void cmGlobalVisualStudio10Generator::GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 198e113ca..97ac9bc01 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -35,7 +35,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 534a493e5..214b9eaa3 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -117,7 +117,7 @@ void cmGlobalVisualStudio6Generator::GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* /*projectDir*/, const std::string& targetName, const char* config, @@ -271,7 +271,7 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile() // Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, - const char* dspname, + const std::string& dspname, const char* dir, cmTarget const& target) { @@ -316,7 +316,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, // Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, - const char* name, + const std::string& name, const char* location, const std::set& dependencies) { diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index 40b8462d5..f1c70e468 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -55,7 +55,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, @@ -99,9 +99,10 @@ private: void WriteDSWFile(std::ostream& fout); void WriteDSWHeader(std::ostream& fout); void WriteProject(std::ostream& fout, - const char* name, const char* path, cmTarget const& t); + const std::string& name, const char* path, + cmTarget const& t); void WriteExternalProject(std::ostream& fout, - const char* name, const char* path, + const std::string& name, const char* path, const std::set& dependencies); void WriteDSWFooter(std::ostream& fout); virtual std::string WriteUtilityDepend(cmTarget const* target); diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 22e4f0894..af1a5c57b 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -155,7 +155,7 @@ cmGlobalVisualStudio71Generator // the libraries it uses are also done here void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, - const char* dspname, + const std::string& dspname, const char* dir, cmTarget const& t) { @@ -208,7 +208,7 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, void cmGlobalVisualStudio71Generator ::WriteProjectDepends(std::ostream& fout, - const char*, + const std::string&, const char*, cmTarget const& target) { VSDependSet const& depends = this->VSTargetDepends[&target]; @@ -234,7 +234,7 @@ cmGlobalVisualStudio71Generator // executables to the libraries it uses are also done here void cmGlobalVisualStudio71Generator ::WriteExternalProject(std::ostream& fout, - const char* name, + const std::string& name, const char* location, const char* typeGuid, const std::set& depends) @@ -277,7 +277,7 @@ void cmGlobalVisualStudio71Generator // executables to the libraries it uses are also done here void cmGlobalVisualStudio71Generator ::WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType, + std::ostream& fout, const std::string& name, cmTarget::TargetType, const std::set& configsPartOfDefaultBuild, const char* platformMapping) { diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 04e3a5547..879146812 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -59,17 +59,17 @@ protected: std::vector& generators); virtual void WriteSolutionConfigurations(std::ostream& fout); virtual void WriteProject(std::ostream& fout, - const char* name, const char* path, + const std::string& name, const char* path, cmTarget const& t); virtual void WriteProjectDepends(std::ostream& fout, - const char* name, const char* path, + const std::string& name, const char* path, cmTarget const& t); virtual void WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType type, + std::ostream& fout, const std::string& name, cmTarget::TargetType type, const std::set& configsPartOfDefaultBuild, const char* platformMapping = NULL); virtual void WriteExternalProject(std::ostream& fout, - const char* name, + const std::string& name, const char* path, const char* typeGuid, const std::set& depends); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 5c7af0005..cf84fe396 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -184,7 +184,7 @@ const char* cmGlobalVisualStudio7Generator::ExternalProjectType( void cmGlobalVisualStudio7Generator::GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* /*projectDir*/, const std::string& targetName, const char* config, @@ -654,7 +654,7 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path) // Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, - const char* dspname, + const std::string& dspname, const char* dir, cmTarget const& target) { // check to see if this is a fortran build @@ -694,7 +694,7 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, void cmGlobalVisualStudio7Generator ::WriteProjectDepends(std::ostream& fout, - const char* dspname, + const std::string& dspname, const char*, cmTarget const& target) { int depcount = 0; @@ -730,7 +730,7 @@ cmGlobalVisualStudio7Generator // executables to the libraries it uses are also done here void cmGlobalVisualStudio7Generator ::WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType, + std::ostream& fout, const std::string& name, cmTarget::TargetType, const std::set& configsPartOfDefaultBuild, const char* platformMapping) { @@ -758,7 +758,7 @@ void cmGlobalVisualStudio7Generator // Note, that dependencies from executables to // the libraries it uses are also done here void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, - const char* name, + const std::string& name, const char* location, const char* typeGuid, const std::set&) @@ -908,7 +908,7 @@ cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target) return pname; } -std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name) +std::string cmGlobalVisualStudio7Generator::GetGUID(const std::string& name) { std::string guidStoreName = name; guidStoreName += "_GUID_CMAKE"; @@ -919,7 +919,7 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name) return std::string(storedGUID); } cmSystemTools::Error("Unknown Target referenced : ", - name); + name.c_str()); return ""; } @@ -975,8 +975,9 @@ cmGlobalVisualStudio7Generator } std::set -cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project, - cmTarget const* target) +cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( + const std::string& project, + cmTarget const* target) { std::set activeConfigs; // if it is a utilitiy target then only make it part of the diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index a7aca6042..6fb373102 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -63,7 +63,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, @@ -90,7 +90,7 @@ public: ///! Create a GUID or get an existing one. void CreateGUID(const char* name); - std::string GetGUID(const char* name); + std::string GetGUID(const std::string& name); /** Append the subdirectory for the given configuration. */ virtual void AppendDirectoryForConfig(const char* prefix, @@ -123,13 +123,13 @@ protected: virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators); virtual void WriteProject(std::ostream& fout, - const char* name, const char* path, + const std::string& name, const char* path, cmTarget const& t); virtual void WriteProjectDepends(std::ostream& fout, - const char* name, const char* path, + const std::string& name, const char* path, cmTarget const&t); virtual void WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType type, + std::ostream& fout, const std::string& name, cmTarget::TargetType type, const std::set& configsPartOfDefaultBuild, const char* platformMapping = NULL); virtual void WriteSLNGlobalSections(std::ostream& fout, @@ -153,7 +153,7 @@ protected: void GenerateConfigurations(cmMakefile* mf); virtual void WriteExternalProject(std::ostream& fout, - const char* name, + const std::string& name, const char* path, const char* typeGuid, const std::set& @@ -161,7 +161,7 @@ protected: std::string ConvertToSolutionPath(const char* path); - std::set IsPartOfDefaultBuild(const char* project, + std::set IsPartOfDefaultBuild(const std::string& project, cmTarget const* target); std::vector Configurations; std::map GUIDMap; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 0453333ef..1ba74eb82 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -372,7 +372,7 @@ cmGlobalVisualStudio8Generator void cmGlobalVisualStudio8Generator ::WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType type, + std::ostream& fout, const std::string& name, cmTarget::TargetType type, const std::set& configsPartOfDefaultBuild, const char* platformMapping) { @@ -415,7 +415,7 @@ bool cmGlobalVisualStudio8Generator::ComputeTargetDepends() //---------------------------------------------------------------------------- void cmGlobalVisualStudio8Generator::WriteProjectDepends( - std::ostream& fout, const char*, const char*, cmTarget const& t) + std::ostream& fout, const std::string&, const char*, cmTarget const& t) { TargetDependSet const& unordered = this->GetTargetDirectDepends(t); OrderedTargetDependSet depends(unordered); diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 5b952c4f3..bafb9eb90 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -79,11 +79,12 @@ protected: virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSolutionConfigurations(std::ostream& fout); virtual void WriteProjectConfigurations( - std::ostream& fout, const char* name, cmTarget::TargetType type, + std::ostream& fout, const std::string& name, cmTarget::TargetType type, const std::set& configsPartOfDefaultBuild, const char* platformMapping = NULL); virtual bool ComputeTargetDepends(); - virtual void WriteProjectDepends(std::ostream& fout, const char* name, + virtual void WriteProjectDepends(std::ostream& fout, + const std::string& name, const char* path, cmTarget const& t); std::string Name; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9e1e90221..a1255a065 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -261,7 +261,7 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* /*projectDir*/, const std::string& targetName, const char* config, diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 0cb17585a..8e2de9a75 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -56,7 +56,7 @@ public: virtual void GenerateBuildCommand( std::vector& makeCommand, const char* makeProgram, - const char* projectName, + const std::string& projectName, const char* projectDir, const std::string& targetName, const char* config, diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 786791cb7..280320ffb 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -228,7 +228,7 @@ void cmLocalVisualStudio7Generator::WriteStampFiles() //---------------------------------------------------------------------------- void cmLocalVisualStudio7Generator -::CreateSingleVCProj(const char *lname, cmTarget &target) +::CreateSingleVCProj(const std::string& lname, cmTarget &target) { this->FortranProject = static_cast(this->GlobalGenerator) @@ -245,8 +245,7 @@ void cmLocalVisualStudio7Generator } // add to the list of projects - std::string pname = lname; - target.SetProperty("GENERATOR_FILE_NAME",lname); + target.SetProperty("GENERATOR_FILE_NAME",lname.c_str()); // create the dsp.cmake file std::string fname; fname = this->Makefile->GetStartOutputDirectory(); diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 4d727472d..760716e3a 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -66,7 +66,7 @@ public: const char* path); virtual void AddCMakeListsRules(); protected: - void CreateSingleVCProj(const char *lname, cmTarget &tgt); + void CreateSingleVCProj(const std::string& lname, cmTarget &tgt); private: typedef cmVisualStudioGeneratorOptions Options; typedef cmLocalVisualStudio7GeneratorFCInfo FCInfo; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e059dd37d..8584ad854 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3061,7 +3061,7 @@ void cmMakefile::ExpandSourceListArguments( } int cmMakefile::TryCompile(const char *srcdir, const char *bindir, - const char *projectName, + const std::string& projectName, const std::string& targetName, bool fast, const std::vector *cmakeArgs, diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4b9c54806..6475c0f30 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -127,7 +127,7 @@ public: * loaded commands, not as part of the usual build process. */ int TryCompile(const char *srcdir, const char *bindir, - const char *projectName, const std::string& targetName, + const std::string& projectName, const std::string& targetName, bool fast, const std::vector *cmakeArgs, std::string *output);