diff --git a/CMakeLists.txt b/CMakeLists.txt index ae7933059..9730625b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,18 +54,6 @@ CONFIGURE_FILE ( INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/include) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AUTOCONF") -IF(CMAKE_COMPILER_IS_GNUCC) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL") -elseif(MSVC) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP") - set(CMAKE_EXE_LINKER_FLAGS_DEBUG - "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE - "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") -ELSE(CMAKE_COMPILER_IS_GNUCC) - MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}") -ENDIF(CMAKE_COMPILER_IS_GNUCC) find_package (LibXml2) find_package (SQLite3) diff --git a/critbit b/critbit index 26c635d81..2a7af5e23 160000 --- a/critbit +++ b/critbit @@ -1 +1 @@ -Subproject commit 26c635d81a6cf783ccd9d4200d85b4d1327ef200 +Subproject commit 2a7af5e2347217ea4efcf7fb3f0bc9c2681d1a17 diff --git a/iniparser b/iniparser index fe5338298..f84066fb7 160000 --- a/iniparser +++ b/iniparser @@ -1 +1 @@ -Subproject commit fe53382982d0f417b6f7ad0fe08e32393cb07c21 +Subproject commit f84066fb7d3254bdd9e89694acc4c1c20d001eed diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 338875049..71c397f5b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,19 @@ include_directories (${LUA_INCLUDE_DIR}) include_directories (${BSON_INCLUDE_DIR}) include_directories (${INIPARSER_INCLUDE_DIR}) +IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL") +elseif(MSVC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG + "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE + "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") +ELSE(CMAKE_COMPILER_IS_GNUCC) + MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}") +ENDIF(CMAKE_COMPILER_IS_GNUCC) + add_subdirectory(util) add_subdirectory(kernel) add_subdirectory(items) @@ -142,6 +155,7 @@ set(TESTS_SRC test_eressea.c tests.c battle.test.c + vortex.test.c tests.test.c reports.test.c stealth.test.c diff --git a/src/bind_ship.c b/src/bind_ship.c index affc024ee..a089ab084 100644 --- a/src/bind_ship.c +++ b/src/bind_ship.c @@ -11,6 +11,7 @@ without prior permission by the authors of Eressea. */ #include +#include #include "bind_ship.h" #include "bind_unit.h" diff --git a/src/bindings.c b/src/bindings.c index 6e9db945d..94caa2d42 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -11,6 +11,7 @@ without prior permission by the authors of Eressea. */ #include +#include #include "bindings.h" #include "bind_unit.h" #include "bind_storage.h" diff --git a/src/move.test.c b/src/move.test.c index b0082f608..90307586a 100644 --- a/src/move.test.c +++ b/src/move.test.c @@ -1,3 +1,4 @@ +#include #include #include #include "move.h" diff --git a/src/vortex.c b/src/vortex.c index 5584bbfe2..a4517f7bb 100644 --- a/src/vortex.c +++ b/src/vortex.c @@ -15,6 +15,8 @@ #include #include +#include +#include typedef struct dir_lookup { char *name; @@ -77,7 +79,7 @@ static int a_readdirection(attrib * a, void *owner, struct storage *store) { spec_direction *d = (spec_direction *)(a->data.v); - _CRT_UNUSED(owner); + (void) owner; READ_INT(store, &d->x); READ_INT(store, &d->y); READ_INT(store, &d->duration); @@ -118,7 +120,7 @@ a_writedirection(const attrib * a, const void *owner, struct storage *store) { spec_direction *d = (spec_direction *)(a->data.v); - _CRT_UNUSED(owner); + (void)owner; WRITE_INT(store, d->x); WRITE_INT(store, d->y); WRITE_INT(store, d->duration);