Setup better warning flags for Clang.

This commit is contained in:
John Szakmeister
2014-02-28 06:09:04 -05:00
committed by Thiago de Arruda
parent fe226f5376
commit ef6933bd60

View File

@@ -13,6 +13,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# If the C compiler is some GNU-alike, use the gnu99 standard and enable all warnings. # If the C compiler is some GNU-alike, use the gnu99 standard and enable all warnings.
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99")
endif(CMAKE_COMPILER_IS_GNUCC) endif(CMAKE_COMPILER_IS_GNUCC)
add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CONFIG_H)