1 /* 2 * Created by Phil on 16/8/2013. 3 * Copyright 2013 Two Blue Cubes Ltd. All rights reserved. 4 * 5 * Distributed under the Boost Software License, Version 1.0. (See accompanying 6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 * 8 */ 9 #ifndef TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED 10 #define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED 11 12 // See e.g.: 13 // https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html 14 #ifdef __APPLE__ 15 # include <TargetConditionals.h> 16 # if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ 17 (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) 18 # define CATCH_PLATFORM_MAC 19 # elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) 20 # define CATCH_PLATFORM_IPHONE 21 # endif 22 23 #elif defined(linux) || defined(__linux) || defined(__linux__) 24 # define CATCH_PLATFORM_LINUX 25 26 #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) 27 # define CATCH_PLATFORM_WINDOWS 28 #endif 29 30 #endif // TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED 31