Avoid parallel reading/writing of RegExpJitTables.h
authorKai Koehne <kai.koehne@theqtcompany.com>
Mon, 20 Oct 2014 13:24:47 +0000 (15:24 +0200)
committerKai Koehne <kai.koehne@theqtcompany.com>
Wed, 1 Apr 2015 10:02:53 +0000 (10:02 +0000)
RegExpJitTables.h is created in the build directory at compilation time.
This creates problems if debug and release targets are built
in parallel: They might overwrite each other's results, letting the
compiler see intermediate content.

Avoid this by using separate directories for the debug and release build.

Change-Id: I54fee7cb727a1c1777af8e0d5d19a71fdc3aac68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
src/3rdparty/masm/masm.pri

index 3655af36b62daa0e1883459afe5a5ddd399763ad..3497650f0cc2ae3b6a443af0d1303e4bf2eada38 100644 (file)
@@ -63,7 +63,20 @@ HEADERS += $$PWD/disassembler/ARMv7/ARMv7DOpcode.h
 SOURCES += $$PWD/yarr/*.cpp
 HEADERS += $$PWD/yarr/*.h
 
-retgen.output = RegExpJitTables.h
+#
+# Generate RegExpJitTables.h
+#
+GENERATEDDIR = .generated
+debug_and_release {
+    CONFIG(debug, debug|release) {
+        GENERATEDDIR = $$GENERATEDDIR/debug
+    } else {
+        GENERATEDDIR = $$GENERATEDDIR/release
+    }
+}
+INCLUDEPATH += $$GENERATEDDIR
+
+retgen.output = $$GENERATEDDIR/RegExpJitTables.h
 retgen.script = $$PWD/create_regex_tables
 retgen.input = retgen.script
 retgen.CONFIG += no_link