diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-08-27 11:44:53 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-08-27 13:16:50 (GMT) |
commit | 112c87b28afac71617bcbb552ae1f2027bb548b6 (patch) | |
tree | 7b0f053a343bffcd5a0beb98ef8b6fb43545696c /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | cd351ef2c427284eea0ab494eba5d4f24bc0e050 (diff) | |
download | CMake-112c87b28afac71617bcbb552ae1f2027bb548b6.zip CMake-112c87b28afac71617bcbb552ae1f2027bb548b6.tar.gz CMake-112c87b28afac71617bcbb552ae1f2027bb548b6.tar.bz2 |
Makefiles: Replace method with Wacom specific API
The existing method uses RelativeRoot NONE and FULL values. In
principle, those should be segregated interfaces. Mixing
NONE and FULL into the RelativeRoot enum is a case of
http://thedailywtf.com/articles/What_Is_Truth_0x3f_
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f2ef5c8..f026b12 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -592,8 +592,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( } } -std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand( - std::string const& cmd, cmOutputConverter::RelativeRoot root) +std::string cmLocalUnixMakefileGenerator3::MaybeConvertWatcomShellCommand( + std::string const& cmd) { if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) && cmd.find_first_of("( )") != cmd.npos) { @@ -606,7 +606,7 @@ std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand( cmOutputConverter::SHELL); } } - return this->Convert(cmd, root, cmOutputConverter::SHELL); + return std::string(); } void cmLocalUnixMakefileGenerator3::WriteMakeVariables( @@ -638,8 +638,13 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( #endif } - std::string cmakeShellCommand = this->ConvertShellCommand( - cmSystemTools::GetCMakeCommand(), cmOutputConverter::FULL); + std::string cmakeShellCommand = + this->MaybeConvertWatcomShellCommand(cmSystemTools::GetCMakeCommand()); + if (cmakeShellCommand.empty()) { + cmakeShellCommand = + this->Convert(cmSystemTools::GetCMakeCommand(), cmOutputConverter::FULL, + cmOutputConverter::SHELL); + } /* clang-format off */ makefileStream @@ -975,7 +980,12 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string launcher = this->MakeLauncher( ccg, target, workingDir.empty() ? cmOutputConverter::START_OUTPUT : cmOutputConverter::NONE); - cmd = launcher + this->ConvertShellCommand(cmd, cmOutputConverter::NONE); + std::string shellCommand = this->MaybeConvertWatcomShellCommand(cmd); + if (shellCommand.empty()) { + shellCommand = this->Convert(cmd, cmOutputConverter::NONE, + cmOutputConverter::SHELL); + } + cmd = launcher + shellCommand; ccg.AppendArguments(c, cmd); if (content) { |