Common: Use a string instead of enum for WorkingDirectory
This commit is contained in:
parent
76833149ec
commit
dc51091944
|
@ -204,8 +204,9 @@ std::string cmCommonTargetGenerator::GetManifests()
|
||||||
std::vector<std::string> manifests;
|
std::vector<std::string> manifests;
|
||||||
for (std::vector<cmSourceFile const*>::iterator mi = manifest_srcs.begin();
|
for (std::vector<cmSourceFile const*>::iterator mi = manifest_srcs.begin();
|
||||||
mi != manifest_srcs.end(); ++mi) {
|
mi != manifest_srcs.end(); ++mi) {
|
||||||
manifests.push_back(this->Convert(
|
manifests.push_back(this->LocalGenerator->ConvertToOutputFormat(
|
||||||
(*mi)->GetFullPath(), this->LocalGenerator->GetWorkingDirectory(),
|
this->LocalGenerator->ConvertToRelativePath(
|
||||||
|
this->LocalGenerator->GetWorkingDirectory(), (*mi)->GetFullPath()),
|
||||||
cmOutputConverter::SHELL));
|
cmOutputConverter::SHELL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,9 @@
|
||||||
|
|
||||||
class cmGlobalGenerator;
|
class cmGlobalGenerator;
|
||||||
|
|
||||||
cmLocalCommonGenerator::cmLocalCommonGenerator(
|
cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
|
||||||
cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd)
|
cmMakefile* mf,
|
||||||
|
std::string const& wd)
|
||||||
: cmLocalGenerator(gg, mf)
|
: cmLocalGenerator(gg, mf)
|
||||||
, WorkingDirectory(wd)
|
, WorkingDirectory(wd)
|
||||||
{
|
{
|
||||||
|
@ -55,8 +56,9 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags(
|
||||||
// Add a module output directory flag if necessary.
|
// Add a module output directory flag if necessary.
|
||||||
std::string mod_dir = target->GetFortranModuleDirectory();
|
std::string mod_dir = target->GetFortranModuleDirectory();
|
||||||
if (!mod_dir.empty()) {
|
if (!mod_dir.empty()) {
|
||||||
mod_dir =
|
mod_dir = this->ConvertToOutputFormat(
|
||||||
this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
|
this->ConvertToRelativePath(this->WorkingDirectory, mod_dir),
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
} else {
|
} else {
|
||||||
mod_dir =
|
mod_dir =
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
|
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
|
||||||
|
|
|
@ -30,21 +30,18 @@ class cmLocalCommonGenerator : public cmLocalGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf,
|
cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf,
|
||||||
cmOutputConverter::RelativeRoot wd);
|
std::string const& wd);
|
||||||
~cmLocalCommonGenerator() CM_OVERRIDE;
|
~cmLocalCommonGenerator() CM_OVERRIDE;
|
||||||
|
|
||||||
std::string const& GetConfigName() { return this->ConfigName; }
|
std::string const& GetConfigName() { return this->ConfigName; }
|
||||||
|
|
||||||
cmOutputConverter::RelativeRoot GetWorkingDirectory() const
|
std::string GetWorkingDirectory() const { return this->WorkingDirectory; }
|
||||||
{
|
|
||||||
return this->WorkingDirectory;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetTargetFortranFlags(cmGeneratorTarget const* target,
|
std::string GetTargetFortranFlags(cmGeneratorTarget const* target,
|
||||||
std::string const& config) CM_OVERRIDE;
|
std::string const& config) CM_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
cmOutputConverter::RelativeRoot WorkingDirectory;
|
std::string WorkingDirectory;
|
||||||
|
|
||||||
void SetConfigName();
|
void SetConfigName();
|
||||||
std::string ConfigName;
|
std::string ConfigName;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
|
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
|
||||||
cmMakefile* mf)
|
cmMakefile* mf)
|
||||||
: cmLocalCommonGenerator(gg, mf, cmOutputConverter::HOME_OUTPUT)
|
: cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory())
|
||||||
, HomeRelativeOutputPath("")
|
, HomeRelativeOutputPath("")
|
||||||
{
|
{
|
||||||
this->TargetImplib = "$TARGET_IMPLIB";
|
this->TargetImplib = "$TARGET_IMPLIB";
|
||||||
|
|
|
@ -94,7 +94,7 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
|
||||||
|
|
||||||
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3(
|
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3(
|
||||||
cmGlobalGenerator* gg, cmMakefile* mf)
|
cmGlobalGenerator* gg, cmMakefile* mf)
|
||||||
: cmLocalCommonGenerator(gg, mf, cmOutputConverter::START_OUTPUT)
|
: cmLocalCommonGenerator(gg, mf, mf->GetCurrentBinaryDirectory())
|
||||||
{
|
{
|
||||||
this->MakefileVariableSize = 0;
|
this->MakefileVariableSize = 0;
|
||||||
this->ColorMakefile = false;
|
this->ColorMakefile = false;
|
||||||
|
|
Loading…
Reference in New Issue