Skip to content

Commit

Permalink
Fix error when compiling on Xcode 6.0 (so having XCTestExpectation de…
Browse files Browse the repository at this point in the history
…fined) but not targeting OSX 10.10 (OSX.10 SDK not avail in 6.0.1).

-> The conditional compilation was testing the iOS/OSX SDK instead of testing the XCTest Framework version / Xcode Version
  • Loading branch information
Olivier Halligon committed Sep 30, 2014
1 parent ace9744 commit bdc20af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions OHHTTPStubs.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.7'
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'XCODE_VERSION=$(XCODE_VERSION_MAJOR)' }

end
5 changes: 5 additions & 0 deletions OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"XCODE_VERSION=$(XCODE_VERSION_MAJOR)",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
Expand Down Expand Up @@ -637,6 +638,10 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = (
"XCODE_VERSION=$(XCODE_VERSION_MAJOR)",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
* (at least part of it) so that we can use the same API in older Xcode versions
----------------------------------------------------------------------------------*/


#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 80000) \
|| (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101000)
#if XCODE_VERSION < 0600

#define XCTestExpectation_OHRetroCompat_BETTER_FAILURE_LOCATIONS 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
* (at least part of it) so that we can use the same API in older Xcode versions
----------------------------------------------------------------------------------*/


#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 80000) \
|| (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101000)

#if XCODE_VERSION < 0600

#import "XCTestExpectation+OHRetroCompat.h"
#import <Foundation/Foundation.h>
Expand Down

0 comments on commit bdc20af

Please sign in to comment.