Merge topic 'output-converter-enums'
25d1ef64
Use enums defined in cmOutputConverter using their fully qualified name.
This commit is contained in:
commit
2bc55b69db
|
@ -43,8 +43,8 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmCommonTargetGenerator::Convert(
|
std::string cmCommonTargetGenerator::Convert(
|
||||||
std::string const& source, cmLocalGenerator::RelativeRoot relative,
|
std::string const& source, cmOutputConverter::RelativeRoot relative,
|
||||||
cmLocalGenerator::OutputFormat output)
|
cmOutputConverter::OutputFormat output)
|
||||||
{
|
{
|
||||||
return this->LocalGenerator->Convert(source, relative, output);
|
return this->LocalGenerator->Convert(source, relative, output);
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
|
||||||
std::string mod_dir = this->GetFortranModuleDirectory();
|
std::string mod_dir = this->GetFortranModuleDirectory();
|
||||||
if (!mod_dir.empty()) {
|
if (!mod_dir.empty()) {
|
||||||
mod_dir =
|
mod_dir =
|
||||||
this->Convert(mod_dir, this->WorkingDirectory, cmLocalGenerator::SHELL);
|
this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
|
||||||
} else {
|
} else {
|
||||||
mod_dir =
|
mod_dir =
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
|
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
|
||||||
|
@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
|
||||||
idi != includes.end(); ++idi) {
|
idi != includes.end(); ++idi) {
|
||||||
std::string flg = modpath_flag;
|
std::string flg = modpath_flag;
|
||||||
flg +=
|
flg +=
|
||||||
this->Convert(*idi, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
this->LocalGenerator->AppendFlags(flags, flg);
|
this->LocalGenerator->AppendFlags(flags, flg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
|
||||||
std::string& flags, cmSourceFile const& source)
|
std::string& flags, cmSourceFile const& source)
|
||||||
{
|
{
|
||||||
const char* srcfmt = source.GetProperty("Fortran_FORMAT");
|
const char* srcfmt = source.GetProperty("Fortran_FORMAT");
|
||||||
cmLocalGenerator::FortranFormat format =
|
cmOutputConverter::FortranFormat format =
|
||||||
this->LocalGenerator->GetFortranFormat(srcfmt);
|
this->LocalGenerator->GetFortranFormat(srcfmt);
|
||||||
if (format == cmLocalGenerator::FortranFormatNone) {
|
if (format == cmOutputConverter::FortranFormatNone) {
|
||||||
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
|
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
|
||||||
format = this->LocalGenerator->GetFortranFormat(tgtfmt);
|
format = this->LocalGenerator->GetFortranFormat(tgtfmt);
|
||||||
}
|
}
|
||||||
const char* var = 0;
|
const char* var = 0;
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case cmLocalGenerator::FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
|
var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
|
||||||
break;
|
break;
|
||||||
case cmLocalGenerator::FortranFormatFree:
|
case cmOutputConverter::FortranFormatFree:
|
||||||
var = "CMAKE_Fortran_FORMAT_FREE_FLAG";
|
var = "CMAKE_Fortran_FORMAT_FREE_FLAG";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -244,7 +244,7 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
|
||||||
if (emitted.insert(*i).second) {
|
if (emitted.insert(*i).second) {
|
||||||
flags += fwSearchFlag;
|
flags += fwSearchFlag;
|
||||||
flags += this->LocalGenerator->ConvertToOutputFormat(
|
flags += this->LocalGenerator->ConvertToOutputFormat(
|
||||||
*i, cmLocalGenerator::SHELL);
|
*i, cmOutputConverter::SHELL);
|
||||||
flags += " ";
|
flags += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ protected:
|
||||||
void AddFortranFlags(std::string& flags);
|
void AddFortranFlags(std::string& flags);
|
||||||
|
|
||||||
std::string Convert(
|
std::string Convert(
|
||||||
std::string const& source, cmLocalGenerator::RelativeRoot relative,
|
std::string const& source, cmOutputConverter::RelativeRoot relative,
|
||||||
cmLocalGenerator::OutputFormat output = cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::OutputFormat output = cmOutputConverter::UNCHANGED);
|
||||||
|
|
||||||
void AppendFortranFormatFlags(std::string& flags,
|
void AppendFortranFormatFlags(std::string& flags,
|
||||||
cmSourceFile const& source);
|
cmSourceFile const& source);
|
||||||
|
|
|
@ -238,17 +238,17 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
|
||||||
// convert the dependencies to paths relative to the home output
|
// convert the dependencies to paths relative to the home output
|
||||||
// directory. We must do the same here.
|
// directory. We must do the same here.
|
||||||
std::string obj_i =
|
std::string obj_i =
|
||||||
this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT);
|
this->LocalGenerator->Convert(obj, cmOutputConverter::HOME_OUTPUT);
|
||||||
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
|
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
obj_i, cmLocalGenerator::MAKERULE);
|
obj_i, cmOutputConverter::MAKERULE);
|
||||||
internalDepends << obj_i << std::endl;
|
internalDepends << obj_i << std::endl;
|
||||||
|
|
||||||
for (std::set<std::string>::const_iterator i = dependencies.begin();
|
for (std::set<std::string>::const_iterator i = dependencies.begin();
|
||||||
i != dependencies.end(); ++i) {
|
i != dependencies.end(); ++i) {
|
||||||
makeDepends << obj_m << ": "
|
makeDepends << obj_m << ": "
|
||||||
<< this->LocalGenerator->Convert(*i,
|
<< this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
*i, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << *i << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,16 +192,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
|
||||||
stamp += ".mod.stamp";
|
stamp += ".mod.stamp";
|
||||||
fcStream << "\n";
|
fcStream << "\n";
|
||||||
fcStream << " \""
|
fcStream << " \""
|
||||||
<< this->LocalGenerator->Convert(mod_lower,
|
<< this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::START_OUTPUT)
|
mod_lower, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
fcStream << " \""
|
fcStream << " \""
|
||||||
<< this->LocalGenerator->Convert(mod_upper,
|
<< this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::START_OUTPUT)
|
mod_upper, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
fcStream << " \""
|
fcStream << " \""
|
||||||
<< this->LocalGenerator->Convert(stamp,
|
<< this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::START_OUTPUT)
|
stamp, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
fcStream << " )\n";
|
fcStream << " )\n";
|
||||||
|
@ -317,17 +317,17 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
|
|
||||||
// Write the include dependencies to the output stream.
|
// Write the include dependencies to the output stream.
|
||||||
std::string obj_i =
|
std::string obj_i =
|
||||||
this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT);
|
this->LocalGenerator->Convert(obj, cmOutputConverter::HOME_OUTPUT);
|
||||||
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
|
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
obj_i, cmLocalGenerator::MAKERULE);
|
obj_i, cmOutputConverter::MAKERULE);
|
||||||
internalDepends << obj_i << std::endl;
|
internalDepends << obj_i << std::endl;
|
||||||
internalDepends << " " << src << std::endl;
|
internalDepends << " " << src << std::endl;
|
||||||
for (std::set<std::string>::const_iterator i = info.Includes.begin();
|
for (std::set<std::string>::const_iterator i = info.Includes.begin();
|
||||||
i != info.Includes.end(); ++i) {
|
i != info.Includes.end(); ++i) {
|
||||||
makeDepends << obj_m << ": "
|
makeDepends << obj_m << ": "
|
||||||
<< this->LocalGenerator->Convert(*i,
|
<< this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
*i, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << *i << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(
|
proxy = this->LocalGenerator->Convert(
|
||||||
proxy, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
|
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
||||||
|
|
||||||
// since we require some things add them to our list of requirements
|
// since we require some things add them to our list of requirements
|
||||||
makeDepends << obj_m << ".requires: " << proxy << std::endl;
|
makeDepends << obj_m << ".requires: " << proxy << std::endl;
|
||||||
|
@ -370,8 +370,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
if (!required->second.empty()) {
|
if (!required->second.empty()) {
|
||||||
// This module is known. Depend on its timestamp file.
|
// This module is known. Depend on its timestamp file.
|
||||||
std::string stampFile = this->LocalGenerator->Convert(
|
std::string stampFile = this->LocalGenerator->Convert(
|
||||||
required->second, cmLocalGenerator::HOME_OUTPUT,
|
required->second, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE);
|
cmOutputConverter::MAKERULE);
|
||||||
makeDepends << obj_m << ": " << stampFile << "\n";
|
makeDepends << obj_m << ": " << stampFile << "\n";
|
||||||
} else {
|
} else {
|
||||||
// This module is not known to CMake. Try to locate it where
|
// This module is not known to CMake. Try to locate it where
|
||||||
|
@ -379,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
std::string module;
|
std::string module;
|
||||||
if (this->FindModule(*i, module)) {
|
if (this->FindModule(*i, module)) {
|
||||||
module = this->LocalGenerator->Convert(
|
module = this->LocalGenerator->Convert(
|
||||||
module, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
|
module, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
||||||
makeDepends << obj_m << ": " << module << "\n";
|
makeDepends << obj_m << ": " << module << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,8 +392,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
proxy += "/";
|
proxy += "/";
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(proxy, cmLocalGenerator::HOME_OUTPUT,
|
proxy = this->LocalGenerator->Convert(
|
||||||
cmLocalGenerator::MAKERULE);
|
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
||||||
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
|
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,13 +415,13 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
modFile += "/";
|
modFile += "/";
|
||||||
modFile += *i;
|
modFile += *i;
|
||||||
modFile = this->LocalGenerator->Convert(
|
modFile = this->LocalGenerator->Convert(
|
||||||
modFile, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::SHELL);
|
modFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL);
|
||||||
std::string stampFile = stamp_dir;
|
std::string stampFile = stamp_dir;
|
||||||
stampFile += "/";
|
stampFile += "/";
|
||||||
stampFile += m;
|
stampFile += m;
|
||||||
stampFile += ".mod.stamp";
|
stampFile += ".mod.stamp";
|
||||||
stampFile = this->LocalGenerator->Convert(
|
stampFile = this->LocalGenerator->Convert(
|
||||||
stampFile, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::SHELL);
|
stampFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL);
|
||||||
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
|
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
|
||||||
<< " " << stampFile;
|
<< " " << stampFile;
|
||||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||||
|
@ -441,7 +441,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
|
||||||
std::string driver = this->TargetDirectory;
|
std::string driver = this->TargetDirectory;
|
||||||
driver += "/build";
|
driver += "/build";
|
||||||
driver = this->LocalGenerator->Convert(
|
driver = this->LocalGenerator->Convert(
|
||||||
driver, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
|
driver, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
|
||||||
makeDepends << driver << ": " << obj_m << ".provides.build\n";
|
makeDepends << driver << ": " << obj_m << ".provides.build\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -902,7 +902,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
const std::vector<cmGeneratorTarget*> targets =
|
const std::vector<cmGeneratorTarget*> targets =
|
||||||
(*it)->GetGeneratorTargets();
|
(*it)->GetGeneratorTargets();
|
||||||
std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(),
|
std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
if (subdir == ".") {
|
if (subdir == ".") {
|
||||||
subdir = "";
|
subdir = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2523,7 +2523,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
||||||
// Shorten the output name (in expected use case).
|
// Shorten the output name (in expected use case).
|
||||||
cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
|
cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
|
||||||
std::string fname =
|
std::string fname =
|
||||||
converter.Convert(outputs[0], cmLocalGenerator::HOME_OUTPUT);
|
converter.Convert(outputs[0], cmOutputConverter::HOME_OUTPUT);
|
||||||
|
|
||||||
// Associate the hash with this output.
|
// Associate the hash with this output.
|
||||||
this->RuleHashes[fname] = hash;
|
this->RuleHashes[fname] = hash;
|
||||||
|
|
|
@ -289,7 +289,7 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule()
|
||||||
|
|
||||||
std::ostringstream cmd;
|
std::ostringstream cmd;
|
||||||
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
|
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
|
||||||
cmLocalGenerator::SHELL)
|
cmOutputConverter::SHELL)
|
||||||
<< " -E copy $in $out";
|
<< " -E copy $in $out";
|
||||||
|
|
||||||
this->AddRule("COPY_OSX_CONTENT", cmd.str(), "Copying OS X Content $out",
|
this->AddRule("COPY_OSX_CONTENT", cmd.str(), "Copying OS X Content $out",
|
||||||
|
@ -1166,13 +1166,13 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
||||||
|
|
||||||
std::ostringstream cmd;
|
std::ostringstream cmd;
|
||||||
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
|
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
|
||||||
cmLocalGenerator::SHELL)
|
cmOutputConverter::SHELL)
|
||||||
<< " -H"
|
<< " -H"
|
||||||
<< lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
|
<< lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
|
||||||
cmLocalGenerator::SHELL)
|
cmOutputConverter::SHELL)
|
||||||
<< " -B"
|
<< " -B"
|
||||||
<< lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
|
<< lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
WriteRule(*this->RulesFileStream, "RERUN_CMAKE", cmd.str(),
|
WriteRule(*this->RulesFileStream, "RERUN_CMAKE", cmd.str(),
|
||||||
"Re-running CMake...", "Rule for re-running cmake.",
|
"Re-running CMake...", "Rule for re-running cmake.",
|
||||||
/*depfile=*/"",
|
/*depfile=*/"",
|
||||||
|
@ -1221,7 +1221,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const
|
||||||
cmLocalGenerator* lgen = this->LocalGenerators[0];
|
cmLocalGenerator* lgen = this->LocalGenerators[0];
|
||||||
if (lgen) {
|
if (lgen) {
|
||||||
return lgen->ConvertToOutputFormat(this->NinjaCommand,
|
return lgen->ConvertToOutputFormat(this->NinjaCommand,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
return "ninja";
|
return "ninja";
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,11 +311,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
<< "# The top level Makefile was generated from the following files:\n"
|
<< "# The top level Makefile was generated from the following files:\n"
|
||||||
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
|
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
|
||||||
<< " \"" << lg->Convert(cache, cmLocalGenerator::START_OUTPUT) << "\"\n";
|
<< " \"" << lg->Convert(cache, cmOutputConverter::START_OUTPUT) << "\"\n";
|
||||||
for (std::vector<std::string>::const_iterator i = lfiles.begin();
|
for (std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||||
i != lfiles.end(); ++i) {
|
i != lfiles.end(); ++i) {
|
||||||
cmakefileStream << " \""
|
cmakefileStream << " \""
|
||||||
<< lg->Convert(*i, cmLocalGenerator::START_OUTPUT)
|
<< lg->Convert(*i, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
@ -329,10 +329,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
cmakefileStream << "# The corresponding makefile is:\n"
|
cmakefileStream << "# The corresponding makefile is:\n"
|
||||||
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
|
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(makefileName, cmLocalGenerator::START_OUTPUT)
|
<< lg->Convert(makefileName, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n"
|
<< "\"\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(check, cmLocalGenerator::START_OUTPUT)
|
<< lg->Convert(check, cmOutputConverter::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
for (std::vector<std::string>::const_iterator k = outfiles.begin();
|
for (std::vector<std::string>::const_iterator k = outfiles.begin();
|
||||||
k != outfiles.end(); ++k) {
|
k != outfiles.end(); ++k) {
|
||||||
cmakefileStream << " \""
|
cmakefileStream << " \""
|
||||||
<< lg->Convert(*k, cmLocalGenerator::HOME_OUTPUT)
|
<< lg->Convert(*k, cmOutputConverter::HOME_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
tmpStr += cmake::GetCMakeFilesDirectory();
|
tmpStr += cmake::GetCMakeFilesDirectory();
|
||||||
tmpStr += "/CMakeDirectoryInformation.cmake";
|
tmpStr += "/CMakeDirectoryInformation.cmake";
|
||||||
cmakefileStream << " \""
|
cmakefileStream << " \""
|
||||||
<< lg->Convert(tmpStr, cmLocalGenerator::HOME_OUTPUT)
|
<< lg->Convert(tmpStr, cmOutputConverter::HOME_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
@ -470,8 +470,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2(
|
||||||
|
|
||||||
// Begin the directory-level rules section.
|
// Begin the directory-level rules section.
|
||||||
std::string dir = lg->GetCurrentBinaryDirectory();
|
std::string dir = lg->GetCurrentBinaryDirectory();
|
||||||
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT,
|
dir = lg->Convert(dir, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE);
|
cmOutputConverter::MAKERULE);
|
||||||
lg->WriteDivider(ruleFileStream);
|
lg->WriteDivider(ruleFileStream);
|
||||||
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
|
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
|
||||||
|
|
||||||
|
@ -716,8 +716,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
|
||||||
std::ostringstream progCmd;
|
std::ostringstream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
||||||
// # in target
|
// # in target
|
||||||
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL,
|
progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
//
|
//
|
||||||
std::set<cmGeneratorTarget const*> emitted;
|
std::set<cmGeneratorTarget const*> emitted;
|
||||||
progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted);
|
progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted);
|
||||||
|
@ -729,8 +729,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
|
||||||
{
|
{
|
||||||
std::ostringstream progCmd;
|
std::ostringstream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
||||||
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL,
|
progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
progCmd << " 0";
|
progCmd << " 0";
|
||||||
commands.push_back(progCmd.str());
|
commands.push_back(progCmd.str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
||||||
if (vcprojName) {
|
if (vcprojName) {
|
||||||
cmLocalGenerator* lg = target->GetLocalGenerator();
|
cmLocalGenerator* lg = target->GetLocalGenerator();
|
||||||
std::string dir = lg->GetCurrentBinaryDirectory();
|
std::string dir = lg->GetCurrentBinaryDirectory();
|
||||||
dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT);
|
dir = root->Convert(dir.c_str(), cmOutputConverter::START_OUTPUT);
|
||||||
if (dir == ".") {
|
if (dir == ".") {
|
||||||
dir = ""; // msbuild cannot handle ".\" prefix
|
dir = ""; // msbuild cannot handle ".\" prefix
|
||||||
}
|
}
|
||||||
|
|
|
@ -660,10 +660,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
|
||||||
std::string flags;
|
std::string flags;
|
||||||
const char* srcfmt = sf->GetProperty("Fortran_FORMAT");
|
const char* srcfmt = sf->GetProperty("Fortran_FORMAT");
|
||||||
switch (this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) {
|
switch (this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) {
|
||||||
case cmLocalGenerator::FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
flags = "-fixed " + flags;
|
flags = "-fixed " + flags;
|
||||||
break;
|
break;
|
||||||
case cmLocalGenerator::FortranFormatFree:
|
case cmOutputConverter::FortranFormatFree:
|
||||||
flags = "-free " + flags;
|
flags = "-free " + flags;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1982,10 +1982,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
||||||
const char* format = 0;
|
const char* format = 0;
|
||||||
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
|
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
|
||||||
switch (this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) {
|
switch (this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) {
|
||||||
case cmLocalGenerator::FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
format = "fixed";
|
format = "fixed";
|
||||||
break;
|
break;
|
||||||
case cmLocalGenerator::FortranFormatFree:
|
case cmOutputConverter::FortranFormatFree:
|
||||||
format = "free";
|
format = "free";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -2140,7 +2140,7 @@ std::string cmLocalGenerator::ConstructComment(
|
||||||
for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin();
|
for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin();
|
||||||
o != ccg.GetOutputs().end(); ++o) {
|
o != ccg.GetOutputs().end(); ++o) {
|
||||||
comment += sep;
|
comment += sep;
|
||||||
comment += this->Convert(*o, cmLocalGenerator::START_OUTPUT);
|
comment += this->Convert(*o, cmOutputConverter::START_OUTPUT);
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
}
|
}
|
||||||
return comment;
|
return comment;
|
||||||
|
|
|
@ -174,9 +174,10 @@ public:
|
||||||
bool GetRealDependency(const std::string& name, const std::string& config,
|
bool GetRealDependency(const std::string& name, const std::string& config,
|
||||||
std::string& dep);
|
std::string& dep);
|
||||||
|
|
||||||
virtual std::string ConvertToIncludeReference(std::string const& path,
|
virtual std::string ConvertToIncludeReference(
|
||||||
OutputFormat format = SHELL,
|
std::string const& path,
|
||||||
bool forceFullPaths = false);
|
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
|
||||||
|
bool forceFullPaths = false);
|
||||||
|
|
||||||
/** Called from command-line hook to clear dependencies. */
|
/** Called from command-line hook to clear dependencies. */
|
||||||
virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {}
|
virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {}
|
||||||
|
@ -353,8 +354,9 @@ protected:
|
||||||
std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
|
std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
|
||||||
std::string const& dir_max);
|
std::string const& dir_max);
|
||||||
|
|
||||||
virtual std::string ConvertToLinkReference(std::string const& lib,
|
virtual std::string ConvertToLinkReference(
|
||||||
OutputFormat format = SHELL);
|
std::string const& lib,
|
||||||
|
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL);
|
||||||
|
|
||||||
/** Check whether the native build system supports the given
|
/** Check whether the native build system supports the given
|
||||||
definition. Issues a warning. */
|
definition. Issues a warning. */
|
||||||
|
|
|
@ -41,8 +41,8 @@ void cmLocalNinjaGenerator::Generate()
|
||||||
{
|
{
|
||||||
// Compute the path to use when referencing the current output
|
// Compute the path to use when referencing the current output
|
||||||
// directory from the top output directory.
|
// directory from the top output directory.
|
||||||
this->HomeRelativeOutputPath =
|
this->HomeRelativeOutputPath = this->Convert(
|
||||||
this->Convert(this->GetCurrentBinaryDirectory(), HOME_OUTPUT);
|
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
|
||||||
if (this->HomeRelativeOutputPath == ".") {
|
if (this->HomeRelativeOutputPath == ".") {
|
||||||
this->HomeRelativeOutputPath = "";
|
this->HomeRelativeOutputPath = "";
|
||||||
}
|
}
|
||||||
|
@ -121,16 +121,19 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator()
|
||||||
// Virtual protected methods.
|
// Virtual protected methods.
|
||||||
|
|
||||||
std::string cmLocalNinjaGenerator::ConvertToLinkReference(
|
std::string cmLocalNinjaGenerator::ConvertToLinkReference(
|
||||||
std::string const& lib, OutputFormat format)
|
std::string const& lib, cmOutputConverter::OutputFormat format)
|
||||||
{
|
{
|
||||||
std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib);
|
std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib);
|
||||||
return this->ConvertToOutputFormat(path, format);
|
return this->ConvertToOutputFormat(path, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
|
std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
|
||||||
std::string const& path, OutputFormat format, bool forceFullPaths)
|
std::string const& path, cmOutputConverter::OutputFormat format,
|
||||||
|
bool forceFullPaths)
|
||||||
{
|
{
|
||||||
return this->Convert(path, forceFullPaths ? FULL : HOME_OUTPUT, format);
|
return this->Convert(path, forceFullPaths ? cmOutputConverter::FULL
|
||||||
|
: cmOutputConverter::HOME_OUTPUT,
|
||||||
|
format);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private methods.
|
// Private methods.
|
||||||
|
@ -338,7 +341,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(
|
||||||
#else
|
#else
|
||||||
std::string cdStr = "cd ";
|
std::string cdStr = "cd ";
|
||||||
#endif
|
#endif
|
||||||
cdCmd << cdStr << this->ConvertToOutputFormat(wd, SHELL);
|
cdCmd << cdStr
|
||||||
|
<< this->ConvertToOutputFormat(wd, cmOutputConverter::SHELL);
|
||||||
cmdLines.push_back(cdCmd.str());
|
cmdLines.push_back(cdCmd.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +350,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(
|
||||||
|
|
||||||
for (unsigned i = 0; i != ccg.GetNumberOfCommands(); ++i) {
|
for (unsigned i = 0; i != ccg.GetNumberOfCommands(); ++i) {
|
||||||
cmdLines.push_back(launcher +
|
cmdLines.push_back(launcher +
|
||||||
this->ConvertToOutputFormat(ccg.GetCommand(i), SHELL));
|
this->ConvertToOutputFormat(ccg.GetCommand(i),
|
||||||
|
cmOutputConverter::SHELL));
|
||||||
|
|
||||||
std::string& cmd = cmdLines.back();
|
std::string& cmd = cmdLines.back();
|
||||||
ccg.AppendArguments(i, cmd);
|
ccg.AppendArguments(i, cmd);
|
||||||
|
@ -473,10 +478,12 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
|
||||||
std::string output;
|
std::string output;
|
||||||
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
||||||
if (!outputs.empty()) {
|
if (!outputs.empty()) {
|
||||||
RelativeRoot relative_root =
|
cmOutputConverter::RelativeRoot relative_root =
|
||||||
ccg.GetWorkingDirectory().empty() ? START_OUTPUT : NONE;
|
ccg.GetWorkingDirectory().empty() ? cmOutputConverter::START_OUTPUT
|
||||||
|
: cmOutputConverter::NONE;
|
||||||
|
|
||||||
output = this->Convert(outputs[0], relative_root, SHELL);
|
output =
|
||||||
|
this->Convert(outputs[0], relative_root, cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
vars.Output = output.c_str();
|
vars.Output = output.c_str();
|
||||||
|
|
||||||
|
|
|
@ -72,17 +72,19 @@ public:
|
||||||
void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg,
|
void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg,
|
||||||
cmNinjaDeps& ninjaDeps);
|
cmNinjaDeps& ninjaDeps);
|
||||||
|
|
||||||
virtual std::string ConvertToLinkReference(std::string const& lib,
|
virtual std::string ConvertToLinkReference(
|
||||||
OutputFormat format = SHELL);
|
std::string const& lib,
|
||||||
|
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL);
|
||||||
|
|
||||||
virtual void ComputeObjectFilenames(
|
virtual void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, std::string>& mapping,
|
std::map<cmSourceFile const*, std::string>& mapping,
|
||||||
cmGeneratorTarget const* gt = 0);
|
cmGeneratorTarget const* gt = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual std::string ConvertToIncludeReference(std::string const& path,
|
virtual std::string ConvertToIncludeReference(
|
||||||
OutputFormat format = SHELL,
|
std::string const& path,
|
||||||
bool forceFullPaths = false);
|
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
|
||||||
|
bool forceFullPaths = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmGeneratedFileStream& GetBuildFileStream() const;
|
cmGeneratedFileStream& GetBuildFileStream() const;
|
||||||
|
|
|
@ -140,8 +140,8 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath()
|
||||||
{
|
{
|
||||||
// Compute the path to use when referencing the current output
|
// Compute the path to use when referencing the current output
|
||||||
// directory from the top output directory.
|
// directory from the top output directory.
|
||||||
this->HomeRelativeOutputPath =
|
this->HomeRelativeOutputPath = this->Convert(
|
||||||
this->Convert(this->GetCurrentBinaryDirectory(), HOME_OUTPUT);
|
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
|
||||||
if (this->HomeRelativeOutputPath == ".") {
|
if (this->HomeRelativeOutputPath == ".") {
|
||||||
this->HomeRelativeOutputPath = "";
|
this->HomeRelativeOutputPath = "";
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ void cmLocalUnixMakefileGenerator3::WriteObjectConvenienceRule(
|
||||||
this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName));
|
this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName));
|
||||||
}
|
}
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
|
|
||||||
// Write the rule to the makefile.
|
// Write the rule to the makefile.
|
||||||
std::vector<std::string> no_depends;
|
std::vector<std::string> no_depends;
|
||||||
|
@ -398,7 +398,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(makefile2.c_str(), localName));
|
this->GetRecursiveMakeCall(makefile2.c_str(), localName));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
||||||
localName, depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName));
|
this->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
||||||
localName, depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(makefile2.c_str(), makeTargetName));
|
this->GetRecursiveMakeCall(makefile2.c_str(), makeTargetName));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream,
|
this->WriteMakeRule(ruleFileStream,
|
||||||
"Manual pre-install relink rule for target.",
|
"Manual pre-install relink rule for target.",
|
||||||
localName, depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
@ -546,7 +546,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct the left hand side of the rule.
|
// Construct the left hand side of the rule.
|
||||||
std::string tgt = this->Convert(target, HOME_OUTPUT, MAKERULE);
|
std::string tgt = this->Convert(target, cmOutputConverter::HOME_OUTPUT,
|
||||||
|
cmOutputConverter::MAKERULE);
|
||||||
|
|
||||||
const char* space = "";
|
const char* space = "";
|
||||||
if (tgt.size() == 1) {
|
if (tgt.size() == 1) {
|
||||||
|
@ -573,7 +574,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
||||||
for (std::vector<std::string>::const_iterator dep = depends.begin();
|
for (std::vector<std::string>::const_iterator dep = depends.begin();
|
||||||
dep != depends.end(); ++dep) {
|
dep != depends.end(); ++dep) {
|
||||||
replace = *dep;
|
replace = *dep;
|
||||||
replace = this->Convert(replace, HOME_OUTPUT, MAKERULE);
|
replace = this->Convert(replace, cmOutputConverter::HOME_OUTPUT,
|
||||||
|
cmOutputConverter::MAKERULE);
|
||||||
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
|
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -591,7 +593,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
|
std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
|
||||||
std::string const& cmd, RelativeRoot root)
|
std::string const& cmd, cmOutputConverter::RelativeRoot root)
|
||||||
{
|
{
|
||||||
if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) &&
|
if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) &&
|
||||||
cmd.find_first_of("( )") != cmd.npos) {
|
cmd.find_first_of("( )") != cmd.npos) {
|
||||||
|
@ -600,10 +602,11 @@ std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
|
||||||
// lines with shell redirection operators.
|
// lines with shell redirection operators.
|
||||||
std::string scmd;
|
std::string scmd;
|
||||||
if (cmSystemTools::GetShortPath(cmd, scmd)) {
|
if (cmSystemTools::GetShortPath(cmd, scmd)) {
|
||||||
return this->Convert(scmd, NONE, SHELL);
|
return this->Convert(scmd, cmOutputConverter::NONE,
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this->Convert(cmd, root, SHELL);
|
return this->Convert(cmd, root, cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
||||||
|
@ -639,13 +642,15 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# The CMake executable.\n"
|
<< "# The CMake executable.\n"
|
||||||
<< "CMAKE_COMMAND = "
|
<< "CMAKE_COMMAND = "
|
||||||
<< this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL)
|
<< this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(),
|
||||||
|
cmOutputConverter::FULL)
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# The command to remove a file.\n"
|
<< "# The command to remove a file.\n"
|
||||||
<< "RM = "
|
<< "RM = "
|
||||||
<< this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL)
|
<< this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(),
|
||||||
|
cmOutputConverter::FULL)
|
||||||
<< " -E remove -f\n"
|
<< " -E remove -f\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
makefileStream
|
makefileStream
|
||||||
|
@ -655,13 +660,17 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# The top-level source directory on which CMake was run.\n"
|
<< "# The top-level source directory on which CMake was run.\n"
|
||||||
<< "CMAKE_SOURCE_DIR = "
|
<< "CMAKE_SOURCE_DIR = "
|
||||||
<< this->Convert(this->GetSourceDirectory(), FULL, SHELL)
|
<< this->Convert(this->GetSourceDirectory(),
|
||||||
|
cmOutputConverter::FULL,
|
||||||
|
cmOutputConverter::SHELL)
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
makefileStream
|
makefileStream
|
||||||
<< "# The top-level build directory on which CMake was run.\n"
|
<< "# The top-level build directory on which CMake was run.\n"
|
||||||
<< "CMAKE_BINARY_DIR = "
|
<< "CMAKE_BINARY_DIR = "
|
||||||
<< this->Convert(this->GetBinaryDirectory(), FULL, SHELL)
|
<< this->Convert(this->GetBinaryDirectory(),
|
||||||
|
cmOutputConverter::FULL,
|
||||||
|
cmOutputConverter::SHELL)
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
@ -775,7 +784,8 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
|
||||||
std::string runRule =
|
std::string runRule =
|
||||||
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
||||||
runRule += " --check-build-system ";
|
runRule += " --check-build-system ";
|
||||||
runRule += this->Convert(cmakefileName, NONE, SHELL);
|
runRule += this->Convert(cmakefileName, cmOutputConverter::NONE,
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
runRule += " 0";
|
runRule += " 0";
|
||||||
|
|
||||||
std::vector<std::string> no_depends;
|
std::vector<std::string> no_depends;
|
||||||
|
@ -783,7 +793,7 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
|
||||||
commands.push_back(runRule);
|
commands.push_back(runRule);
|
||||||
if (!this->IsRootMakefile()) {
|
if (!this->IsRootMakefile()) {
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
}
|
}
|
||||||
this->WriteMakeRule(
|
this->WriteMakeRule(
|
||||||
makefileStream, "Special rule to run CMake to check the build system "
|
makefileStream, "Special rule to run CMake to check the build system "
|
||||||
|
@ -819,7 +829,8 @@ std::string cmLocalUnixMakefileGenerator3::GetRelativeTargetDirectory(
|
||||||
{
|
{
|
||||||
std::string dir = this->HomeRelativeOutputPath;
|
std::string dir = this->HomeRelativeOutputPath;
|
||||||
dir += this->GetTargetDirectory(target);
|
dir += this->GetTargetDirectory(target);
|
||||||
return this->Convert(dir, NONE, UNCHANGED);
|
return this->Convert(dir, cmOutputConverter::NONE,
|
||||||
|
cmOutputConverter::UNCHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags,
|
void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags,
|
||||||
|
@ -889,7 +900,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomDepend(
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator3::AppendCustomCommands(
|
void cmLocalUnixMakefileGenerator3::AppendCustomCommands(
|
||||||
std::vector<std::string>& commands, const std::vector<cmCustomCommand>& ccs,
|
std::vector<std::string>& commands, const std::vector<cmCustomCommand>& ccs,
|
||||||
cmGeneratorTarget* target, cmLocalGenerator::RelativeRoot relative)
|
cmGeneratorTarget* target, cmOutputConverter::RelativeRoot relative)
|
||||||
{
|
{
|
||||||
for (std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
for (std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
||||||
i != ccs.end(); ++i) {
|
i != ccs.end(); ++i) {
|
||||||
|
@ -901,7 +912,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommands(
|
||||||
void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
||||||
std::vector<std::string>& commands, cmCustomCommandGenerator const& ccg,
|
std::vector<std::string>& commands, cmCustomCommandGenerator const& ccg,
|
||||||
cmGeneratorTarget* target, bool echo_comment,
|
cmGeneratorTarget* target, bool echo_comment,
|
||||||
cmLocalGenerator::RelativeRoot relative, std::ostream* content)
|
cmOutputConverter::RelativeRoot relative, std::ostream* content)
|
||||||
{
|
{
|
||||||
// Optionally create a command to display the custom command's
|
// Optionally create a command to display the custom command's
|
||||||
// comment text. This is used for pre-build, pre-link, and
|
// comment text. This is used for pre-build, pre-link, and
|
||||||
|
@ -951,7 +962,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
||||||
// working directory will be the start-output directory.
|
// working directory will be the start-output directory.
|
||||||
bool had_slash = cmd.find("/") != cmd.npos;
|
bool had_slash = cmd.find("/") != cmd.npos;
|
||||||
if (workingDir.empty()) {
|
if (workingDir.empty()) {
|
||||||
cmd = this->Convert(cmd, START_OUTPUT);
|
cmd = this->Convert(cmd, cmOutputConverter::START_OUTPUT);
|
||||||
}
|
}
|
||||||
bool has_slash = cmd.find("/") != cmd.npos;
|
bool has_slash = cmd.find("/") != cmd.npos;
|
||||||
if (had_slash && !has_slash) {
|
if (had_slash && !has_slash) {
|
||||||
|
@ -961,8 +972,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
||||||
cmd = "./" + cmd;
|
cmd = "./" + cmd;
|
||||||
}
|
}
|
||||||
std::string launcher = this->MakeLauncher(
|
std::string launcher = this->MakeLauncher(
|
||||||
ccg, target, workingDir.empty() ? START_OUTPUT : NONE);
|
ccg, target, workingDir.empty() ? cmOutputConverter::START_OUTPUT
|
||||||
cmd = launcher + this->ConvertShellCommand(cmd, NONE);
|
: cmOutputConverter::NONE);
|
||||||
|
cmd = launcher + this->ConvertShellCommand(cmd, cmOutputConverter::NONE);
|
||||||
|
|
||||||
ccg.AppendArguments(c, cmd);
|
ccg.AppendArguments(c, cmd);
|
||||||
if (content) {
|
if (content) {
|
||||||
|
@ -1007,7 +1019,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
||||||
|
|
||||||
std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
||||||
cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
|
cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
|
||||||
RelativeRoot relative)
|
cmOutputConverter::RelativeRoot relative)
|
||||||
{
|
{
|
||||||
// Short-circuit if there is no launcher.
|
// Short-circuit if there is no launcher.
|
||||||
const char* prop = "RULE_LAUNCH_CUSTOM";
|
const char* prop = "RULE_LAUNCH_CUSTOM";
|
||||||
|
@ -1024,7 +1036,7 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
||||||
std::string output;
|
std::string output;
|
||||||
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
||||||
if (!outputs.empty()) {
|
if (!outputs.empty()) {
|
||||||
output = this->Convert(outputs[0], relative, SHELL);
|
output = this->Convert(outputs[0], relative, cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
vars.Output = output.c_str();
|
vars.Output = output.c_str();
|
||||||
|
|
||||||
|
@ -1049,7 +1061,8 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
||||||
cleanfile += filename;
|
cleanfile += filename;
|
||||||
}
|
}
|
||||||
cleanfile += ".cmake";
|
cleanfile += ".cmake";
|
||||||
std::string cleanfilePath = this->Convert(cleanfile, FULL);
|
std::string cleanfilePath =
|
||||||
|
this->Convert(cleanfile, cmOutputConverter::FULL);
|
||||||
cmsys::ofstream fout(cleanfilePath.c_str());
|
cmsys::ofstream fout(cleanfilePath.c_str());
|
||||||
if (!fout) {
|
if (!fout) {
|
||||||
cmSystemTools::Error("Could not create ", cleanfilePath.c_str());
|
cmSystemTools::Error("Could not create ", cleanfilePath.c_str());
|
||||||
|
@ -1058,13 +1071,15 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
||||||
fout << "file(REMOVE_RECURSE\n";
|
fout << "file(REMOVE_RECURSE\n";
|
||||||
for (std::vector<std::string>::const_iterator f = files.begin();
|
for (std::vector<std::string>::const_iterator f = files.begin();
|
||||||
f != files.end(); ++f) {
|
f != files.end(); ++f) {
|
||||||
std::string fc = this->Convert(*f, START_OUTPUT, UNCHANGED);
|
std::string fc = this->Convert(*f, cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::UNCHANGED);
|
||||||
fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n";
|
fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n";
|
||||||
}
|
}
|
||||||
fout << ")\n";
|
fout << ")\n";
|
||||||
}
|
}
|
||||||
std::string remove = "$(CMAKE_COMMAND) -P ";
|
std::string remove = "$(CMAKE_COMMAND) -P ";
|
||||||
remove += this->Convert(cleanfile, START_OUTPUT, SHELL);
|
remove += this->Convert(cleanfile, cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
commands.push_back(remove);
|
commands.push_back(remove);
|
||||||
|
|
||||||
// For the main clean rule add per-language cleaning.
|
// For the main clean rule add per-language cleaning.
|
||||||
|
@ -1133,8 +1148,8 @@ void cmLocalUnixMakefileGenerator3::AppendEcho(
|
||||||
cmd += color_name;
|
cmd += color_name;
|
||||||
if (progress) {
|
if (progress) {
|
||||||
cmd += "--progress-dir=";
|
cmd += "--progress-dir=";
|
||||||
cmd += this->Convert(progress->Dir, cmLocalGenerator::FULL,
|
cmd += this->Convert(progress->Dir, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
cmd += "--progress-num=";
|
cmd += "--progress-num=";
|
||||||
cmd += progress->Arg;
|
cmd += progress->Arg;
|
||||||
|
@ -1544,9 +1559,9 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
this->AppendCustomDepends(depends, gt->GetPreBuildCommands());
|
this->AppendCustomDepends(depends, gt->GetPreBuildCommands());
|
||||||
this->AppendCustomDepends(depends, gt->GetPostBuildCommands());
|
this->AppendCustomDepends(depends, gt->GetPostBuildCommands());
|
||||||
this->AppendCustomCommands(commands, gt->GetPreBuildCommands(), gt,
|
this->AppendCustomCommands(commands, gt->GetPreBuildCommands(), gt,
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->AppendCustomCommands(commands, gt->GetPostBuildCommands(), gt,
|
this->AppendCustomCommands(commands, gt->GetPostBuildCommands(), gt,
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
std::string targetName = gt->GetName();
|
std::string targetName = gt->GetName();
|
||||||
this->WriteMakeRule(ruleFileStream, targetString.c_str(), targetName,
|
this->WriteMakeRule(ruleFileStream, targetString.c_str(), targetName,
|
||||||
depends, commands, true);
|
depends, commands, true);
|
||||||
|
@ -1583,15 +1598,15 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
{
|
{
|
||||||
std::ostringstream progCmd;
|
std::ostringstream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
||||||
progCmd << this->Convert(progressDir, cmLocalGenerator::FULL,
|
progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
|
|
||||||
std::string progressFile = cmake::GetCMakeFilesDirectory();
|
std::string progressFile = cmake::GetCMakeFilesDirectory();
|
||||||
progressFile += "/progress.marks";
|
progressFile += "/progress.marks";
|
||||||
std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
|
std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
|
||||||
progCmd << " "
|
progCmd << " "
|
||||||
<< this->Convert(progressFileNameFull, cmLocalGenerator::FULL,
|
<< this->Convert(progressFileNameFull, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
commands.push_back(progCmd.str());
|
commands.push_back(progCmd.str());
|
||||||
}
|
}
|
||||||
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
|
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||||
|
@ -1599,12 +1614,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
{
|
{
|
||||||
std::ostringstream progCmd;
|
std::ostringstream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
||||||
progCmd << this->Convert(progressDir, cmLocalGenerator::FULL,
|
progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
progCmd << " 0";
|
progCmd << " 0";
|
||||||
commands.push_back(progCmd.str());
|
commands.push_back(progCmd.str());
|
||||||
}
|
}
|
||||||
|
@ -1619,7 +1634,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "The main clean target", "clean",
|
this->WriteMakeRule(ruleFileStream, "The main clean target", "clean",
|
||||||
depends, commands, true);
|
depends, commands, true);
|
||||||
commands.clear();
|
commands.clear();
|
||||||
|
@ -1645,7 +1660,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
commands.push_back(
|
commands.push_back(
|
||||||
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
||||||
"preinstall", depends, commands, true);
|
"preinstall", depends, commands, true);
|
||||||
depends.clear();
|
depends.clear();
|
||||||
|
@ -1660,12 +1675,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
||||||
std::string runRule =
|
std::string runRule =
|
||||||
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
||||||
runRule += " --check-build-system ";
|
runRule += " --check-build-system ";
|
||||||
runRule += this->Convert(cmakefileName, cmLocalGenerator::NONE,
|
runRule += this->Convert(cmakefileName, cmOutputConverter::NONE,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
runRule += " 1";
|
runRule += " 1";
|
||||||
commands.push_back(runRule);
|
commands.push_back(runRule);
|
||||||
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::START_OUTPUT);
|
cmOutputConverter::START_OUTPUT);
|
||||||
this->WriteMakeRule(ruleFileStream, "clear depends", "depend", depends,
|
this->WriteMakeRule(ruleFileStream, "clear depends", "depend", depends,
|
||||||
commands, true);
|
commands, true);
|
||||||
}
|
}
|
||||||
|
@ -1832,7 +1847,7 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
|
||||||
for (std::vector<std::string>::iterator i = includes.begin();
|
for (std::vector<std::string>::iterator i = includes.begin();
|
||||||
i != includes.end(); ++i) {
|
i != includes.end(); ++i) {
|
||||||
cmakefileStream << " \""
|
cmakefileStream << " \""
|
||||||
<< this->Convert(*i, cmLocalGenerator::HOME_OUTPUT)
|
<< this->Convert(*i, cmOutputConverter::HOME_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n";
|
cmakefileStream << " )\n";
|
||||||
|
@ -1874,7 +1889,8 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
|
||||||
// Call make on the given file.
|
// Call make on the given file.
|
||||||
std::string cmd;
|
std::string cmd;
|
||||||
cmd += "$(MAKE) -f ";
|
cmd += "$(MAKE) -f ";
|
||||||
cmd += this->Convert(makefile, NONE, SHELL);
|
cmd +=
|
||||||
|
this->Convert(makefile, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
|
|
||||||
cmGlobalUnixMakefileGenerator3* gg =
|
cmGlobalUnixMakefileGenerator3* gg =
|
||||||
|
@ -1896,7 +1912,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
|
||||||
// Add the target.
|
// Add the target.
|
||||||
if (!tgt.empty()) {
|
if (!tgt.empty()) {
|
||||||
// The make target is always relative to the top of the build tree.
|
// The make target is always relative to the top of the build tree.
|
||||||
std::string tgt2 = this->Convert(tgt, HOME_OUTPUT);
|
std::string tgt2 = this->Convert(tgt, cmOutputConverter::HOME_OUTPUT);
|
||||||
|
|
||||||
// The target may have been written with windows paths.
|
// The target may have been written with windows paths.
|
||||||
cmSystemTools::ConvertToOutputSlashes(tgt2);
|
cmSystemTools::ConvertToOutputSlashes(tgt2);
|
||||||
|
@ -2031,7 +2047,7 @@ void cmLocalUnixMakefileGenerator3::AddImplicitDepends(
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator3::CreateCDCommand(
|
void cmLocalUnixMakefileGenerator3::CreateCDCommand(
|
||||||
std::vector<std::string>& commands, const char* tgtDir,
|
std::vector<std::string>& commands, const char* tgtDir,
|
||||||
cmLocalGenerator::RelativeRoot relRetDir)
|
cmOutputConverter::RelativeRoot relRetDir)
|
||||||
{
|
{
|
||||||
const char* retDir = this->GetRelativeRootPath(relRetDir);
|
const char* retDir = this->GetRelativeRootPath(relRetDir);
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ public:
|
||||||
// create a command that cds to the start dir then runs the commands
|
// create a command that cds to the start dir then runs the commands
|
||||||
void CreateCDCommand(std::vector<std::string>& commands,
|
void CreateCDCommand(std::vector<std::string>& commands,
|
||||||
const char* targetDir,
|
const char* targetDir,
|
||||||
cmLocalGenerator::RelativeRoot returnDir);
|
cmOutputConverter::RelativeRoot returnDir);
|
||||||
|
|
||||||
static std::string ConvertToQuotedOutputPath(const char* p,
|
static std::string ConvertToQuotedOutputPath(const char* p,
|
||||||
bool useWatcomQuote);
|
bool useWatcomQuote);
|
||||||
|
@ -230,11 +230,11 @@ protected:
|
||||||
void AppendCustomCommands(
|
void AppendCustomCommands(
|
||||||
std::vector<std::string>& commands,
|
std::vector<std::string>& commands,
|
||||||
const std::vector<cmCustomCommand>& ccs, cmGeneratorTarget* target,
|
const std::vector<cmCustomCommand>& ccs, cmGeneratorTarget* target,
|
||||||
cmLocalGenerator::RelativeRoot relative = cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::RelativeRoot relative = cmOutputConverter::HOME_OUTPUT);
|
||||||
void AppendCustomCommand(
|
void AppendCustomCommand(
|
||||||
std::vector<std::string>& commands, cmCustomCommandGenerator const& ccg,
|
std::vector<std::string>& commands, cmCustomCommandGenerator const& ccg,
|
||||||
cmGeneratorTarget* target, bool echo_comment = false,
|
cmGeneratorTarget* target, bool echo_comment = false,
|
||||||
cmLocalGenerator::RelativeRoot relative = cmLocalGenerator::HOME_OUTPUT,
|
cmOutputConverter::RelativeRoot relative = cmOutputConverter::HOME_OUTPUT,
|
||||||
std::ostream* content = 0);
|
std::ostream* content = 0);
|
||||||
void AppendCleanCommand(std::vector<std::string>& commands,
|
void AppendCleanCommand(std::vector<std::string>& commands,
|
||||||
const std::vector<std::string>& files,
|
const std::vector<std::string>& files,
|
||||||
|
@ -247,9 +247,11 @@ protected:
|
||||||
void CheckMultipleOutputs(bool verbose);
|
void CheckMultipleOutputs(bool verbose);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string ConvertShellCommand(std::string const& cmd, RelativeRoot root);
|
std::string ConvertShellCommand(std::string const& cmd,
|
||||||
|
cmOutputConverter::RelativeRoot root);
|
||||||
std::string MakeLauncher(cmCustomCommandGenerator const& ccg,
|
std::string MakeLauncher(cmCustomCommandGenerator const& ccg,
|
||||||
cmGeneratorTarget* target, RelativeRoot relative);
|
cmGeneratorTarget* target,
|
||||||
|
cmOutputConverter::RelativeRoot relative);
|
||||||
|
|
||||||
virtual void ComputeObjectFilenames(
|
virtual void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, std::string>& mapping,
|
std::map<cmSourceFile const*, std::string>& mapping,
|
||||||
|
|
|
@ -269,7 +269,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
|
||||||
args += this->GetBinaryDirectory();
|
args += this->GetBinaryDirectory();
|
||||||
commandLine.push_back(args);
|
commandLine.push_back(args);
|
||||||
commandLine.push_back("--check-stamp-file");
|
commandLine.push_back("--check-stamp-file");
|
||||||
std::string stampFilename = this->Convert(stampName.c_str(), FULL, SHELL);
|
std::string stampFilename = this->Convert(
|
||||||
|
stampName.c_str(), cmOutputConverter::FULL, cmOutputConverter::SHELL);
|
||||||
commandLine.push_back(stampFilename.c_str());
|
commandLine.push_back(stampFilename.c_str());
|
||||||
|
|
||||||
std::vector<std::string> const& listFiles = this->Makefile->GetListFiles();
|
std::vector<std::string> const& listFiles = this->Makefile->GetListFiles();
|
||||||
|
@ -277,8 +278,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
|
||||||
cmCustomCommandLines commandLines;
|
cmCustomCommandLines commandLines;
|
||||||
commandLines.push_back(commandLine);
|
commandLines.push_back(commandLine);
|
||||||
const char* no_working_directory = 0;
|
const char* no_working_directory = 0;
|
||||||
std::string fullpathStampName =
|
std::string fullpathStampName = this->Convert(
|
||||||
this->Convert(stampName.c_str(), FULL, UNCHANGED);
|
stampName.c_str(), cmOutputConverter::FULL, cmOutputConverter::UNCHANGED);
|
||||||
this->Makefile->AddCustomCommandToOutput(
|
this->Makefile->AddCustomCommandToOutput(
|
||||||
fullpathStampName.c_str(), listFiles, makefileIn.c_str(), commandLines,
|
fullpathStampName.c_str(), listFiles, makefileIn.c_str(), commandLines,
|
||||||
comment.c_str(), no_working_directory, true);
|
comment.c_str(), no_working_directory, true);
|
||||||
|
@ -683,10 +684,10 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
|
||||||
|
|
||||||
if (this->FortranProject) {
|
if (this->FortranProject) {
|
||||||
switch (this->GetFortranFormat(target->GetProperty("Fortran_FORMAT"))) {
|
switch (this->GetFortranFormat(target->GetProperty("Fortran_FORMAT"))) {
|
||||||
case FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
flags += " -fixed";
|
flags += " -fixed";
|
||||||
break;
|
break;
|
||||||
case FortranFormatFree:
|
case cmOutputConverter::FortranFormatFree:
|
||||||
flags += " -free";
|
flags += " -free";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -786,8 +787,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
|
||||||
target->GetProperty("Fortran_MODULE_DIRECTORY");
|
target->GetProperty("Fortran_MODULE_DIRECTORY");
|
||||||
std::string modDir;
|
std::string modDir;
|
||||||
if (target_mod_dir) {
|
if (target_mod_dir) {
|
||||||
modDir = this->Convert(target_mod_dir, cmLocalGenerator::START_OUTPUT,
|
modDir = this->Convert(target_mod_dir, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::UNCHANGED);
|
||||||
} else {
|
} else {
|
||||||
modDir = ".";
|
modDir = ".";
|
||||||
}
|
}
|
||||||
|
@ -1006,8 +1007,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(
|
||||||
|
|
||||||
linkOptions.Parse(extraLinkOptions.c_str());
|
linkOptions.Parse(extraLinkOptions.c_str());
|
||||||
if (!this->ModuleDefinitionFile.empty()) {
|
if (!this->ModuleDefinitionFile.empty()) {
|
||||||
std::string defFile =
|
std::string defFile = this->ConvertToOutputFormat(
|
||||||
this->ConvertToOutputFormat(this->ModuleDefinitionFile, SHELL);
|
this->ModuleDefinitionFile, cmOutputConverter::SHELL);
|
||||||
linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str());
|
linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1298,8 +1299,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries(
|
||||||
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
|
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
|
||||||
if (l->IsPath) {
|
if (l->IsPath) {
|
||||||
std::string rel =
|
std::string rel =
|
||||||
lg->Convert(l->Value.c_str(), cmLocalGenerator::START_OUTPUT,
|
lg->Convert(l->Value.c_str(), cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::UNCHANGED);
|
||||||
fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " ";
|
fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " ";
|
||||||
} else if (!l->Target ||
|
} else if (!l->Target ||
|
||||||
l->Target->GetType() != cmState::INTERFACE_LIBRARY) {
|
l->Target->GetType() != cmState::INTERFACE_LIBRARY) {
|
||||||
|
@ -1319,8 +1320,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputObjects(
|
||||||
const char* sep = isep ? isep : "";
|
const char* sep = isep ? isep : "";
|
||||||
for (std::vector<std::string>::const_iterator oi = objs.begin();
|
for (std::vector<std::string>::const_iterator oi = objs.begin();
|
||||||
oi != objs.end(); ++oi) {
|
oi != objs.end(); ++oi) {
|
||||||
std::string rel = lg->Convert(oi->c_str(), cmLocalGenerator::START_OUTPUT,
|
std::string rel = lg->Convert(oi->c_str(), cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::UNCHANGED);
|
||||||
fout << sep << lg->ConvertToXMLOutputPath(rel.c_str());
|
fout << sep << lg->ConvertToXMLOutputPath(rel.c_str());
|
||||||
sep = " ";
|
sep = " ";
|
||||||
}
|
}
|
||||||
|
@ -1343,7 +1344,9 @@ void cmLocalVisualStudio7Generator::OutputLibraryDirectories(
|
||||||
|
|
||||||
// Switch to a relative path specification if it is shorter.
|
// Switch to a relative path specification if it is shorter.
|
||||||
if (cmSystemTools::FileIsFullPath(dir.c_str())) {
|
if (cmSystemTools::FileIsFullPath(dir.c_str())) {
|
||||||
std::string rel = this->Convert(dir.c_str(), START_OUTPUT, UNCHANGED);
|
std::string rel =
|
||||||
|
this->Convert(dir.c_str(), cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::UNCHANGED);
|
||||||
if (rel.size() < dir.size()) {
|
if (rel.size() < dir.size()) {
|
||||||
dir = rel;
|
dir = rel;
|
||||||
}
|
}
|
||||||
|
@ -1472,11 +1475,11 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
|
||||||
}
|
}
|
||||||
if (lg->FortranProject) {
|
if (lg->FortranProject) {
|
||||||
switch (lg->GetFortranFormat(sf.GetProperty("Fortran_FORMAT"))) {
|
switch (lg->GetFortranFormat(sf.GetProperty("Fortran_FORMAT"))) {
|
||||||
case cmLocalGenerator::FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
fc.CompileFlags = "-fixed " + fc.CompileFlags;
|
fc.CompileFlags = "-fixed " + fc.CompileFlags;
|
||||||
needfc = true;
|
needfc = true;
|
||||||
break;
|
break;
|
||||||
case cmLocalGenerator::FortranFormatFree:
|
case cmOutputConverter::FortranFormatFree:
|
||||||
fc.CompileFlags = "-free " + fc.CompileFlags;
|
fc.CompileFlags = "-free " + fc.CompileFlags;
|
||||||
needfc = true;
|
needfc = true;
|
||||||
break;
|
break;
|
||||||
|
@ -2042,7 +2045,8 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const std::string& s)
|
||||||
std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(
|
std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(
|
||||||
const char* path)
|
const char* path)
|
||||||
{
|
{
|
||||||
std::string ret = this->ConvertToOutputFormat(path, SHELL);
|
std::string ret =
|
||||||
|
this->ConvertToOutputFormat(path, cmOutputConverter::SHELL);
|
||||||
cmSystemTools::ReplaceString(ret, "&", "&");
|
cmSystemTools::ReplaceString(ret, "&", "&");
|
||||||
cmSystemTools::ReplaceString(ret, "\"", """);
|
cmSystemTools::ReplaceString(ret, "\"", """);
|
||||||
cmSystemTools::ReplaceString(ret, "<", "<");
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
|
@ -2053,7 +2057,8 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(
|
||||||
std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(
|
std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(
|
||||||
const char* path)
|
const char* path)
|
||||||
{
|
{
|
||||||
std::string ret = this->ConvertToOutputFormat(path, SHELL);
|
std::string ret =
|
||||||
|
this->ConvertToOutputFormat(path, cmOutputConverter::SHELL);
|
||||||
cmSystemTools::ReplaceString(ret, "\"", "");
|
cmSystemTools::ReplaceString(ret, "\"", "");
|
||||||
cmSystemTools::ReplaceString(ret, "&", "&");
|
cmSystemTools::ReplaceString(ret, "&", "&");
|
||||||
cmSystemTools::ReplaceString(ret, "<", "<");
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
|
|
|
@ -128,16 +128,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
std::string targetFullPathPDB = pdbOutputPath + targetNamePDB;
|
std::string targetFullPathPDB = pdbOutputPath + targetNamePDB;
|
||||||
std::string targetFullPathImport = outpathImp + targetNameImport;
|
std::string targetFullPathImport = outpathImp + targetNameImport;
|
||||||
std::string targetOutPathPDB = this->Convert(
|
std::string targetOutPathPDB = this->Convert(
|
||||||
targetFullPathPDB, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
// Convert to the output path to use in constructing commands.
|
// Convert to the output path to use in constructing commands.
|
||||||
std::string targetOutPath = this->Convert(
|
std::string targetOutPath = this->Convert(
|
||||||
targetFullPath, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL);
|
targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL);
|
||||||
std::string targetOutPathReal =
|
std::string targetOutPathReal =
|
||||||
this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
std::string targetOutPathImport =
|
std::string targetOutPathImport =
|
||||||
this->Convert(targetFullPathImport, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
|
|
||||||
// Get the language to use for linking this executable.
|
// Get the language to use for linking this executable.
|
||||||
std::string linkLanguage =
|
std::string linkLanguage =
|
||||||
|
@ -209,29 +209,30 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
// may need to be cleaned.
|
// may need to be cleaned.
|
||||||
std::vector<std::string> exeCleanFiles;
|
std::vector<std::string> exeCleanFiles;
|
||||||
exeCleanFiles.push_back(this->Convert(targetFullPath,
|
exeCleanFiles.push_back(this->Convert(targetFullPath,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// There may be a manifest file for this target. Add it to the
|
// There may be a manifest file for this target. Add it to the
|
||||||
// clean set just in case.
|
// clean set just in case.
|
||||||
exeCleanFiles.push_back(this->Convert((targetFullPath + ".manifest").c_str(),
|
exeCleanFiles.push_back(this->Convert((targetFullPath + ".manifest").c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
#endif
|
#endif
|
||||||
if (targetNameReal != targetName) {
|
if (targetNameReal != targetName) {
|
||||||
exeCleanFiles.push_back(this->Convert(targetFullPathReal,
|
exeCleanFiles.push_back(this->Convert(targetFullPathReal,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
if (!targetNameImport.empty()) {
|
if (!targetNameImport.empty()) {
|
||||||
exeCleanFiles.push_back(this->Convert(targetFullPathImport,
|
exeCleanFiles.push_back(this->Convert(targetFullPathImport,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
std::string implib;
|
std::string implib;
|
||||||
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
|
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
|
||||||
implib)) {
|
implib)) {
|
||||||
exeCleanFiles.push_back(this->Convert(
|
exeCleanFiles.push_back(this->Convert(implib,
|
||||||
implib, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,8 +240,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
// cleaned. We do not want to delete the .pdb file just before
|
// cleaned. We do not want to delete the .pdb file just before
|
||||||
// linking the target.
|
// linking the target.
|
||||||
this->CleanFiles.push_back(this->Convert(targetFullPathPDB,
|
this->CleanFiles.push_back(this->Convert(targetFullPathPDB,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
|
|
||||||
// Add the pre-build and pre-link rules building but not when relinking.
|
// Add the pre-build and pre-link rules building but not when relinking.
|
||||||
if (!relink) {
|
if (!relink) {
|
||||||
|
@ -323,14 +324,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
vars.Language = linkLanguage.c_str();
|
vars.Language = linkLanguage.c_str();
|
||||||
vars.Objects = buildObjs.c_str();
|
vars.Objects = buildObjs.c_str();
|
||||||
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
||||||
objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT,
|
objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.ObjectDir = objectDir.c_str();
|
vars.ObjectDir = objectDir.c_str();
|
||||||
cmLocalGenerator::OutputFormat output = (useWatcomQuote)
|
cmOutputConverter::OutputFormat output = (useWatcomQuote)
|
||||||
? cmLocalGenerator::WATCOMQUOTE
|
? cmOutputConverter::WATCOMQUOTE
|
||||||
: cmLocalGenerator::SHELL;
|
: cmOutputConverter::SHELL;
|
||||||
std::string target = this->Convert(targetFullPathReal,
|
std::string target = this->Convert(
|
||||||
cmLocalGenerator::START_OUTPUT, output);
|
targetFullPathReal, cmOutputConverter::START_OUTPUT, output);
|
||||||
vars.Target = target.c_str();
|
vars.Target = target.c_str();
|
||||||
vars.TargetPDB = targetOutPathPDB.c_str();
|
vars.TargetPDB = targetOutPathPDB.c_str();
|
||||||
|
|
||||||
|
@ -380,7 +381,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
}
|
}
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
||||||
commands1.clear();
|
commands1.clear();
|
||||||
|
|
||||||
|
@ -393,7 +394,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||||
commands1.push_back(symlink);
|
commands1.push_back(symlink);
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
||||||
commands1.clear();
|
commands1.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,17 +301,18 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
// Construct the output path version of the names for use in command
|
// Construct the output path version of the names for use in command
|
||||||
// arguments.
|
// arguments.
|
||||||
std::string targetOutPathPDB = this->Convert(
|
std::string targetOutPathPDB = this->Convert(
|
||||||
targetFullPathPDB, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
std::string targetOutPath = this->Convert(
|
std::string targetOutPath = this->Convert(
|
||||||
targetFullPath, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL);
|
targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL);
|
||||||
std::string targetOutPathSO = this->Convert(
|
std::string targetOutPathSO =
|
||||||
targetFullPathSO, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL);
|
this->Convert(targetFullPathSO, cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
std::string targetOutPathReal =
|
std::string targetOutPathReal =
|
||||||
this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
std::string targetOutPathImport =
|
std::string targetOutPathImport =
|
||||||
this->Convert(targetFullPathImport, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
|
|
||||||
this->NumberOfProgressActions++;
|
this->NumberOfProgressActions++;
|
||||||
if (!this->NoRuleMessages) {
|
if (!this->NoRuleMessages) {
|
||||||
|
@ -357,27 +358,28 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
// Clean files associated with this library.
|
// Clean files associated with this library.
|
||||||
std::vector<std::string> libCleanFiles;
|
std::vector<std::string> libCleanFiles;
|
||||||
libCleanFiles.push_back(this->Convert(targetFullPath,
|
libCleanFiles.push_back(this->Convert(targetFullPath,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
if (targetNameReal != targetName) {
|
if (targetNameReal != targetName) {
|
||||||
libCleanFiles.push_back(this->Convert(targetFullPathReal,
|
libCleanFiles.push_back(this->Convert(targetFullPathReal,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
if (targetNameSO != targetName && targetNameSO != targetNameReal) {
|
if (targetNameSO != targetName && targetNameSO != targetNameReal) {
|
||||||
libCleanFiles.push_back(this->Convert(targetFullPathSO,
|
libCleanFiles.push_back(this->Convert(targetFullPathSO,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
if (!targetNameImport.empty()) {
|
if (!targetNameImport.empty()) {
|
||||||
libCleanFiles.push_back(this->Convert(targetFullPathImport,
|
libCleanFiles.push_back(this->Convert(targetFullPathImport,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
std::string implib;
|
std::string implib;
|
||||||
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
|
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
|
||||||
implib)) {
|
implib)) {
|
||||||
libCleanFiles.push_back(this->Convert(
|
libCleanFiles.push_back(this->Convert(implib,
|
||||||
implib, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::START_OUTPUT,
|
||||||
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,16 +387,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
// cleaned. We do not want to delete the .pdb file just before
|
// cleaned. We do not want to delete the .pdb file just before
|
||||||
// linking the target.
|
// linking the target.
|
||||||
this->CleanFiles.push_back(this->Convert(targetFullPathPDB,
|
this->CleanFiles.push_back(this->Convert(targetFullPathPDB,
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// There may be a manifest file for this target. Add it to the
|
// There may be a manifest file for this target. Add it to the
|
||||||
// clean set just in case.
|
// clean set just in case.
|
||||||
if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) {
|
if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) {
|
||||||
libCleanFiles.push_back(this->Convert(
|
libCleanFiles.push_back(this->Convert(
|
||||||
(targetFullPath + ".manifest").c_str(), cmLocalGenerator::START_OUTPUT,
|
(targetFullPath + ".manifest").c_str(), cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -406,7 +408,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
this->GeneratorTarget, "target");
|
this->GeneratorTarget, "target");
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
||||||
commands1.clear();
|
commands1.clear();
|
||||||
}
|
}
|
||||||
|
@ -525,16 +527,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
std::string("/") + this->GeneratorTarget->GetName();
|
std::string("/") + this->GeneratorTarget->GetName();
|
||||||
name_of_def_file += ".def";
|
name_of_def_file += ".def";
|
||||||
std::string cmd = cmSystemTools::GetCMakeCommand();
|
std::string cmd = cmSystemTools::GetCMakeCommand();
|
||||||
cmd =
|
cmd = this->Convert(cmd, cmOutputConverter::NONE,
|
||||||
this->Convert(cmd, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
cmd += " -E __create_def ";
|
cmd += " -E __create_def ";
|
||||||
cmd += this->Convert(name_of_def_file, cmLocalGenerator::START_OUTPUT,
|
cmd += this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
std::string objlist_file = name_of_def_file;
|
std::string objlist_file = name_of_def_file;
|
||||||
objlist_file += ".objs";
|
objlist_file += ".objs";
|
||||||
cmd += this->Convert(objlist_file, cmLocalGenerator::START_OUTPUT,
|
cmd += this->Convert(objlist_file, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
real_link_commands.push_back(cmd);
|
real_link_commands.push_back(cmd);
|
||||||
// create a list of obj files for the -E __create_def to read
|
// create a list of obj files for the -E __create_def to read
|
||||||
cmGeneratedFileStream fout(objlist_file.c_str());
|
cmGeneratedFileStream fout(objlist_file.c_str());
|
||||||
|
@ -555,8 +557,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
linkFlags +=
|
linkFlags +=
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
||||||
linkFlags +=
|
linkFlags +=
|
||||||
this->Convert(name_of_def_file, cmLocalGenerator::START_OUTPUT,
|
this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
linkFlags += " ";
|
linkFlags += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -588,14 +590,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
vars.Language = linkLanguage.c_str();
|
vars.Language = linkLanguage.c_str();
|
||||||
vars.Objects = buildObjs.c_str();
|
vars.Objects = buildObjs.c_str();
|
||||||
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
||||||
objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT,
|
objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.ObjectDir = objectDir.c_str();
|
vars.ObjectDir = objectDir.c_str();
|
||||||
cmLocalGenerator::OutputFormat output = (useWatcomQuote)
|
cmOutputConverter::OutputFormat output = (useWatcomQuote)
|
||||||
? cmLocalGenerator::WATCOMQUOTE
|
? cmOutputConverter::WATCOMQUOTE
|
||||||
: cmLocalGenerator::SHELL;
|
: cmOutputConverter::SHELL;
|
||||||
std::string target = this->Convert(targetFullPathReal,
|
std::string target = this->Convert(
|
||||||
cmLocalGenerator::START_OUTPUT, output);
|
targetFullPathReal, cmOutputConverter::START_OUTPUT, output);
|
||||||
vars.Target = target.c_str();
|
vars.Target = target.c_str();
|
||||||
vars.LinkLibraries = linkLibs.c_str();
|
vars.LinkLibraries = linkLibs.c_str();
|
||||||
vars.ObjectsQuoted = buildObjs.c_str();
|
vars.ObjectsQuoted = buildObjs.c_str();
|
||||||
|
@ -620,7 +622,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
} else {
|
} else {
|
||||||
// Convert to a path for the native build tool.
|
// Convert to a path for the native build tool.
|
||||||
install_name_dir = this->LocalGenerator->Convert(
|
install_name_dir = this->LocalGenerator->Convert(
|
||||||
install_name_dir, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
install_name_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
vars.TargetInstallNameDir = install_name_dir.c_str();
|
vars.TargetInstallNameDir = install_name_dir.c_str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -707,7 +709,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
}
|
}
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
||||||
commands1.clear();
|
commands1.clear();
|
||||||
|
|
||||||
|
@ -724,7 +726,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||||
commands1.push_back(symlink);
|
commands1.push_back(symlink);
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
commands1, this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
||||||
commands1.clear();
|
commands1.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
|
||||||
for (std::vector<std::string>::const_iterator o = outputs.begin();
|
for (std::vector<std::string>::const_iterator o = outputs.begin();
|
||||||
o != outputs.end(); ++o) {
|
o != outputs.end(); ++o) {
|
||||||
this->CleanFiles.push_back(this->Convert(
|
this->CleanFiles.push_back(this->Convert(
|
||||||
*o, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED));
|
*o, cmOutputConverter::START_OUTPUT, cmOutputConverter::UNCHANGED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,8 +203,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include any dependencies generated for this target.\n"
|
<< "# Include any dependencies generated for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(dependFileNameFull, cmLocalGenerator::HOME_OUTPUT,
|
<< this->Convert(dependFileNameFull, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
|
|
||||||
if (!this->NoRuleMessages) {
|
if (!this->NoRuleMessages) {
|
||||||
|
@ -213,8 +213,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
<< "# Include the progress variables for this target.\n"
|
<< "# Include the progress variables for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->ProgressFileNameFull,
|
<< this->Convert(this->ProgressFileNameFull,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,8 +244,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
||||||
*this->BuildFileStream
|
*this->BuildFileStream
|
||||||
<< "# Include the compile flags for this target's objects.\n"
|
<< "# Include the compile flags for this target's objects.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->FlagFileNameFull, cmLocalGenerator::HOME_OUTPUT,
|
<< this->Convert(this->FlagFileNameFull, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,8 +301,8 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()(
|
||||||
output += "/";
|
output += "/";
|
||||||
output += cmSystemTools::GetFilenameName(input);
|
output += cmSystemTools::GetFilenameName(input);
|
||||||
this->Generator->CleanFiles.push_back(
|
this->Generator->CleanFiles.push_back(
|
||||||
this->Generator->Convert(output, cmLocalGenerator::START_OUTPUT));
|
this->Generator->Convert(output, cmOutputConverter::START_OUTPUT));
|
||||||
output = this->Generator->Convert(output, cmLocalGenerator::HOME_OUTPUT);
|
output = this->Generator->Convert(output, cmOutputConverter::HOME_OUTPUT);
|
||||||
|
|
||||||
// Create a rule to copy the content into the bundle.
|
// Create a rule to copy the content into the bundle.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
|
@ -313,11 +313,11 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()(
|
||||||
this->Generator->LocalGenerator->AppendEcho(
|
this->Generator->LocalGenerator->AppendEcho(
|
||||||
commands, copyEcho.c_str(), cmLocalUnixMakefileGenerator3::EchoBuild);
|
commands, copyEcho.c_str(), cmLocalUnixMakefileGenerator3::EchoBuild);
|
||||||
std::string copyCommand = "$(CMAKE_COMMAND) -E copy ";
|
std::string copyCommand = "$(CMAKE_COMMAND) -E copy ";
|
||||||
copyCommand += this->Generator->Convert(input, cmLocalGenerator::NONE,
|
copyCommand += this->Generator->Convert(input, cmOutputConverter::NONE,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
copyCommand += " ";
|
copyCommand += " ";
|
||||||
copyCommand += this->Generator->Convert(output, cmLocalGenerator::NONE,
|
copyCommand += this->Generator->Convert(output, cmOutputConverter::NONE,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
commands.push_back(copyCommand);
|
commands.push_back(copyCommand);
|
||||||
this->Generator->LocalGenerator->WriteMakeRule(
|
this->Generator->LocalGenerator->WriteMakeRule(
|
||||||
*this->Generator->BuildFileStream, 0, output, depends, commands, false);
|
*this->Generator->BuildFileStream, 0, output, depends, commands, false);
|
||||||
|
@ -381,9 +381,9 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
|
||||||
std::string objFullPath = this->LocalGenerator->GetCurrentBinaryDirectory();
|
std::string objFullPath = this->LocalGenerator->GetCurrentBinaryDirectory();
|
||||||
objFullPath += "/";
|
objFullPath += "/";
|
||||||
objFullPath += obj;
|
objFullPath += obj;
|
||||||
objFullPath = this->Convert(objFullPath, cmLocalGenerator::FULL);
|
objFullPath = this->Convert(objFullPath, cmOutputConverter::FULL);
|
||||||
std::string srcFullPath =
|
std::string srcFullPath =
|
||||||
this->Convert(source.GetFullPath(), cmLocalGenerator::FULL);
|
this->Convert(source.GetFullPath(), cmOutputConverter::FULL);
|
||||||
this->LocalGenerator->AddImplicitDepends(
|
this->LocalGenerator->AddImplicitDepends(
|
||||||
this->GeneratorTarget, lang, objFullPath.c_str(), srcFullPath.c_str());
|
this->GeneratorTarget, lang, objFullPath.c_str(), srcFullPath.c_str());
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
|
|
||||||
// Get the output paths for source and object files.
|
// Get the output paths for source and object files.
|
||||||
std::string sourceFile = this->Convert(
|
std::string sourceFile = this->Convert(
|
||||||
source.GetFullPath(), cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
source.GetFullPath(), cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
|
|
||||||
// Construct the build message.
|
// Construct the build message.
|
||||||
std::vector<std::string> no_commands;
|
std::vector<std::string> no_commands;
|
||||||
|
@ -502,13 +502,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
}
|
}
|
||||||
|
|
||||||
targetOutPathReal =
|
targetOutPathReal =
|
||||||
this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
targetOutPathPDB = this->Convert(targetFullPathPDB, cmLocalGenerator::NONE,
|
targetOutPathPDB = this->Convert(
|
||||||
cmLocalGenerator::SHELL);
|
targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
targetOutPathCompilePDB =
|
targetOutPathCompilePDB =
|
||||||
this->Convert(targetFullPathCompilePDB, cmLocalGenerator::START_OUTPUT,
|
this->Convert(targetFullPathCompilePDB, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
|
|
||||||
if (this->LocalGenerator->IsMinGWMake() &&
|
if (this->LocalGenerator->IsMinGWMake() &&
|
||||||
cmHasLiteralSuffix(targetOutPathCompilePDB, "\\")) {
|
cmHasLiteralSuffix(targetOutPathCompilePDB, "\\")) {
|
||||||
|
@ -527,15 +527,15 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
|
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
|
||||||
vars.Source = sourceFile.c_str();
|
vars.Source = sourceFile.c_str();
|
||||||
std::string shellObj =
|
std::string shellObj =
|
||||||
this->Convert(obj, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
this->Convert(obj, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
vars.Object = shellObj.c_str();
|
vars.Object = shellObj.c_str();
|
||||||
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
|
||||||
objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT,
|
objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.ObjectDir = objectDir.c_str();
|
vars.ObjectDir = objectDir.c_str();
|
||||||
std::string objectFileDir = cmSystemTools::GetFilenamePath(obj);
|
std::string objectFileDir = cmSystemTools::GetFilenamePath(obj);
|
||||||
objectFileDir = this->Convert(objectFileDir, cmLocalGenerator::START_OUTPUT,
|
objectFileDir = this->Convert(objectFileDir, cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.ObjectFileDir = objectFileDir.c_str();
|
vars.ObjectFileDir = objectFileDir.c_str();
|
||||||
vars.Flags = flags.c_str();
|
vars.Flags = flags.c_str();
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
this->LocalGenerator->ExpandRuleVariables(compileCommand, vars);
|
this->LocalGenerator->ExpandRuleVariables(compileCommand, vars);
|
||||||
std::string workingDirectory = this->LocalGenerator->Convert(
|
std::string workingDirectory = this->LocalGenerator->Convert(
|
||||||
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::FULL);
|
cmOutputConverter::FULL);
|
||||||
compileCommand.replace(compileCommand.find(langFlags), langFlags.size(),
|
compileCommand.replace(compileCommand.find(langFlags), langFlags.size(),
|
||||||
this->GetFlags(lang));
|
this->GetFlags(lang));
|
||||||
std::string langDefines = std::string("$(") + lang + "_DEFINES)";
|
std::string langDefines = std::string("$(") + lang + "_DEFINES)";
|
||||||
|
@ -637,7 +637,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
// Change the command working directory to the local build tree.
|
// Change the command working directory to the local build tree.
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
compileCommands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
compileCommands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), compileCommands.begin(),
|
commands.insert(commands.end(), compileCommands.begin(),
|
||||||
compileCommands.end());
|
compileCommands.end());
|
||||||
}
|
}
|
||||||
|
@ -687,8 +687,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
std::vector<std::string> preprocessCommands;
|
std::vector<std::string> preprocessCommands;
|
||||||
cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands);
|
cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands);
|
||||||
|
|
||||||
std::string shellObjI =
|
std::string shellObjI = this->Convert(objI, cmOutputConverter::NONE,
|
||||||
this->Convert(objI, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.PreprocessedSource = shellObjI.c_str();
|
vars.PreprocessedSource = shellObjI.c_str();
|
||||||
|
|
||||||
// Expand placeholders in the commands.
|
// Expand placeholders in the commands.
|
||||||
|
@ -700,7 +700,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
preprocessCommands,
|
preprocessCommands,
|
||||||
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), preprocessCommands.begin(),
|
commands.insert(commands.end(), preprocessCommands.begin(),
|
||||||
preprocessCommands.end());
|
preprocessCommands.end());
|
||||||
} else {
|
} else {
|
||||||
|
@ -735,8 +735,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
std::vector<std::string> assemblyCommands;
|
std::vector<std::string> assemblyCommands;
|
||||||
cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands);
|
cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands);
|
||||||
|
|
||||||
std::string shellObjS =
|
std::string shellObjS = this->Convert(objS, cmOutputConverter::NONE,
|
||||||
this->Convert(objS, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
vars.AssemblySource = shellObjS.c_str();
|
vars.AssemblySource = shellObjS.c_str();
|
||||||
|
|
||||||
// Expand placeholders in the commands.
|
// Expand placeholders in the commands.
|
||||||
|
@ -747,7 +747,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
|
||||||
|
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
assemblyCommands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
assemblyCommands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
commands.insert(commands.end(), assemblyCommands.begin(),
|
commands.insert(commands.end(), assemblyCommands.begin(),
|
||||||
assemblyCommands.end());
|
assemblyCommands.end());
|
||||||
} else {
|
} else {
|
||||||
|
@ -836,7 +836,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
|
||||||
this->GeneratorTarget);
|
this->GeneratorTarget);
|
||||||
this->LocalGenerator->CreateCDCommand(
|
this->LocalGenerator->CreateCDCommand(
|
||||||
commands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
commands, this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmOutputConverter::HOME_OUTPUT);
|
||||||
|
|
||||||
// Write the rule.
|
// Write the rule.
|
||||||
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, cleanTarget,
|
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, cleanTarget,
|
||||||
|
@ -879,8 +879,8 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
|
||||||
o != outputs.end(); ++o) {
|
o != outputs.end(); ++o) {
|
||||||
// Touch the extra output so "make" knows that it was updated,
|
// Touch the extra output so "make" knows that it was updated,
|
||||||
// but only if the output was acually created.
|
// but only if the output was acually created.
|
||||||
std::string const out = this->Convert(*o, cmLocalGenerator::HOME_OUTPUT,
|
std::string const out = this->Convert(*o, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
std::vector<std::string> output_commands;
|
std::vector<std::string> output_commands;
|
||||||
|
|
||||||
bool o_symbolic = false;
|
bool o_symbolic = false;
|
||||||
|
@ -988,7 +988,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
|
||||||
// translation table for the dependency scanning process.
|
// translation table for the dependency scanning process.
|
||||||
depCmd << "cd " << (this->LocalGenerator->Convert(
|
depCmd << "cd " << (this->LocalGenerator->Convert(
|
||||||
this->LocalGenerator->GetBinaryDirectory(),
|
this->LocalGenerator->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::FULL, cmLocalGenerator::SHELL))
|
cmOutputConverter::FULL, cmOutputConverter::SHELL))
|
||||||
<< " && ";
|
<< " && ";
|
||||||
#endif
|
#endif
|
||||||
// Generate a call this signature:
|
// Generate a call this signature:
|
||||||
|
@ -1003,19 +1003,19 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
|
||||||
depCmd << "$(CMAKE_COMMAND) -E cmake_depends \""
|
depCmd << "$(CMAKE_COMMAND) -E cmake_depends \""
|
||||||
<< this->GlobalGenerator->GetName() << "\" "
|
<< this->GlobalGenerator->GetName() << "\" "
|
||||||
<< this->Convert(this->LocalGenerator->GetSourceDirectory(),
|
<< this->Convert(this->LocalGenerator->GetSourceDirectory(),
|
||||||
cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
|
cmOutputConverter::FULL, cmOutputConverter::SHELL)
|
||||||
<< " "
|
<< " "
|
||||||
<< this->Convert(this->LocalGenerator->GetCurrentSourceDirectory(),
|
<< this->Convert(this->LocalGenerator->GetCurrentSourceDirectory(),
|
||||||
cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
|
cmOutputConverter::FULL, cmOutputConverter::SHELL)
|
||||||
<< " "
|
<< " "
|
||||||
<< this->Convert(this->LocalGenerator->GetBinaryDirectory(),
|
<< this->Convert(this->LocalGenerator->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
|
cmOutputConverter::FULL, cmOutputConverter::SHELL)
|
||||||
<< " "
|
<< " "
|
||||||
<< this->Convert(this->LocalGenerator->GetCurrentBinaryDirectory(),
|
<< this->Convert(this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
|
cmOutputConverter::FULL, cmOutputConverter::SHELL)
|
||||||
<< " "
|
<< " "
|
||||||
<< this->Convert(this->InfoFileNameFull, cmLocalGenerator::FULL,
|
<< this->Convert(this->InfoFileNameFull, cmOutputConverter::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
if (this->LocalGenerator->GetColorMakefile()) {
|
if (this->LocalGenerator->GetColorMakefile()) {
|
||||||
depCmd << " --color=$(COLOR)";
|
depCmd << " --color=$(COLOR)";
|
||||||
}
|
}
|
||||||
|
@ -1081,8 +1081,8 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile(
|
||||||
// Now append the actual user-specified commands.
|
// Now append the actual user-specified commands.
|
||||||
std::ostringstream content;
|
std::ostringstream content;
|
||||||
this->LocalGenerator->AppendCustomCommand(
|
this->LocalGenerator->AppendCustomCommand(
|
||||||
commands, ccg, this->GeneratorTarget, false, cmLocalGenerator::HOME_OUTPUT,
|
commands, ccg, this->GeneratorTarget, false,
|
||||||
&content);
|
cmOutputConverter::HOME_OUTPUT, &content);
|
||||||
|
|
||||||
// Collect the dependencies.
|
// Collect the dependencies.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
|
@ -1103,9 +1103,9 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile(
|
||||||
ccg.GetCC().GetImplicitDepends().begin();
|
ccg.GetCC().GetImplicitDepends().begin();
|
||||||
idi != ccg.GetCC().GetImplicitDepends().end(); ++idi) {
|
idi != ccg.GetCC().GetImplicitDepends().end(); ++idi) {
|
||||||
std::string objFullPath =
|
std::string objFullPath =
|
||||||
this->Convert(outputs[0], cmLocalGenerator::FULL);
|
this->Convert(outputs[0], cmOutputConverter::FULL);
|
||||||
std::string srcFullPath =
|
std::string srcFullPath =
|
||||||
this->Convert(idi->second, cmLocalGenerator::FULL);
|
this->Convert(idi->second, cmOutputConverter::FULL);
|
||||||
this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, idi->first,
|
this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, idi->first,
|
||||||
objFullPath.c_str(),
|
objFullPath.c_str(),
|
||||||
srcFullPath.c_str());
|
srcFullPath.c_str());
|
||||||
|
@ -1161,7 +1161,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable(
|
||||||
for (std::vector<std::string>::const_iterator i =
|
for (std::vector<std::string>::const_iterator i =
|
||||||
this->ExternalObjects.begin();
|
this->ExternalObjects.begin();
|
||||||
i != this->ExternalObjects.end(); ++i) {
|
i != this->ExternalObjects.end(); ++i) {
|
||||||
object = this->Convert(*i, cmLocalGenerator::START_OUTPUT);
|
object = this->Convert(*i, cmOutputConverter::START_OUTPUT);
|
||||||
*this->BuildFileStream << " " << lineContinue << "\n"
|
*this->BuildFileStream << " " << lineContinue << "\n"
|
||||||
<< this->Makefile->GetSafeDefinition(
|
<< this->Makefile->GetSafeDefinition(
|
||||||
"CMAKE_OBJECT_NAME");
|
"CMAKE_OBJECT_NAME");
|
||||||
|
@ -1195,7 +1195,7 @@ public:
|
||||||
{
|
{
|
||||||
// Construct the name of the next object.
|
// Construct the name of the next object.
|
||||||
this->NextObject = this->LocalGenerator->Convert(
|
this->NextObject = this->LocalGenerator->Convert(
|
||||||
obj, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::RESPONSE);
|
obj, cmOutputConverter::START_OUTPUT, cmOutputConverter::RESPONSE);
|
||||||
|
|
||||||
// Roll over to next string if the limit will be exceeded.
|
// Roll over to next string if the limit will be exceeded.
|
||||||
if (this->LengthLimit != std::string::npos &&
|
if (this->LengthLimit != std::string::npos &&
|
||||||
|
@ -1249,8 +1249,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(
|
||||||
std::string buildTargetRuleName = dir;
|
std::string buildTargetRuleName = dir;
|
||||||
buildTargetRuleName += relink ? "/preinstall" : "/build";
|
buildTargetRuleName += relink ? "/preinstall" : "/build";
|
||||||
buildTargetRuleName =
|
buildTargetRuleName =
|
||||||
this->Convert(buildTargetRuleName, cmLocalGenerator::HOME_OUTPUT,
|
this->Convert(buildTargetRuleName, cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::UNCHANGED);
|
||||||
|
|
||||||
// Build the list of target outputs to drive.
|
// Build the list of target outputs to drive.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
|
@ -1438,8 +1438,8 @@ void cmMakefileTargetGenerator::CreateLinkScript(
|
||||||
|
|
||||||
// Create the makefile command to invoke the link script.
|
// Create the makefile command to invoke the link script.
|
||||||
std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script ";
|
std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script ";
|
||||||
link_command += this->Convert(linkScriptName, cmLocalGenerator::START_OUTPUT,
|
link_command += this->Convert(
|
||||||
cmLocalGenerator::SHELL);
|
linkScriptName, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL);
|
||||||
link_command += " --verbose=$(VERBOSE)";
|
link_command += " --verbose=$(VERBOSE)";
|
||||||
makefile_commands.push_back(link_command);
|
makefile_commands.push_back(link_command);
|
||||||
makefile_depends.push_back(linkScriptName);
|
makefile_depends.push_back(linkScriptName);
|
||||||
|
@ -1496,8 +1496,8 @@ void cmMakefileTargetGenerator::CreateLinkLibs(
|
||||||
|
|
||||||
// Reference the response file.
|
// Reference the response file.
|
||||||
linkLibs = responseFlag;
|
linkLibs = responseFlag;
|
||||||
linkLibs +=
|
linkLibs += this->Convert(link_rsp, cmOutputConverter::NONE,
|
||||||
this->Convert(link_rsp, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1545,8 +1545,8 @@ void cmMakefileTargetGenerator::CreateObjectLists(
|
||||||
|
|
||||||
// Reference the response file.
|
// Reference the response file.
|
||||||
buildObjs += responseFlag;
|
buildObjs += responseFlag;
|
||||||
buildObjs += this->Convert(objects_rsp, cmLocalGenerator::NONE,
|
buildObjs += this->Convert(objects_rsp, cmOutputConverter::NONE,
|
||||||
cmLocalGenerator::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
} else if (useLinkScript) {
|
} else if (useLinkScript) {
|
||||||
if (!useArchiveRules) {
|
if (!useArchiveRules) {
|
||||||
|
|
|
@ -48,8 +48,8 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
|
||||||
<< "# Include the progress variables for this target.\n"
|
<< "# Include the progress variables for this target.\n"
|
||||||
<< this->GlobalGenerator->IncludeDirective << " " << root
|
<< this->GlobalGenerator->IncludeDirective << " " << root
|
||||||
<< this->Convert(this->ProgressFileNameFull,
|
<< this->Convert(this->ProgressFileNameFull,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmOutputConverter::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKERULE)
|
cmOutputConverter::MAKERULE)
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
|
||||||
!this->GetGeneratorTarget()->IsFrameworkOnApple()) {
|
!this->GetGeneratorTarget()->IsFrameworkOnApple()) {
|
||||||
std::string cmakeCommand =
|
std::string cmakeCommand =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL);
|
||||||
if (targetType == cmState::EXECUTABLE)
|
if (targetType == cmState::EXECUTABLE)
|
||||||
this->GetGlobalGenerator()->AddRule(
|
this->GetGlobalGenerator()->AddRule(
|
||||||
"CMAKE_SYMLINK_EXECUTABLE",
|
"CMAKE_SYMLINK_EXECUTABLE",
|
||||||
|
@ -304,7 +304,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
|
||||||
{
|
{
|
||||||
std::string cmakeCommand =
|
std::string cmakeCommand =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL);
|
||||||
linkCmds.push_back(cmakeCommand + " -E remove $TARGET_FILE");
|
linkCmds.push_back(cmakeCommand + " -E remove $TARGET_FILE");
|
||||||
}
|
}
|
||||||
// TODO: Use ARCHIVE_APPEND for archives over a certain size.
|
// TODO: Use ARCHIVE_APPEND for archives over a certain size.
|
||||||
|
@ -432,7 +432,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator();
|
cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator();
|
||||||
|
|
||||||
vars["TARGET_FILE"] =
|
vars["TARGET_FILE"] =
|
||||||
localGen.ConvertToOutputFormat(targetOutputReal, cmLocalGenerator::SHELL);
|
localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL);
|
||||||
|
|
||||||
localGen.GetTargetFlags(vars["LINK_LIBRARIES"], vars["FLAGS"],
|
localGen.GetTargetFlags(vars["LINK_LIBRARIES"], vars["FLAGS"],
|
||||||
vars["LINK_FLAGS"], frameworkPath, linkPath,
|
vars["LINK_FLAGS"], frameworkPath, linkPath,
|
||||||
|
@ -445,7 +445,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
name_of_def_file += ".def ";
|
name_of_def_file += ".def ";
|
||||||
vars["LINK_FLAGS"] += " /DEF:";
|
vars["LINK_FLAGS"] += " /DEF:";
|
||||||
vars["LINK_FLAGS"] += this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["LINK_FLAGS"] += this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
name_of_def_file.c_str(), cmLocalGenerator::SHELL);
|
name_of_def_file.c_str(), cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName);
|
this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName);
|
||||||
if (!install_dir.empty()) {
|
if (!install_dir.empty()) {
|
||||||
vars["INSTALLNAME_DIR"] = localGen.Convert(
|
vars["INSTALLNAME_DIR"] = localGen.Convert(
|
||||||
install_dir, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
|
install_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
|
|
||||||
if (!this->TargetNameImport.empty()) {
|
if (!this->TargetNameImport.empty()) {
|
||||||
const std::string impLibPath = localGen.ConvertToOutputFormat(
|
const std::string impLibPath = localGen.ConvertToOutputFormat(
|
||||||
targetOutputImplib, cmLocalGenerator::SHELL);
|
targetOutputImplib, cmOutputConverter::SHELL);
|
||||||
vars["TARGET_IMPLIB"] = impLibPath;
|
vars["TARGET_IMPLIB"] = impLibPath;
|
||||||
EnsureParentDirectoryExists(impLibPath);
|
EnsureParentDirectoryExists(impLibPath);
|
||||||
if (genTarget.HasImportLibrary()) {
|
if (genTarget.HasImportLibrary()) {
|
||||||
|
@ -526,7 +526,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
|
|
||||||
const std::string objPath = GetGeneratorTarget()->GetSupportDirectory();
|
const std::string objPath = GetGeneratorTarget()->GetSupportDirectory();
|
||||||
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
this->ConvertToNinjaPath(objPath), cmLocalGenerator::SHELL);
|
this->ConvertToNinjaPath(objPath), cmOutputConverter::SHELL);
|
||||||
EnsureDirectoryExists(objPath);
|
EnsureDirectoryExists(objPath);
|
||||||
|
|
||||||
if (this->GetGlobalGenerator()->IsGCCOnWindows()) {
|
if (this->GetGlobalGenerator()->IsGCCOnWindows()) {
|
||||||
|
@ -565,20 +565,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
|
if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
|
||||||
std::string cmakeCommand =
|
std::string cmakeCommand =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL);
|
||||||
std::string name_of_def_file = gt.GetSupportDirectory();
|
std::string name_of_def_file = gt.GetSupportDirectory();
|
||||||
name_of_def_file += "/" + gt.GetName();
|
name_of_def_file += "/" + gt.GetName();
|
||||||
name_of_def_file += ".def";
|
name_of_def_file += ".def";
|
||||||
std::string cmd = cmakeCommand;
|
std::string cmd = cmakeCommand;
|
||||||
cmd += " -E __create_def ";
|
cmd += " -E __create_def ";
|
||||||
cmd += this->GetLocalGenerator()->ConvertToOutputFormat(
|
cmd += this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
name_of_def_file.c_str(), cmLocalGenerator::SHELL);
|
name_of_def_file.c_str(), cmOutputConverter::SHELL);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
cmNinjaDeps objs = this->GetObjects();
|
cmNinjaDeps objs = this->GetObjects();
|
||||||
std::string obj_list_file = name_of_def_file;
|
std::string obj_list_file = name_of_def_file;
|
||||||
obj_list_file += ".objs";
|
obj_list_file += ".objs";
|
||||||
cmd += this->GetLocalGenerator()->ConvertToOutputFormat(
|
cmd += this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
obj_list_file.c_str(), cmLocalGenerator::SHELL);
|
obj_list_file.c_str(), cmOutputConverter::SHELL);
|
||||||
preLinkCmdLines.push_back(cmd);
|
preLinkCmdLines.push_back(cmd);
|
||||||
// create a list of obj files for the -E __create_def to read
|
// create a list of obj files for the -E __create_def to read
|
||||||
cmGeneratedFileStream fout(obj_list_file.c_str());
|
cmGeneratedFileStream fout(obj_list_file.c_str());
|
||||||
|
@ -593,7 +593,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
// the link commands.
|
// the link commands.
|
||||||
if (!preLinkCmdLines.empty()) {
|
if (!preLinkCmdLines.empty()) {
|
||||||
const std::string homeOutDir = localGen.ConvertToOutputFormat(
|
const std::string homeOutDir = localGen.ConvertToOutputFormat(
|
||||||
localGen.GetBinaryDirectory(), cmLocalGenerator::SHELL);
|
localGen.GetBinaryDirectory(), cmOutputConverter::SHELL);
|
||||||
preLinkCmdLines.push_back("cd " + homeOutDir);
|
preLinkCmdLines.push_back("cd " + homeOutDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,10 +274,10 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
|
||||||
}
|
}
|
||||||
|
|
||||||
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
ConvertToNinjaPath(pdbPath), cmLocalGenerator::SHELL);
|
ConvertToNinjaPath(pdbPath), cmOutputConverter::SHELL);
|
||||||
vars["TARGET_COMPILE_PDB"] =
|
vars["TARGET_COMPILE_PDB"] =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
ConvertToNinjaPath(compilePdbPath), cmLocalGenerator::SHELL);
|
ConvertToNinjaPath(compilePdbPath), cmOutputConverter::SHELL);
|
||||||
|
|
||||||
EnsureParentDirectoryExists(pdbPath);
|
EnsureParentDirectoryExists(pdbPath);
|
||||||
EnsureParentDirectoryExists(compilePdbPath);
|
EnsureParentDirectoryExists(compilePdbPath);
|
||||||
|
@ -383,7 +383,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
|
||||||
const char* tidy = this->GeneratorTarget->GetProperty(tidy_prop);
|
const char* tidy = this->GeneratorTarget->GetProperty(tidy_prop);
|
||||||
if ((iwyu && *iwyu) || (tidy && *tidy)) {
|
if ((iwyu && *iwyu) || (tidy && *tidy)) {
|
||||||
std::string run_iwyu = this->GetLocalGenerator()->ConvertToOutputFormat(
|
std::string run_iwyu = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL);
|
||||||
run_iwyu += " -E __run_iwyu";
|
run_iwyu += " -E __run_iwyu";
|
||||||
if (iwyu && *iwyu) {
|
if (iwyu && *iwyu) {
|
||||||
run_iwyu += " --iwyu=";
|
run_iwyu += " --iwyu=";
|
||||||
|
@ -584,9 +584,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
||||||
EnsureParentDirectoryExists(objectFileName);
|
EnsureParentDirectoryExists(objectFileName);
|
||||||
|
|
||||||
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
objectDir, cmLocalGenerator::SHELL);
|
objectDir, cmOutputConverter::SHELL);
|
||||||
vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
objectFileDir, cmLocalGenerator::SHELL);
|
objectFileDir, cmOutputConverter::SHELL);
|
||||||
|
|
||||||
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(),
|
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(),
|
||||||
vars);
|
vars);
|
||||||
|
@ -634,7 +634,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
|
||||||
}
|
}
|
||||||
|
|
||||||
escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat(
|
escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat(
|
||||||
escapedSourceFileName, cmLocalGenerator::SHELL);
|
escapedSourceFileName, cmOutputConverter::SHELL);
|
||||||
|
|
||||||
compileObjectVars.Source = escapedSourceFileName.c_str();
|
compileObjectVars.Source = escapedSourceFileName.c_str();
|
||||||
compileObjectVars.Object = objectFileName.c_str();
|
compileObjectVars.Object = objectFileName.c_str();
|
||||||
|
|
|
@ -111,14 +111,14 @@ void cmNinjaUtilityTargetGenerator::Generate()
|
||||||
this->GetLocalGenerator()
|
this->GetLocalGenerator()
|
||||||
->ConvertToOutputFormat(
|
->ConvertToOutputFormat(
|
||||||
this->GetLocalGenerator()->GetSourceDirectory(),
|
this->GetLocalGenerator()->GetSourceDirectory(),
|
||||||
cmLocalGenerator::SHELL)
|
cmOutputConverter::SHELL)
|
||||||
.c_str());
|
.c_str());
|
||||||
cmSystemTools::ReplaceString(
|
cmSystemTools::ReplaceString(
|
||||||
command, "$(CMAKE_BINARY_DIR)",
|
command, "$(CMAKE_BINARY_DIR)",
|
||||||
this->GetLocalGenerator()
|
this->GetLocalGenerator()
|
||||||
->ConvertToOutputFormat(
|
->ConvertToOutputFormat(
|
||||||
this->GetLocalGenerator()->GetBinaryDirectory(),
|
this->GetLocalGenerator()->GetBinaryDirectory(),
|
||||||
cmLocalGenerator::SHELL)
|
cmOutputConverter::SHELL)
|
||||||
.c_str());
|
.c_str());
|
||||||
cmSystemTools::ReplaceString(command, "$(ARGS)", "");
|
cmSystemTools::ReplaceString(command, "$(ARGS)", "");
|
||||||
|
|
||||||
|
|
|
@ -2404,8 +2404,8 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
|
||||||
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
|
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
|
||||||
if (l->IsPath) {
|
if (l->IsPath) {
|
||||||
std::string path = this->LocalGenerator->Convert(
|
std::string path = this->LocalGenerator->Convert(
|
||||||
l->Value.c_str(), cmLocalGenerator::START_OUTPUT,
|
l->Value.c_str(), cmOutputConverter::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED);
|
cmOutputConverter::UNCHANGED);
|
||||||
this->ConvertToWindowsSlash(path);
|
this->ConvertToWindowsSlash(path);
|
||||||
libVec.push_back(path);
|
libVec.push_back(path);
|
||||||
} else if (!l->Target ||
|
} else if (!l->Target ||
|
||||||
|
|
Loading…
Reference in New Issue