CMAKE: activate (and fixed) warnings
parent
9e050d8121
commit
aca4ffcdd5
|
@ -53,7 +53,7 @@ else()
|
|||
endif()
|
||||
|
||||
# TODO: fix most of these and activate them one by one
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wcast-align -Wpointer-arith -Wno-deprecated-declarations -Wno-long-long -Wno-non-virtual-dtor -Wno-cast-qual -Wno-multichar -Wno-shadow -Wno-sign-compare -Wno-unused-parameter -Wreturn-type -Wwrite-strings -Wno-variadic-macros -Wno-unknown-pragmas")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Wreturn-type -Wwrite-strings -Wno-unused-parameter")
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
|
||||
endif()
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
set(SRCS glm/detail/glm.cpp)
|
||||
engine_add_library(LIB glm SRCS ${SRCS} GCCCFLAGS "-Wno-shadow")
|
||||
engine_add_library(LIB glm SRCS ${SRCS})
|
||||
|
|
|
@ -9,7 +9,6 @@ endif()
|
|||
engine_add_library(
|
||||
LIB gtest
|
||||
SRCS ${SRCS}
|
||||
GCCCFLAGS "-Wno-sign-compare"
|
||||
DEFINES ${DEFINES}
|
||||
)
|
||||
target_include_directories(gtest PUBLIC . include/)
|
||||
|
|
|
@ -13,7 +13,7 @@ set(SRCS
|
|||
engine_add_library(
|
||||
LIB libenet
|
||||
SRCS ${SRCS}
|
||||
GCCCFLAGS "-Wno-cast-qual -Wno-parentheses-equality")
|
||||
)
|
||||
|
||||
if (NOT LIBENET_FOUND)
|
||||
target_include_directories(libenet PUBLIC include/)
|
||||
|
|
|
@ -37,8 +37,8 @@ set(SRCS
|
|||
engine_add_library(
|
||||
LIB lua53
|
||||
SRCS ${SRCS}
|
||||
GCCCFLAGS "-Wno-cast-qual -Wno-parentheses-equality"
|
||||
DEFINES LUA_USE_LONGJMP LUA_COMPAT_MODULE)
|
||||
DEFINES LUA_USE_LONGJMP LUA_COMPAT_MODULE
|
||||
)
|
||||
if (NOT LUA53_FOUND)
|
||||
if (LINUX AND NOT ANDROID AND NOT EMSCRIPTEN)
|
||||
target_compile_definitions(lua53 PUBLIC -DLUA_USE_LINUX)
|
||||
|
|
|
@ -1481,7 +1481,7 @@ endif(NOT SDL2_FOUND)
|
|||
engine_add_library(
|
||||
LIB sdl2
|
||||
SRCS ${SOURCE_FILES} ${SDLMAIN_SOURCES} ${PLATFORM_SRCS}
|
||||
GCCCFLAGS "${CMAKE_C_FLAGS} ${SDL_CFLAGS} ${EXTRA_CFLAGS} -Wno-deprecated-declarations -Wno-cast-qual -Wno-unused-parameter -Wno-sign-compare -Wno-ignored-qualifiers -Wno-discarded-qualifiers -Wno-empty-body -Wno-unused-but-set-variable"
|
||||
GCCCFLAGS "${CMAKE_C_FLAGS} ${SDL_CFLAGS} ${EXTRA_CFLAGS}"
|
||||
DEFINES ${DEFINES}
|
||||
LINKERFLAGS ${ANDROID_LDFLAGS} ${EXTRA_LDFLAGS})
|
||||
if (NOT SDL2_FOUND)
|
||||
|
@ -1492,5 +1492,5 @@ if (NOT SDL2_FOUND)
|
|||
if (IOS)
|
||||
set_property(TARGET sdl2 APPEND_STRING PROPERTY COMPILE_FLAGS " -fobjc-arc")
|
||||
endif()
|
||||
target_include_directories(${_ADDLIB_LIB} ${_ADDLIB_PUBLICHEADER} ${PROJECT_SOURCE_DIR}/src/libs/sdl2/include ${PROJECT_SOURCE_DIR}/src/libs/sdl2/src ${PROJECT_SOURCE_DIR}/src/libs/sdl2/config)
|
||||
target_include_directories(sdl2 ${PROJECT_SOURCE_DIR}/src/libs/sdl2/include ${PROJECT_SOURCE_DIR}/src/libs/sdl2/src ${PROJECT_SOURCE_DIR}/src/libs/sdl2/config)
|
||||
endif()
|
||||
|
|
|
@ -128,7 +128,7 @@ set(SRCS
|
|||
engine_add_library(
|
||||
LIB turbobadger
|
||||
SRCS ${SRCS}
|
||||
GCCCFLAGS "-Wno-shadow -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-array-bounds")
|
||||
)
|
||||
target_include_directories(turbobadger PUBLIC tb)
|
||||
|
||||
if (FIPS_WINDOWS)
|
||||
|
|
|
@ -13,5 +13,10 @@ set(SRCS
|
|||
inftrees.c
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c)
|
||||
engine_add_library(LIB zlib SRCS ${SRCS} GCCCFLAGS "-Wno-cast-qual -Wno-implicit-function-declaration")
|
||||
zutil.c
|
||||
)
|
||||
|
||||
engine_add_library(
|
||||
LIB zlib
|
||||
SRCS ${SRCS}
|
||||
)
|
||||
|
|
|
@ -65,14 +65,14 @@ public:
|
|||
void beforeUI() override;
|
||||
void afterUI() override;
|
||||
|
||||
void onEvent(const voxel::WorldCreatedEvent& event);
|
||||
void onEvent(const network::DisconnectEvent& event);
|
||||
void onEvent(const voxel::WorldCreatedEvent& event) override;
|
||||
void onEvent(const network::DisconnectEvent& event) override;
|
||||
/**
|
||||
* @brief We send the user connect message to the server and we get the seed and a user spawn message back.
|
||||
*
|
||||
* @note If auth failed, we get an auth failed message
|
||||
*/
|
||||
void onEvent(const network::NewConnectionEvent& event);
|
||||
void onEvent(const network::NewConnectionEvent& event) override;
|
||||
void onMouseMotion(int32_t x, int32_t y, int32_t relX, int32_t relY) override;
|
||||
bool connect(uint16_t port, const std::string& hostname);
|
||||
void authFailed();
|
||||
|
|
|
@ -24,7 +24,7 @@ set(SRCS
|
|||
)
|
||||
set(LIB core)
|
||||
add_library(${LIB} ${SRCS})
|
||||
target_link_libraries(${LIB} io glm ${CMAKE_DL_LIBS} sauce)
|
||||
target_link_libraries(${LIB} io glm ${CMAKE_DL_LIBS})
|
||||
set_target_properties(${LIB} PROPERTIES FOLDER ${LIB})
|
||||
|
||||
gtest_suite_files(tests
|
||||
|
|
Loading…
Reference in New Issue