summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-10-07 20:16:58 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2016-11-17 19:34:09 +0000
commit35953be53bfe06f01f6b8cfde70d7e793341e481 (patch)
tree1deba96b0089a7fea67b5ce901c482f3ebe72879
parent3654a401f8e046e2fa5a340d0380cc0088a03048 (diff)
fix xcodebuilds without -sdk iphonesimulator
the order of the arguments passed to addExclusiveBuilds() determines the name of the CONFIG flag which actually enables the mode. that is historically fixed to iphonesimulator_and_iphoneos and we cannot just change the order. to get around this, add a new "overload" of the function which allows specifying the flag independently from the order of the builds, and make use of it in ios' resolve_config.prf. amends d2b4a789c. Change-Id: Ia3fabea0c0c30beae680b57e75bdcdf35ef6503d (cherry picked from 59985b3c291f769cfc24cf361367757fce229397) Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--mkspecs/features/exclusive_builds.prf18
-rw-r--r--mkspecs/macx-ios-clang/features/resolve_config.prf4
2 files changed, 13 insertions, 9 deletions
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf
index 5d06198ae4..f40cc99172 100644
--- a/mkspecs/features/exclusive_builds.prf
+++ b/mkspecs/features/exclusive_builds.prf
@@ -1,12 +1,9 @@
-defineTest(addExclusiveBuilds) {
- lessThan(ARGC, 2): \
- error("addExclusiveBuilds() requires at least two arguments")
-
- !$$join(ARGS, _and_):!fix_output_dirs: \
+defineTest(addExclusiveBuildsProper) {
+ !$$1:!fix_output_dirs: \
return(true)
- for(build, ARGS) {
+ for(build, 2) {
isEmpty($${build}.name) {
$${build}.name = $$title($$build)
export($${build}.name)
@@ -20,7 +17,7 @@ defineTest(addExclusiveBuilds) {
export($${build}.dir_affix)
}
- $${build}.exclusive = $$ARGS
+ $${build}.exclusive = $$2
export($${build}.exclusive)
QMAKE_EXCLUSIVE_BUILDS += $$build
@@ -33,6 +30,13 @@ defineTest(addExclusiveBuilds) {
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
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR
diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf
index a964ee3278..22d962af38 100644
--- a/mkspecs/macx-ios-clang/features/resolve_config.prf
+++ b/mkspecs/macx-ios-clang/features/resolve_config.prf
@@ -32,9 +32,9 @@ macx-xcode {
} else {
# Switch the order to make sure that the first Makefile target is the right one
!contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
- addExclusiveBuilds(simulator, device)
+ addExclusiveBuildsProper(simulator_and_device, simulator device)
else: \
- addExclusiveBuilds(device, simulator)
+ addExclusiveBuildsProper(simulator_and_device, device simulator)
}
equals(TEMPLATE, subdirs) {