On 02.06.2012 12:03, Peter Kümmel wrote:
Hi Claus,
great you've started working on this!
I fixed your TODO and pusjed it to stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=242f152c392882c88c47f4bcc3dc52a3431d2968
CMake could now be build with msvc and mingw (when CMAKE_RC_COMPILER is set).
But it breaks mingw, because ar.exe doesn't like single backslashes in the rsp
file.
With attached patch also mingw works. At least with -j1, otherwise there a
access conflicts.
I've no idea how other build systems handle this.
Peter
diff --git a/src/graph.cc b/src/graph.cc
index 3531e86..392722a 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -26,6 +26,8 @@
#include "state.h"
#include "util.h"
+#include <algorithm>
+
bool Node::Stat(DiskInterface* disk_interface) {
METRIC_RECORD("node stat");
mtime_ = disk_interface->Stat(path_);
@@ -252,7 +254,11 @@ string Edge::GetRspFile() {
string Edge::GetRspFileContent() {
EdgeEnv env(this);
- return rule_->rspfile_content().Evaluate(&env);
+ string content = rule_->rspfile_content().Evaluate(&env);
+#if _WIN32
+ std::replace(content.begin(), content.end(), '\\', '/');
+#endif
+ return content;
}
bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface,
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake