diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-19 21:11:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-25 13:20:09 (GMT) |
commit | 25d1ef6424e0b06687739c91a646633ab9aaf861 (patch) | |
tree | 9e2f9815008c77ec866f88904d2e7c1b8339004e /Source/cmLocalNinjaGenerator.cxx | |
parent | c75d91a05c9f442582726e3e80fec41d016da76f (diff) | |
download | CMake-25d1ef6424e0b06687739c91a646633ab9aaf861.zip CMake-25d1ef6424e0b06687739c91a646633ab9aaf861.tar.gz CMake-25d1ef6424e0b06687739c91a646633ab9aaf861.tar.bz2 |
Use enums defined in cmOutputConverter using their fully qualified name.
Mostly automated:
values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
"OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
"FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c7e1a90f8..270e6d3 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -41,8 +41,8 @@ void cmLocalNinjaGenerator::Generate() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = - this->Convert(this->GetCurrentBinaryDirectory(), HOME_OUTPUT); + this->HomeRelativeOutputPath = this->Convert( + this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath = ""; } @@ -121,16 +121,19 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib, OutputFormat format) + std::string const& lib, cmOutputConverter::OutputFormat format) { std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); return this->ConvertToOutputFormat(path, format); } 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. @@ -338,7 +341,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines( #else std::string cdStr = "cd "; #endif - cdCmd << cdStr << this->ConvertToOutputFormat(wd, SHELL); + cdCmd << cdStr + << this->ConvertToOutputFormat(wd, cmOutputConverter::SHELL); cmdLines.push_back(cdCmd.str()); } @@ -346,7 +350,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines( for (unsigned i = 0; i != ccg.GetNumberOfCommands(); ++i) { cmdLines.push_back(launcher + - this->ConvertToOutputFormat(ccg.GetCommand(i), SHELL)); + this->ConvertToOutputFormat(ccg.GetCommand(i), + cmOutputConverter::SHELL)); std::string& cmd = cmdLines.back(); ccg.AppendArguments(i, cmd); @@ -473,10 +478,12 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string output; const std::vector<std::string>& outputs = ccg.GetOutputs(); if (!outputs.empty()) { - RelativeRoot relative_root = - ccg.GetWorkingDirectory().empty() ? START_OUTPUT : NONE; + cmOutputConverter::RelativeRoot relative_root = + 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(); |