From cb568549724fc43dff8f40ffb49750d98bc7c993 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 9 Feb 2021 16:03:56 +0100 Subject: [PATCH] XCodegen: Make project.yml use Common.xcconfig which will probably become the xcconfig for the project --- Config/Common-Debug.xcconfig | 26 ++++++++++++++++ Config/Common-Release.xcconfig | 23 ++++++++++++++ Config/Common.xcconfig | 39 ++++++++++++++++++++++++ project.yml | 55 ++-------------------------------- 4 files changed, 91 insertions(+), 52 deletions(-) create mode 100644 Config/Common-Debug.xcconfig create mode 100644 Config/Common-Release.xcconfig diff --git a/Config/Common-Debug.xcconfig b/Config/Common-Debug.xcconfig new file mode 100644 index 000000000..5de994569 --- /dev/null +++ b/Config/Common-Debug.xcconfig @@ -0,0 +1,26 @@ +// +// Copyright 2021 Vector Creations Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "Common.xcconfig" + +COPY_PHASE_STRIP = NO +ENABLE_TESTABILITY = YES +GCC_DYNAMIC_NO_PIC = NO +GCC_OPTIMIZATION_LEVEL = 0 +GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) +GCC_SYMBOLS_PRIVATE_EXTERN = NO +MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE +ONLY_ACTIVE_ARCH = YES diff --git a/Config/Common-Release.xcconfig b/Config/Common-Release.xcconfig new file mode 100644 index 000000000..75b028fec --- /dev/null +++ b/Config/Common-Release.xcconfig @@ -0,0 +1,23 @@ +// +// Copyright 2021 Vector Creations Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "Common.xcconfig" + +COPY_PHASE_STRIP = YES +ENABLE_NS_ASSERTIONS = NO +MTL_ENABLE_DEBUG_INFO = NO +SWIFT_COMPILATION_MODE = wholemodule +VALIDATE_PRODUCT = YES diff --git a/Config/Common.xcconfig b/Config/Common.xcconfig index 7b24d75b1..7f06a1b79 100644 --- a/Config/Common.xcconfig +++ b/Config/Common.xcconfig @@ -22,8 +22,47 @@ KEYCHAIN_ACCESS_GROUP = $(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER).keychain.shared // Build settings +IPHONEOS_DEPLOYMENT_TARGET = 11.0 +SDKROOT = iphoneos +TARGETED_DEVICE_FAMILY = 1,2 SWIFT_VERSION = 5.3.1 + LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @executable_path/../../Frameworks +ALWAYS_SEARCH_USER_PATHS = NO +DEFINES_MODULE = YES +ENABLE_STRICT_OBJC_MSGSEND = YES +GCC_NO_COMMON_BLOCKS = YES // Make Xcode 12 and fastlane(xcodebuild) happy while some pods are not updated EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 + + +// Warnings +CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES +CLANG_ENABLE_MODULES = YES +CLANG_ENABLE_OBJC_ARC = YES +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES +CLANG_WARN_BOOL_CONVERSION = YES +CLANG_WARN_COMMA = YES +CLANG_WARN_CONSTANT_CONVERSION = YES +CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES +CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR +CLANG_WARN_EMPTY_BODY = YES +CLANG_WARN_ENUM_CONVERSION = YES +CLANG_WARN_INFINITE_RECURSION = YES +CLANG_WARN_INT_CONVERSION = YES +CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +CLANG_WARN_OBJC_LITERAL_CONVERSION = YES +CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR +CLANG_WARN_RANGE_LOOP_ANALYSIS = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_SUSPICIOUS_MOVE = YES +CLANG_WARN_UNREACHABLE_CODE = YES +GCC_WARN_64_TO_32_BIT_CONVERSION = YES +GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR +GCC_WARN_UNDECLARED_SELECTOR = YES +GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE +GCC_WARN_UNUSED_FUNCTION = YES +GCC_WARN_UNUSED_VARIABLE = YES diff --git a/project.yml b/project.yml index 859959686..e620183be 100644 --- a/project.yml +++ b/project.yml @@ -12,58 +12,9 @@ fileGroups: - AUTHORS.rst - Podfile -settings: - base: - IPHONEOS_DEPLOYMENT_TARGET: 11.0 - SDKROOT: iphoneos - TARGETED_DEVICE_FAMILY: 1,2 - ALWAYS_SEARCH_USER_PATHS: NO - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES - CLANG_ENABLE_MODULES: YES - CLANG_ENABLE_OBJC_ARC: YES - CLANG_WARN__DUPLICATE_METHOD_MATCH: YES - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING: YES - CLANG_WARN_BOOL_CONVERSION: YES - CLANG_WARN_COMMA: YES - CLANG_WARN_CONSTANT_CONVERSION: YES - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS: YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE: YES_ERROR - CLANG_WARN_EMPTY_BODY: YES - CLANG_WARN_ENUM_CONVERSION: YES - CLANG_WARN_INFINITE_RECURSION: YES - CLANG_WARN_INT_CONVERSION: YES - CLANG_WARN_NON_LITERAL_NULL_CONVERSION: YES - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF: YES - CLANG_WARN_OBJC_LITERAL_CONVERSION: YES - CLANG_WARN_OBJC_ROOT_CLASS: YES_ERROR - CLANG_WARN_RANGE_LOOP_ANALYSIS: YES - CLANG_WARN_STRICT_PROTOTYPES: YES - CLANG_WARN_SUSPICIOUS_MOVE: YES - CLANG_WARN_UNREACHABLE_CODE: YES - DEFINES_MODULE: YES - ENABLE_STRICT_OBJC_MSGSEND: YES - GCC_NO_COMMON_BLOCKS: YES - GCC_WARN_64_TO_32_BIT_CONVERSION: YES - GCC_WARN_ABOUT_RETURN_TYPE: YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR: YES - GCC_WARN_UNINITIALIZED_AUTOS: YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION: YES - GCC_WARN_UNUSED_VARIABLE: YES - debug: - COPY_PHASE_STRIP: NO - ENABLE_TESTABILITY: YES - GCC_DYNAMIC_NO_PIC: NO - GCC_OPTIMIZATION_LEVEL: 0 - GCC_PREPROCESSOR_DEFINITIONS: DEBUG=1 $(inherited) - GCC_SYMBOLS_PRIVATE_EXTERN: NO - MTL_ENABLE_DEBUG_INFO: INCLUDE_SOURCE - ONLY_ACTIVE_ARCH: YES - release: - COPY_PHASE_STRIP: YES - ENABLE_NS_ASSERTIONS: NO - MTL_ENABLE_DEBUG_INFO: NO - SWIFT_COMPILATION_MODE: wholemodule - VALIDATE_PRODUCT: YES +configFiles: + Debug: Config/Common-Debug.xcconfig + Release: Config/Common-Release.xcconfig options: defaultConfig: Release