From 5cf19cabc597936e6bf70b292d9261dd684db9cb Mon Sep 17 00:00:00 2001 From: David Steinacher Date: Tue, 14 Nov 2023 09:18:58 +0100 Subject: [PATCH] move TARGET_OS_VISION definition to umbrella header --- Nimble.xcodeproj/project.pbxproj | 6 ------ Sources/Nimble/Nimble.h | 7 +++++++ Sources/Nimble/NimblePrefixHeader.pch | 10 ---------- 3 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 Sources/Nimble/NimblePrefixHeader.pch diff --git a/Nimble.xcodeproj/project.pbxproj b/Nimble.xcodeproj/project.pbxproj index ea9f65e71..eee4eb33a 100644 --- a/Nimble.xcodeproj/project.pbxproj +++ b/Nimble.xcodeproj/project.pbxproj @@ -108,7 +108,6 @@ 1FE661571E6574E30035F243 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FE661561E6574E20035F243 /* ExpectationMessage.swift */; }; 29EA59641B551ED2002D767E /* ThrowErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */; }; 29EA59671B551EE6002D767E /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; }; - 37B050BA2AFE172B00B26672 /* NimblePrefixHeader.pch in Headers */ = {isa = PBXBuildFile; fileRef = 37B050B92AFE172B00B26672 /* NimblePrefixHeader.pch */; }; 472FD1391B9E0A9700C7B8DA /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1341B9E085700C7B8DA /* HaveCount.swift */; }; 472FD13A1B9E0A9F00C7B8DA /* HaveCountTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1361B9E094B00C7B8DA /* HaveCountTest.swift */; }; 4793854E1BA0BB2500296F85 /* ObjCHaveCountTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4793854C1BA0BB2500296F85 /* ObjCHaveCountTest.m */; }; @@ -294,7 +293,6 @@ 1FE661561E6574E20035F243 /* ExpectationMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpectationMessage.swift; sourceTree = ""; }; 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowErrorTest.swift; sourceTree = ""; }; 29EA59651B551EE6002D767E /* ThrowError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowError.swift; sourceTree = ""; }; - 37B050B92AFE172B00B26672 /* NimblePrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NimblePrefixHeader.pch; sourceTree = ""; }; 472FD1341B9E085700C7B8DA /* HaveCount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HaveCount.swift; sourceTree = ""; }; 472FD1361B9E094B00C7B8DA /* HaveCountTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HaveCountTest.swift; sourceTree = ""; }; 4793854C1BA0BB2500296F85 /* ObjCHaveCountTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCHaveCountTest.m; sourceTree = ""; }; @@ -460,7 +458,6 @@ 1F1A742D1940169200FFFC47 /* Info.plist */, 1FD8CD0C1968AB07008ED995 /* Matchers */, 1F1A742E1940169200FFFC47 /* Nimble.h */, - 37B050B92AFE172B00B26672 /* NimblePrefixHeader.pch */, 1FD8CD241968AB07008ED995 /* Utils */, ); name = Nimble; @@ -773,7 +770,6 @@ files = ( CDFB6A491F7E082500AD8CC7 /* CwlMachBadInstructionHandler.h in Headers */, CDFB6A271F7E07C700AD8CC7 /* CwlCatchException.h in Headers */, - 37B050BA2AFE172B00B26672 /* NimblePrefixHeader.pch in Headers */, 1F1871DF1CA89EF500A34BF2 /* NMBStringify.h in Headers */, 1F1871DD1CA89EF500A34BF2 /* DSL.h in Headers */, 1F1871DE1CA89EF500A34BF2 /* NMBExceptionCapture.h in Headers */, @@ -1121,7 +1117,6 @@ GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Sources/$(PROJECT_NAME)/NimblePrefixHeader.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1194,7 +1189,6 @@ ENABLE_TESTING_SEARCH_PATHS = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Sources/$(PROJECT_NAME)/NimblePrefixHeader.pch"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; diff --git a/Sources/Nimble/Nimble.h b/Sources/Nimble/Nimble.h index 1072c2641..2fb81305e 100644 --- a/Sources/Nimble/Nimble.h +++ b/Sources/Nimble/Nimble.h @@ -1,4 +1,11 @@ #import + +// When running below Xcode 15, TARGET_OS_VISION is not defined. Since the project has TREAT_WARNINGS_AS_ERROS enabled +// we need to workaround this warning. +#ifndef TARGET_OS_VISION + #define TARGET_OS_VISION 0 +#endif /* TARGET_OS_VISION */ + #import #import #import diff --git a/Sources/Nimble/NimblePrefixHeader.pch b/Sources/Nimble/NimblePrefixHeader.pch deleted file mode 100644 index c362d0984..000000000 --- a/Sources/Nimble/NimblePrefixHeader.pch +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef NimblePrefixHeader_pch -#define NimblePrefixHeader_pch - -// When running below Xcode 15, TARGET_OS_VISION is not defined. Since the project has TREAT_WARNINGS_AS_ERROS enabled -// we need to workaround this warning. -#ifndef TARGET_OS_VISION - #define TARGET_OS_VISION 0 -#endif /* TARGET_OS_VISION */ - -#endif /* NimblePrefixHeader_pch */