stringapi: Use strings for VS project names
This commit is contained in:
parent
d76a6e08d0
commit
c3833c7da4
|
@ -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<std::string>& makeCommand, const char*, const char*, const char*,
|
||||
const std::string&, const char*, bool, std::vector<std::string> const&)
|
||||
std::vector<std::string>& makeCommand, const char*, const std::string&,
|
||||
const char*, const std::string&, const char*, bool,
|
||||
std::vector<std::string> 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,
|
||||
|
|
|
@ -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<std::string>& 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<std::string> const& makeOptions = std::vector<std::string>()
|
||||
);
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ bool cmGlobalNinjaGenerator::UsingMinGW = false;
|
|||
void cmGlobalNinjaGenerator
|
||||
::GenerateBuildCommand(std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* /*projectName*/,
|
||||
const std::string& /*projectName*/,
|
||||
const char* /*projectDir*/,
|
||||
const std::string& targetName,
|
||||
const char* /*config*/,
|
||||
|
|
|
@ -194,7 +194,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* projectDir,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -566,7 +566,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
void cmGlobalUnixMakefileGenerator3
|
||||
::GenerateBuildCommand(std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* /*projectName*/,
|
||||
const std::string& /*projectName*/,
|
||||
const char* /*projectDir*/,
|
||||
const std::string& targetName,
|
||||
const char* /*config*/,
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* projectDir,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -311,7 +311,7 @@ std::string cmGlobalVisualStudio10Generator::FindDevEnvCommand()
|
|||
void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* projectDir,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* projectDir,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -117,7 +117,7 @@ void
|
|||
cmGlobalVisualStudio6Generator::GenerateBuildCommand(
|
||||
std::vector<std::string>& 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<cmStdString>& dependencies)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& 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<cmStdString>& dependencies);
|
||||
void WriteDSWFooter(std::ostream& fout);
|
||||
virtual std::string WriteUtilityDepend(cmTarget const* target);
|
||||
|
|
|
@ -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<cmStdString>& 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<std::string>& configsPartOfDefaultBuild,
|
||||
const char* platformMapping)
|
||||
{
|
||||
|
|
|
@ -59,17 +59,17 @@ protected:
|
|||
std::vector<cmLocalGenerator*>& 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<std::string>& 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<cmStdString>& depends);
|
||||
|
|
|
@ -184,7 +184,7 @@ const char* cmGlobalVisualStudio7Generator::ExternalProjectType(
|
|||
void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
|
||||
std::vector<std::string>& 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<std::string>& 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<cmStdString>&)
|
||||
|
@ -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<std::string>
|
||||
cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
|
||||
cmTarget const* target)
|
||||
cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
|
||||
const std::string& project,
|
||||
cmTarget const* target)
|
||||
{
|
||||
std::set<std::string> activeConfigs;
|
||||
// if it is a utilitiy target then only make it part of the
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& 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<cmLocalGenerator*>& 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<std::string>& 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<cmStdString>&
|
||||
|
@ -161,7 +161,7 @@ protected:
|
|||
|
||||
std::string ConvertToSolutionPath(const char* path);
|
||||
|
||||
std::set<std::string> IsPartOfDefaultBuild(const char* project,
|
||||
std::set<std::string> IsPartOfDefaultBuild(const std::string& project,
|
||||
cmTarget const* target);
|
||||
std::vector<std::string> Configurations;
|
||||
std::map<cmStdString, cmStdString> GUIDMap;
|
||||
|
|
|
@ -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<std::string>& 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);
|
||||
|
|
|
@ -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<std::string>& 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;
|
||||
|
|
|
@ -261,7 +261,7 @@ void
|
|||
cmGlobalXCodeGenerator::GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* /*projectDir*/,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual void GenerateBuildCommand(
|
||||
std::vector<std::string>& makeCommand,
|
||||
const char* makeProgram,
|
||||
const char* projectName,
|
||||
const std::string& projectName,
|
||||
const char* projectDir,
|
||||
const std::string& targetName,
|
||||
const char* config,
|
||||
|
|
|
@ -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<cmGlobalVisualStudioGenerator*>(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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<std::string> *cmakeArgs,
|
||||
|
|
|
@ -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<std::string> *cmakeArgs,
|
||||
std::string *output);
|
||||
|
|
Loading…
Reference in New Issue