From 744cd465e178462467ca9cbb77dff7b51ded837c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 16 Nov 2013 11:58:21 -0800 Subject: [PATCH] Fixed bug 2238 - Enable GCC atomics for clang Marcus von Appen clang provides support for optimized atomics. The attached patch enables the cmake build system to take clang into account on checking for atomics. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df02d6a75995f..edb9f7698c10c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,7 +266,7 @@ endif(ASSERTIONS STREQUAL "auto") set(HAVE_ASSERTIONS ${ASSERTIONS}) # Compiler option evaluation -if(USE_GCC) +if(USE_GCC OR USE_CLANG) if(DEPENDENCY_TRACKING) check_c_source_compiles(" #if !defined(__GNUC__) || __GNUC__ < 3 @@ -314,7 +314,7 @@ if(USE_GCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar") endif(HAIKU) endif(HAVE_GCC_WALL) -endif(USE_GCC) +endif(USE_GCC OR USE_CLANG) if(ASSEMBLY) if(USE_GCC OR USE_CLANG)