diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2012-03-14 22:01:01 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2012-03-14 22:01:01 +0000 |
| commit | 19c4f9b355d2cabf8b781d70178f1689ade3214b (patch) | |
| tree | 137cc59636f6be042a4259ec2370d456f6e6fdc0 /buildtool.cpp | |
| parent | buildtool: allow parallel builds with btool -j :) (diff) | |
| download | inkscape-19c4f9b355d2cabf8b781d70178f1689ade3214b.tar.gz inkscape-19c4f9b355d2cabf8b781d70178f1689ade3214b.zip | |
buildtool: don't create build output folders in parallel. superfast in series, so no need, and bugs in parallel.
(bzr r11088)
Diffstat (limited to 'buildtool.cpp')
| -rw-r--r-- | buildtool.cpp | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/buildtool.cpp b/buildtool.cpp index bc04d6815..a106f206d 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -6984,7 +6984,30 @@ public: dname.append(dirName); incs.append(parent.resolve(dname)); } - + +// First create all directories, fails if done in OpenMP parallel loop below... goes superfast anyway, so don't optimize + for (unsigned int fi = 0; fi < deps.size() ; ++fi) + { + DepRec dep = deps[fi]; + + //## Make paths + String destPath = dest; + if (dep.path.size()>0) + { + destPath.append("/"); + destPath.append(dep.path); + } + //## Make sure destination directory exists + if (!createDirectory(destPath)) + { + taskstatus("problem creating folder: %s", destPath.c_str()); + if (f) { + fclose(f); + } + return false; + } + } + /** * Compile each of the C files that need it */ @@ -7016,20 +7039,6 @@ public: srcPath.append("/"); srcPath.append(dep.path); } - //## Make sure destination directory exists - if (!createDirectory(destPath)) - { - taskstatus("problem creating folder: %s", destPath.c_str()); - errorOccurred = true; -#ifdef _OPENMP // figure out a way to break the loop here with OpenMP - continue; // terminate this for-loop -#else - if (f) { - fclose(f); - } - return false; -#endif - } //## Check whether it needs to be done String destName; |
