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/test_color_constexpr.cc b/tests/test_color_constexpr.cc index 0d0a028..a672956 100644 --- a/tests/test_color_constexpr.cc +++ b/tests/test_color_constexpr.cc @@ -24,6 +24,4 @@ int main(int, char*[]) { constexpr int a = c1.GetAlpha(); static_assert(r == 0 && g == 0 && b == 0 && a == 0, ""); - - return 0; } diff --git a/tests/test_pointrect_constexpr.cc b/tests/test_pointrect_constexpr.cc index 179678a..ef2a6a4 100644 --- a/tests/test_pointrect_constexpr.cc +++ b/tests/test_pointrect_constexpr.cc @@ -77,6 +77,4 @@ int main(int, char*[]) { static_assert(b3 && b4 && b5 && b6, ""); } - - return 0; } 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