From 89e97e99378f90cd70e4b9f0462b8baece471d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 31 Jul 2019 16:01:22 +0200 Subject: Pass qmake arguments when creating Xcode project from Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0020273b200465f44a135848b4fd505793e85c30 Reviewed-by: Jörg Bornemann --- mkspecs/features/mac/default_post.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index c46222debd..f34b305d08 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -261,7 +261,7 @@ xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identif QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting !macx-xcode { - generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_) + generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_) $$QMAKE_ARGS generate_xcode_project.target = xcodeproj QMAKE_EXTRA_VARIABLES += _PRO_FILE_ QMAKE_EXTRA_TARGETS += generate_xcode_project -- cgit v1.2.3 From 6ac610c79bf7f311ee244d45583eb669ada58781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 31 Jul 2019 15:42:46 +0200 Subject: Allow specifying explicit SDK version on Apple platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This enables building against the latest SDK, while still opting out of features that this SDK normally enables, by lowering the SDK version set in the BUILD_VERSION/VERSION_MIN_MACOSX load command. Change-Id: Id5f13524740bfbf5eda10a5d0c2e3fda04bf3f52 Reviewed-by: Jörg Bornemann Reviewed-by: Morten Johan Sørvig Reviewed-by: Timur Pocheptsov --- mkspecs/features/mac/default_post.prf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index f34b305d08..60b2eb2117 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,5 +1,9 @@ load(default_post) +# Recompute SDK version in case the user set it explicitly +sdk_version = $$QMAKE_MAC_SDK_VERSION +QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) + contains(TEMPLATE, .*app) { !macx-xcode:if(isEmpty(BUILDS)|build_pass) { # Detect changes to the platform SDK @@ -14,7 +18,7 @@ contains(TEMPLATE, .*app) { !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \ warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \ - "you're using $${QMAKE_MAC_SDK_VERSION}. Please upgrade.") + "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.") !isEmpty(QT_MAC_SDK_VERSION_MAX) { # For Qt developers only @@ -244,6 +248,11 @@ macx-xcode { QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} } +!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) { + # Explicit SDK version has been set, respect that + QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version +} + cache(QMAKE_XCODE_DEVELOPER_PATH, stash) !isEmpty(QMAKE_XCODE_VERSION): \ cache(QMAKE_XCODE_VERSION, stash) -- cgit v1.2.3 From d502b19b283806d2ef5c6b7bfd79baef15f3845c Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Wed, 7 Aug 2019 08:21:35 +0800 Subject: Fix std detection for win32-clang-msvc clang-cl will never support C++ standards newer than C++14 without these flags. I didn't add them to msvc-based-version.conf because on Windows, only clang-cl use the same flags with MSVC, both ICC and MinGW have their own flags. So they are clang-cl specific flags. Change-Id: Ia44a5ea4237c77ea5e897fffded32cbc008a4729 Reviewed-by: Thiago Macieira --- mkspecs/win32-clang-msvc/qmake.conf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/win32-clang-msvc/qmake.conf b/mkspecs/win32-clang-msvc/qmake.conf index 9a7f70454d..b60a4b8c8b 100644 --- a/mkspecs/win32-clang-msvc/qmake.conf +++ b/mkspecs/win32-clang-msvc/qmake.conf @@ -39,6 +39,11 @@ QMAKE_CXXFLAGS += -Wno-microsoft-enum-value QMAKE_LINK = lld-link QMAKE_LIB = llvm-lib /NOLOGO +QMAKE_CXXFLAGS_CXX11 = -std:c++11 +QMAKE_CXXFLAGS_CXX14 = -std:c++14 +QMAKE_CXXFLAGS_CXX1Z = -std:c++17 +QMAKE_CXXFLAGS_CXX2A = -std:c++latest + QMAKE_CFLAGS_LTCG = -flto QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG # Leave QMAKE_LFLAGS_LTCG empty because lld-link doesn't need any additional parameters -- cgit v1.2.3