summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-11 06:55:00 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-11 06:55:00 (GMT)
commit3a2c8e8e666ebf63c20d933cc255237a18153867 (patch)
tree3a318d04a212a0fb153bf6985d6252a9faa5a785 /Source/cmNinjaNormalTargetGenerator.cxx
parent3856e6698eb80d4ee3d8d7606c16e5fa3a2bef8c (diff)
downloadCMake-3a2c8e8e666ebf63c20d933cc255237a18153867.zip
CMake-3a2c8e8e666ebf63c20d933cc255237a18153867.tar.gz
CMake-3a2c8e8e666ebf63c20d933cc255237a18153867.tar.bz2
Ninja: disable work around when linking with mingw
The work around is only needed by older GCCs (only testet 4.4/4.7) Ninja is very new so chances are high that there is also a new mingw. Use slashes in link rsp file, because ar.exe can't handle \.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 1fd6a16..f6f235c 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -18,6 +18,7 @@
#include "cmMakefile.h"
#include <assert.h>
+#include <algorithm>
cmNinjaNormalTargetGenerator::
cmNinjaNormalTargetGenerator(cmTarget* target)
@@ -367,8 +368,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
outputs.push_back(targetOutputReal);
// Compute specific libraries to link with.
- cmNinjaDeps explicitDeps = this->GetObjects(),
- implicitDeps = this->ComputeLinkDeps();
+ cmNinjaDeps explicitDeps = this->GetObjects();
+ cmNinjaDeps implicitDeps = this->ComputeLinkDeps();
this->GetLocalGenerator()->GetTargetFlags(vars["LINK_LIBRARIES"],
vars["FLAGS"],
@@ -434,6 +435,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
path = GetTarget()->GetSupportDirectory();
vars["OBJECT_DIR"] = ConvertToNinjaPath(path.c_str());
EnsureDirectoryExists(path);
+ // ar.exe can't handle backslashes in rsp files (implictly used by gcc)
+ std::string& linkLibraries = vars["LINK_LIBRARIES"];
+ std::replace(linkLibraries.begin(), linkLibraries.end(), '\\', '/');
}
std::vector<cmCustomCommand> *cmdLists[3] = {