summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-02 11:56:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-02 11:57:06 (GMT)
commita052479a5c75cc4e892fe68002bc0a4d97013a66 (patch)
treedb054a0e64f0abe2bc9292b6f9dccbcdb74d3334 /Source/cmcmd.cxx
parent9578c3f0d18a5407a3106a6c487115947d1355e4 (diff)
parentbd9bfc644954a48b1bf7ea18fc260a1231840671 (diff)
downloadCMake-a052479a5c75cc4e892fe68002bc0a4d97013a66.zip
CMake-a052479a5c75cc4e892fe68002bc0a4d97013a66.tar.gz
CMake-a052479a5c75cc4e892fe68002bc0a4d97013a66.tar.bz2
Merge topic 'msvc-custom-rc-mt'
bd9bfc6449 MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe} 0033676796 CUDA: Enable RC language on Windows 02f566a559 MSVC: Factor out enable_language(RC) call into helper macro b601bb6f1c CUDA: Find CMAKE_LINKER on Windows 3eebe28ef4 cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpander Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2424
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index e2225ff..8a140e8 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1521,6 +1521,8 @@ class cmVSLink
std::string ManifestFileRC;
std::string ManifestFileRes;
std::string TargetFile;
+ std::string MtPath;
+ std::string RcPath;
public:
cmVSLink(int type, bool verbose)
@@ -1664,6 +1666,12 @@ bool cmVSLink::Parse(std::vector<std::string>::const_iterator argBeg,
} else if (cmHasLiteralPrefix(*arg, "--intdir=")) {
intDir = arg->substr(9);
++arg;
+ } else if (cmHasLiteralPrefix(*arg, "--rc=")) {
+ this->RcPath = arg->substr(5);
+ ++arg;
+ } else if (cmHasLiteralPrefix(*arg, "--mt=")) {
+ this->MtPath = arg->substr(5);
+ ++arg;
} else {
std::cerr << "unknown argument '" << *arg << "'\n";
return false;
@@ -1803,7 +1811,7 @@ int cmVSLink::LinkIncremental()
// Compile the resource file.
std::vector<std::string> rcCommand;
- rcCommand.push_back("rc");
+ rcCommand.push_back(this->RcPath.empty() ? "rc" : this->RcPath);
rcCommand.push_back("/fo" + this->ManifestFileRes);
rcCommand.push_back(this->ManifestFileRC);
if (!RunCommand("RC Pass 1", rcCommand, this->Verbose, FORMAT_DECIMAL)) {
@@ -1862,7 +1870,7 @@ int cmVSLink::LinkNonIncremental()
int cmVSLink::RunMT(std::string const& out, bool notify)
{
std::vector<std::string> mtCommand;
- mtCommand.push_back("mt");
+ mtCommand.push_back(this->MtPath.empty() ? "mt" : this->MtPath);
mtCommand.push_back("/nologo");
mtCommand.push_back("/manifest");
if (this->LinkGeneratesManifest) {