From 16a421aa834dde5b8dd276444718053b8842f894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 24 Aug 2016 14:01:05 +0200 Subject: Xcode: Don't enable document versioning debugging It results in passing an option on the command line that e.g. the QCommandLineParser doesn't understand. Change-Id: Ied08c930fab479b6432f025dfe861bdf22c513e6 Reviewed-by: Richard Moe Gustavsen --- mkspecs/macx-xcode/default.xcscheme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/macx-xcode/default.xcscheme b/mkspecs/macx-xcode/default.xcscheme index ab2f6a8ab7..6beb0d8280 100644 --- a/mkspecs/macx-xcode/default.xcscheme +++ b/mkspecs/macx-xcode/default.xcscheme @@ -62,7 +62,7 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Debug" ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "YES" + debugDocumentVersioning = "NO" allowLocationSimulation = "YES"> + debugDocumentVersioning = "NO"> Date: Mon, 25 Jul 2016 14:02:43 +0200 Subject: iOS, mkspec: update UUID parsing to support Xcode 8 beta MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "simctl list devices" has changed output format in Xcode 8 beta to include additional information placed inside parentheses for each device. And this confuses the scripts we use to parse and find UUIDs. Instead of making the inline scripts even longer and more complex, this patch will factor most of it out to a separate perl script that reads out device information on json format and parses the UUID. Change-Id: I3cd4dc276ecda030fda1932073c8bf1e0bc85deb Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- mkspecs/macx-ios-clang/ios_destinations.sh | 3 +- mkspecs/macx-ios-clang/ios_devices.pl | 50 ++++++++++++++++++++++++++++++ mkspecs/macx-ios-clang/xcodebuild.mk | 5 +-- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100755 mkspecs/macx-ios-clang/ios_devices.pl (limited to 'mkspecs') diff --git a/mkspecs/macx-ios-clang/ios_destinations.sh b/mkspecs/macx-ios-clang/ios_destinations.sh index ce6b238a65..b85f59ca30 100755 --- a/mkspecs/macx-ios-clang/ios_destinations.sh +++ b/mkspecs/macx-ios-clang/ios_destinations.sh @@ -33,7 +33,8 @@ ## ############################################################################# -booted_simulator=$(xcrun simctl list devices | grep -E "iPhone|iPad" | grep -v unavailable | grep Booted | perl -lne 'print $1 if /\((.*?)\)/') +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +booted_simulator=$($DIR/ios_devices.pl "iPhone|iPad" "Booted" "NOT unavailable" | tail -n 1) echo "IPHONESIMULATOR_DEVICES = $booted_simulator" xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do diff --git a/mkspecs/macx-ios-clang/ios_devices.pl b/mkspecs/macx-ios-clang/ios_devices.pl new file mode 100755 index 0000000000..eb45d1dab9 --- /dev/null +++ b/mkspecs/macx-ios-clang/ios_devices.pl @@ -0,0 +1,50 @@ +#!/usr/bin/perl + +############################################################################# +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +$output = `xcrun simctl list devices --json 2>&1`; +$output =~ s/\n//g; + +BLOCK: +foreach $block ($output =~ /{.*?}/g) { + foreach $filter (@ARGV) { + if ($filter =~ /^NOT\s(.*)/) { + $block =~ /$1/ && next BLOCK; + } else { + $block =~ /$filter/ || next BLOCK; + } + } + $block =~ /udid[:|\s|\"]+(.*)\"/; + print "$1\n"; +} diff --git a/mkspecs/macx-ios-clang/xcodebuild.mk b/mkspecs/macx-ios-clang/xcodebuild.mk index 1bd18430df..bf6b791368 100644 --- a/mkspecs/macx-ios-clang/xcodebuild.mk +++ b/mkspecs/macx-ios-clang/xcodebuild.mk @@ -56,11 +56,12 @@ iphonesimulator-install: ACTION = build release-%: CONFIGURATION = Release debug-%: CONFIGURATION = Debug +SPECDIR := $(dir $(lastword $(MAKEFILE_LIST))) + # Test and build (device) destinations ifneq ($(filter check%,$(MAKECMDGOALS)),) ifeq ($(DEVICES),) $(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...) - SPECDIR := $(dir $(lastword $(MAKEFILE_LIST))) DESTINATIONS_INCLUDE = /tmp/ios_destinations.mk $(shell $(SPECDIR)/ios_destinations.sh $(TARGET) > $(DESTINATIONS_INCLUDE)) include $(DESTINATIONS_INCLUDE) @@ -71,7 +72,7 @@ endif %-iphoneos: DEVICES = $(IPHONEOS_DEVICES) IPHONEOS_GENERIC_DESTINATION := "generic/platform=iOS" -IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E 'iPhone|iPad' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)" +IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl "iPhone|iPad" "NOT unavailable" | tail -n 1)" DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(value $(call toupper,$(call basesdk,$(SDK)))_GENERIC_DESTINATION)) -- cgit v1.2.3 From 2c5eb3e668ee50fce85c22cf8b64b7d1aa7a936e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 22 Aug 2016 12:46:16 +0200 Subject: fix conditions relating to host_build in non-cross builds when it comes to compiler flags (be it warnings or include paths), it doesn't matter whether we building/using bootstrap libraries, but whether we are actually cross-building. amends c55bdc271f and d8be8110a. Change-Id: Idf988107e9cccc486672c0ee70dc9bdf8eab9d8c Reviewed-by: Lars Knoll --- mkspecs/features/qt_build_extra.prf | 2 +- mkspecs/features/qt_common.prf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_build_extra.prf b/mkspecs/features/qt_build_extra.prf index 378f5bbd7c..abdd7bc2b2 100644 --- a/mkspecs/features/qt_build_extra.prf +++ b/mkspecs/features/qt_build_extra.prf @@ -13,7 +13,7 @@ equals(TEMPLATE, subdirs): return() # It's likely that these extra flags will be wrong for host builds, # and the bootstrapped tools usually don't need them anyway. -host_build:force_bootstrap: return() +host_build:cross_compile: return() # The headersclean check needs defines and includes even for # header-only modules. diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index de9ba9dde9..171b96f415 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -44,9 +44,9 @@ contains(TEMPLATE, .*lib) { QMAKE_PRL_INSTALL_REPLACE += lib_replace } -# The remainder of this file must not apply to bootstrapped tools, +# The remainder of this file must not apply to host tools/libraries, # as the host compiler's version and capabilities are not checked. -host_build:force_bootstrap: return() +host_build:cross_compile: return() warnings_are_errors:warning_clean { # If the module declares that it has does its clean-up of warnings, enable -Werror. -- cgit v1.2.3