Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Move common configuration settings into shared xcconfig (#70)
Browse files Browse the repository at this point in the history
* Move common compiler settings to xcconfig file.

* Allow float loop counter

* Removed pch

* Re-add -fcxx-modules post rebase.
  • Loading branch information
Julian Rex authored Nov 26, 2019
1 parent 520190f commit 1d2f632
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 340 deletions.
2 changes: 1 addition & 1 deletion platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
return [[self settingsTitlesForSection:section] count];
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return [[self settingsSectionTitles] objectAtIndex:section];
}
Expand Down
82 changes: 82 additions & 0 deletions platform/ios/common.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
ALWAYS_SEARCH_USER_PATHS = NO

CLANG_ANALYZER_GCD_PERFORMANCE = YES
CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
CLANG_CXX_LANGUAGE_STANDARD = c++14
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_OBJC_ARC = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_ASSIGN_ENUM = 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_DOCUMENTATION_COMMENTS = YES
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_INTERFACE_IVARS = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE = YES

ENABLE_STRICT_OBJC_MSGSEND = YES

GCC_C_LANGUAGE_STANDARD = gnu99
GCC_DYNAMIC_NO_PIC = NO
GCC_ENABLE_CPP_RTTI = NO
GCC_NO_COMMON_BLOCKS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_SHADOW = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES

HEADER_SEARCH_PATHS = $(inherited) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/default/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/variant/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geometry.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/value/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geojson.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/optional" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/typewrapper/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/weak/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/rapidjson/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/expected-lite/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/polylabel/include" "$(PROJECT_DIR)/../../platform/darwin/include"

LD_GENERATE_MAP_FILE = YES

LIBRARY_SEARCH_PATHS = $(inherited) $(PROJECT_DIR) $(PROJECT_DIR)/vendor/mapbox-accounts-ios

OTHER_CFLAGS = $(inherited) -fvisibility=hidden
OTHER_CPLUSPLUSFLAGS = $(inherited) -fvisibility=hidden -fcxx-modules
OTHER_SWIFT_FLAGS = -warnings-as-errors

// User defined
BITCODE_GENERATION_MODE = bitcode
CURRENT_COMMIT_HASH = deadbeef
CURRENT_SEMANTIC_VERSION = 1.0.0
CURRENT_SHORT_VERSION = 1.0

// TODO:
CLANG_USE_OPTIMIZATION_PROFILE = NO
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO

// Add developer config
#include? "developer.xcconfig"
Loading

0 comments on commit 1d2f632

Please sign in to comment.