summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/resolve_config.prf
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-08 19:41:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-25 20:50:51 +0200
commitc760d2dbfdaf743052be620f58c1f123420e9086 (patch)
tree40965f1d1b4a655b81605dd617b391e21e7925eb /mkspecs/features/resolve_config.prf
parent25650923b10bfd9a5f6b7c05c365eeb602023357 (diff)
Rewrite qmake's exclusive-build feature
We used to compute the default exclusive build directory, eg 'debug', at configure time, and then set OBJECTS_DIR, MOC_DIR, etc to include this hard-coded default exclusive build directory. We then had to run a post- process step where we replaced the 'debug' part with the current actual exclusive build pass, eg 'release', resulting in long-standing bugs such as QTBUG-491 where we end up replacing parts of the build output dirs that were not part of the original exclusive build directory. We now set the OBJECTS_DIR, MOC_DIR, etc defaults in configure like before, but they do not include any exclusive-build information. The exclusive build directory is handled as a separate step in default_post where we adjust all entries in QMAKE_DIR_REPLACE to be exclusive directories. For backwards compatibility the new exclusive build behavior is only enabled for variables named by QMAKE_DIR_REPLACE_SANE, which for Qt itself applies globally to everything but DESTDIR, and for libs and tools also applies to DESTDIR. The reason for leaving out DESTDIR in the general case is because many tests and examples assume the old behavior for DESTDIR. A side effect of including all the other variables for Qt libs and tools is that the PCH output dir will be uniformly set, which has been an issue on Windows in the past. The addExclusiveBuilds function now takes two or more arguments, each argument being the key for an exclusive build, which can be customized eg. using $$key.{name,target,dir_affix}. Passing more than two arguments results in three/four/etc-way exclusive builds, eg debug/release/profile. Exclusive builds can also be combined, eg static/shared + debug/release by making two calls to the function. We also handle individual targets of combined exclusive builds, eg static/shared + debug/release, meaning it is possible to run 'make debug' to build both static-debug and shared-debug. Task-number: QTBUG-491 Change-Id: I02841dbbd065ac07d413dfb45cfcfe4c013674ac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features/resolve_config.prf')
-rw-r--r--mkspecs/features/resolve_config.prf19
1 files changed, 3 insertions, 16 deletions
diff --git a/mkspecs/features/resolve_config.prf b/mkspecs/features/resolve_config.prf
index 3884598a94..7835fe4f7c 100644
--- a/mkspecs/features/resolve_config.prf
+++ b/mkspecs/features/resolve_config.prf
@@ -22,14 +22,8 @@ CONFIG(static, static|shared) {
contains(TEMPLATE, ".*lib"): CONFIG += dll
}
-static_and_shared {
- !macx-xcode: addExclusiveBuilds(static, Static, shared, Shared)
-} else: fix_output_dirs {
- static: \
- fixExclusiveOutputDirs(static, shared)
- else: \
- fixExclusiveOutputDirs(shared, static)
-}
+!macx-xcode: \
+ addExclusiveBuilds(shared, static)
CONFIG(debug, debug|release): \
CONFIG -= release
@@ -37,14 +31,7 @@ else: \
CONFIG -= debug
!macx-xcode {
- debug_and_release {
- addExclusiveBuilds(debug, Debug, release, Release)
- } else: fix_output_dirs {
- debug: \
- fixExclusiveOutputDirs(debug, release)
- else: \
- fixExclusiveOutputDirs(release, debug)
- }
+ addExclusiveBuilds(debug, release)
} else {
# The Xcode generator always generates project files with
# debug and release configurations, regardless of whether