diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 251195414..cc49bc0b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -549,8 +549,11 @@ endif() # Compatibility flag with later versions of GCC # We should really fix our code to not need this -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64|em64t|EM64T)") + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields) + endif() + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-trigraphs) endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")