Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Core/Buildsystem: Clean up compileflags when compiling with warnings …

…fully enabled.

 -Wwrite-strings is default enabled when -Wall is set in clang/gcc, hence removed.
 -Woverloaded-virtual is now enabled for C++-code only, this removes the useless warnings when dabbling with C-only code.
  • Loading branch information...
commit 8ef48ecc99caa9c28b7d53bb45e6bd56872170a1 1 parent 371fbf5
@click click authored
View
2  CMakeLists.txt
@@ -12,7 +12,7 @@
project(TrinityCore)
# CMake policies (can not be handled elsewhere)
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0005 OLD)
# Set RPATH-handing (CMake parameters)
View
4 cmake/compiler/clang/settings.cmake
@@ -2,9 +2,9 @@
add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')
if(WITH_WARNINGS)
- set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Wfatal-errors")
+ set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
message(STATUS "Clang: All warnings enabled")
endif()
View
4 cmake/compiler/gcc/settings.cmake
@@ -11,9 +11,9 @@ add_definitions(-DHAVE_SSE2 -D__SSE2__)
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
if( WITH_WARNINGS )
- set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Winvalid-pch -Wfatal-errors")
+ set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Winvalid-pch -Wfatal-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
message(STATUS "GCC: All warnings enabled")
endif()
View
5 cmake/compiler/icc/settings.cmake
@@ -9,10 +9,7 @@ endif()
if( WITH_WARNINGS )
add_definitions(-w1)
- message(STATUS "ICC All warnings enabled")
-else()
- add_definitions(-w)
- message(STATUS "ICC: All warnings disabled")
+ message(STATUS "ICC: All warnings enabled")
endif()
if( WITH_COREDEBUG )
View
1  src/server/worldserver/CMakeLists.txt
@@ -150,7 +150,6 @@ endif()
add_dependencies(worldserver revision.h)
-
if( UNIX AND NOT NOJEM )
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
endif()
Please sign in to comment.
Something went wrong with that request. Please try again.