qt5base-lts/mkspecs/features/exclusive_builds.prf
Simon Hausmann 84c71207ae Fix debug_and_release builds with CONFIG += qtquickcompiler
For correct debug/ and release/ suffix substitution and thus avoid
concurrent access to generated files, we have to declare the output
directory variable used by qtquickcompiler.prf in qtdeclarative here and
enable it for substitution.

Change-Id: Id8483daffdf1b9990396c55f7bc0d08a2f65cafd
Task-number: QTBUG-66675
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-29 23:24:24 +00:00

43 lines
1.1 KiB
Plaintext

defineTest(addExclusiveBuildsProper) {
!$$1:!fix_output_dirs: \
return(true)
for(build, 2) {
isEmpty($${build}.name) {
$${build}.name = $$title($$build)
export($${build}.name)
}
isEmpty($${build}.target) {
$${build}.target = $$lower($$build)
export($${build}.target)
}
isEmpty($${build}.dir_affix) {
$${build}.dir_affix = $$lower($$build)
export($${build}.dir_affix)
}
$${build}.exclusive = $$2
export($${build}.exclusive)
QMAKE_EXCLUSIVE_BUILDS += $$build
}
CONFIG *= exclusive_builds
export(CONFIG)
export(QMAKE_EXCLUSIVE_BUILDS)
return(true)
}
defineTest(addExclusiveBuilds) {
lessThan(ARGC, 2): \
error("addExclusiveBuilds() requires at least two arguments")
addExclusiveBuildsProper($$join(ARGS, _and_), $$ARGS)
}
# Default directories to process
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR TRACEGEN_DIR QMLCACHE_DIR
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR