From 3a8b79be2b09ddd5cf74f5d09ed940c050aecf74 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 11 Apr 2012 23:59:55 +0200 Subject: [PATCH] Changed: #1448 Compilation with Clang --- code/CMakeModules/nel.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index e6277c2b5..590b07b71 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -477,7 +477,11 @@ MACRO(NL_SETUP_BUILD) SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m64") ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64") - SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing") + SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing") + + IF(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -ansi") + ENDIF(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") IF(WITH_COVERAGE) SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")