From 16167b32503d8d1115c41defb692e5ea1ce8789f Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 18 Oct 2016 08:39:39 -0500 Subject: [PATCH] filters false flags from clang compilation --- Tools/CMake/torque3d.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index 34f559b65..98a600aad 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -28,10 +28,16 @@ if(UNIX) endif() #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64 + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}") + else() # default compiler flags set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'") + endif() + # for asm files SET (CMAKE_ASM_NASM_OBJECT_FORMAT "elf") ENABLE_LANGUAGE (ASM_NASM) -- 2.11.4.GIT