diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index bd697892671ec6244f25623dc922452cfd8069be..f1eb30bb6818560379632b787830704c79831f0c --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,12 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") SET(TD_LINUX TRUE) ADD_DEFINITIONS(-DLINUX) - SET(COMMON_FLAGS "-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + + IF (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + SET(COMMON_FLAGS "-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + ELSE () + SET(COMMON_FLAGS "-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + ENDIF () SET(DEBUG_FLAGS "-O0 -DDEBUG") SET(RELEASE_FLAGS "-O0")