From c5455cc97b82090d2c373a30a890af9044d1d8a4 Mon Sep 17 00:00:00 2001 From: Vraiment Date: Tue, 11 Jul 2017 20:28:31 -0700 Subject: [PATCH] Added XCode related config --- .gitignore | 3 +++ CMakeLists.txt | 4 ++++ tests/testing.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index faccaec..dfb0481 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ sdl2pp.pc *.sln Debug/ Win32/ +CMakeScripts/ +*.build +*.xcodeproj # Binaries *.o diff --git a/CMakeLists.txt b/CMakeLists.txt index 51eb91e..1cf2074 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,10 @@ ELSE(MSVC) #APPEND_CXX_FLAG_IF_SUPPORTED(-Wno-c++98-compat SDL2PP_WARNINGS) #APPEND_CXX_FLAG_IF_SUPPORTED(-Wno-padded SDL2PP_WARNINGS) ENDIF(MSVC) +IF (CMAKE_GENERATOR STREQUAL "Xcode") + # To disable colored output on the XCode test console + ADD_DEFINITIONS(-DSDL2PP_XCODE_GENERATED) +ENDIF (CMAKE_GENERATOR STREQUAL "Xcode") LIST(REMOVE_DUPLICATES SDL2_ALL_INCLUDE_DIRS) diff --git a/tests/testing.h b/tests/testing.h index c9e4651..0d9bf3d 100644 --- a/tests/testing.h +++ b/tests/testing.h @@ -36,7 +36,7 @@ #include #include -#ifdef _WIN32 +#if (defined _WIN32) || (defined SDL2PP_XCODE_GENERATED) # define TESTING_NO_COLOR #endif