fix clang builds

This commit is contained in:
Enno Rehling 2016-11-18 13:24:50 +01:00
parent 4fc747fd83
commit 7d874f1606
4 changed files with 10 additions and 5 deletions

View File

@ -17,10 +17,12 @@ set_source_files_properties(kernel/version.c PROPERTIES
COMPILE_DEFINITIONS ERESSEA_VERSION="${ERESSEA_VERSION}")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
IF (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
ENDIF()
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
add_definitions(-DHAVE__BOOL)
ELSEIF(MSVC)

View File

@ -75,3 +75,4 @@ CuSuite *get_messages_suite(void) {
SUITE_ADD_TEST(suite, test_message);
return suite;
}

View File

@ -23,3 +23,4 @@ extern "C" {
#endif
#endif

View File

@ -52,3 +52,4 @@ void register_function(pf_generic fun, const char *name)
void free_functions(void) {
cb_clear(&cb_functions);
}