diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 1227fdf263380097f4c6a09d591b904957cce0cb..7bf656775245f0ce23fc8d66494fe1db3747d50f 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -32,7 +32,7 @@ set(CMAKE_INCLUDE_FLAG_RC "-I") # compile a Resource file into an object file if(NOT CMAKE_RC_COMPILE_OBJECT) set(CMAKE_RC_COMPILE_OBJECT - " /fo ") + " /fo ") endif() # set this variable so we can avoid loading this more than once. diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 1a10666c570321b84d88e306168abf0e921f9ad8..19d0d38438c186e322078c33f175df233c71ce5d 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -276,7 +276,7 @@ int main() std::string clrest = rest; // rc: /fo x.dir\x.rc.res -> cl: /out:x.dir\x.rc.res.dep.obj - clrest = replace(clrest, "/fo", "/out:"); + clrest = replace(clrest, "/fo ", "/out:"); clrest = replace(clrest, objfile, objfile + ".dep.obj "); cl = "\"" + cl + "\" /P /DRC_INVOKED /TC "; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index adfce37441ef4ee4f2838f93a448c956100a72c2..28f5e080a80db9883a4c3ca37a466211db17c2ca 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1830,7 +1830,8 @@ int cmVSLink::LinkIncremental() // Compile the resource file. std::vector rcCommand; rcCommand.push_back(this->RcPath.empty() ? "rc" : this->RcPath); - rcCommand.push_back("/fo" + this->ManifestFileRes); + rcCommand.emplace_back("/fo"); + rcCommand.push_back(this->ManifestFileRes); rcCommand.push_back(this->ManifestFileRC); if (!RunCommand("RC Pass 1", rcCommand, this->Verbose, FORMAT_DECIMAL)) { return -1;