Skip to content

Commit

Permalink
Merge pull request #2417 from artamonovoleg/master
Browse files Browse the repository at this point in the history
fix warnings function for the xcode4 generator
  • Loading branch information
nickclark2016 authored Jan 17, 2025
2 parents da8cacd + 216807e commit c7925c6
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
53 changes: 53 additions & 0 deletions modules/xcode/tests/test_xcode_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2681,11 +2681,64 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CLANG_WARN_ASSIGN_ENUM = YES;
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_CXX0X_EXTENSIONS = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_FLOAT_CONVERSION = YES;
CLANG_WARN_FRAMEWORK_INCLUDE_PRIVATE_FROM_PUBLIC = YES;
CLANG_WARN_IMPLICIT_FALLTHROUGH = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_INTERFACE_IVARS = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
CLANG_WARN_PRAGMA_PACK = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES;
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
Expand Down
55 changes: 55 additions & 0 deletions modules/xcode/xcode_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,61 @@
settings['WARNING_CFLAGS'] = '-Wall -Wextra'
elseif cfg.warnings == "Everything" then
settings['WARNING_CFLAGS'] = '-Weverything'
settings["CLANG_WARN_ASSIGN_ENUM"] = "YES"
settings["CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST"] = "YES"
settings["CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING"] = "YES"
settings["CLANG_WARN_BOOL_CONVERSION"] = "YES"
settings["CLANG_WARN_COMMA"] = "YES"
settings["CLANG_WARN_COMPLETION_HANDLER_MISUSE"] = "YES"
settings["CLANG_WARN_CONSTANT_CONVERSION"] = "YES"
settings["CLANG_WARN_CXX0X_EXTENSIONS"] = "YES"
settings["CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS"] = "YES"
settings["CLANG_WARN_EMPTY_BODY"] = "YES"
settings["CLANG_WARN_ENUM_CONVERSION"] = "YES"
settings["CLANG_WARN_FLOAT_CONVERSION"] = "YES"
settings["CLANG_WARN_FRAMEWORK_INCLUDE_PRIVATE_FROM_PUBLIC"] = "YES"
settings["CLANG_WARN_IMPLICIT_FALLTHROUGH"] = "YES"
settings["CLANG_WARN_IMPLICIT_SIGN_CONVERSION"] = "YES"
settings["CLANG_WARN_INFINITE_RECURSION"] = "YES"
settings["CLANG_WARN_INT_CONVERSION"] = "YES"
settings["CLANG_WARN_NON_LITERAL_NULL_CONVERSION"] = "YES"
settings["CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE"] = "YES"
settings["CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES"] = "YES"
settings["CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF"] = "YES"
settings["CLANG_WARN_OBJC_INTERFACE_IVARS"] = "YES"
settings["CLANG_WARN_OBJC_LITERAL_CONVERSION"] = "YES"
settings["CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS"] = "YES"
settings["CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK"] = "YES"
settings["CLANG_WARN_PRAGMA_PACK"] = "YES"
settings["CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER"] = "YES"
settings["CLANG_WARN_RANGE_LOOP_ANALYSIS"] = "YES"
settings["CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY"] = "YES"
settings["CLANG_WARN_STRICT_PROTOTYPES"] = "YES"
settings["CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION"] = "YES"
settings["CLANG_WARN_SUSPICIOUS_MOVE"] = "YES"
settings["CLANG_WARN_UNREACHABLE_CODE"] = "YES"
settings["CLANG_WARN__DUPLICATE_METHOD_MATCH"] = "YES"
settings["CLANG_WARN__EXIT_TIME_DESTRUCTORS"] = "YES"
settings["GCC_WARN_64_TO_32_BIT_CONVERSION"] = "YES"
settings["GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS"] = "YES"
settings["GCC_WARN_ABOUT_MISSING_NEWLINE"] = "YES"
settings["GCC_WARN_ABOUT_MISSING_PROTOTYPES"] = "YES"
settings["GCC_WARN_ABOUT_RETURN_TYPE"] = "YES"
settings["GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS"] = "YES"
settings["GCC_WARN_INHIBIT_ALL_WARNINGS"] = "NO"
settings["GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED"] = "YES"
settings["GCC_WARN_NON_VIRTUAL_DESTRUCTOR"] = "YES"
settings["GCC_WARN_PEDANTIC"] = "YES"
settings["GCC_WARN_SHADOW"] = "YES"
settings["GCC_WARN_SIGN_COMPARE"] = "YES"
settings["GCC_WARN_STRICT_SELECTOR_MATCH"] = "YES"
settings["GCC_WARN_UNDECLARED_SELECTOR"] = "YES"
settings["GCC_WARN_UNINITIALIZED_AUTOS"] = "YES"
settings["GCC_WARN_UNKNOWN_PRAGMAS"] = "YES"
settings["GCC_WARN_UNUSED_FUNCTION"] = "YES"
settings["GCC_WARN_UNUSED_LABEL"] = "YES"
settings["GCC_WARN_UNUSED_PARAMETER"] = "YES"
settings["GCC_WARN_UNUSED_VARIABLE"] = "YES"
end

xcode.XCBuildConfiguration_SwiftLanguageVersion(settings, cfg)
Expand Down

0 comments on commit c7925c6

Please sign in to comment.