Skip to content

Commit

Permalink
Remove the c-style cast warning I added from CMakeLists now that they…
Browse files Browse the repository at this point in the history
…'re gone (it triggers on 3rd party dependencies and slows down compilation)
  • Loading branch information
jadebenn committed Dec 26, 2023
1 parent f1621aa commit c82a4cc
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 50 deletions.
6 changes: 0 additions & 6 deletions dCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ add_library(dCommon STATIC ${DCOMMON_SOURCES})

target_link_libraries(dCommon bcrypt dDatabase tinyxml2)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DCOMMON_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()

# Handle zlib dependency
if (UNIX)
find_package(ZLIB REQUIRED)
elseif (WIN32)
Expand Down
5 changes: 0 additions & 5 deletions dDatabase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,3 @@ endforeach()

add_library(dDatabase STATIC ${DDATABASE_SOURCES})
target_link_libraries(dDatabase sqlite3 mariadbConnCpp)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DDATABASE_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dGame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,3 @@ endforeach()
add_library(dGame STATIC ${DGAME_SOURCES})

target_link_libraries(dGame dDatabase Recast Detour)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DGAME_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dMasterServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ target_link_libraries(MasterServer ${COMMON_LIBRARIES} dMasterServer)
if(WIN32)
add_dependencies(MasterServer WorldServer AuthServer ChatServer)
endif()

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DMASTERSERVER_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dNavigation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ endforeach()

add_library(dNavigation STATIC ${DNAVIGATION_SOURCES})
target_link_libraries(dNavigation Detour Recast)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DNAVIGATION_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dNet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ set(DNET_SOURCES "AuthPackets.cpp"

add_library(dNet STATIC ${DNET_SOURCES})
target_link_libraries(dNet dCommon dDatabase)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DNET_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dPhysics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ set(DPHYSICS_SOURCES "dpCollisionChecks.cpp"

add_library(dPhysics STATIC ${DPHYSICS_SOURCES})
target_link_libraries(dPhysics Recast Detour)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DPHYSICS_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dScripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,3 @@ foreach(file ${DSCRIPTS_SOURCES_ZONE})
endforeach()

set(DSCRIPTS_SOURCES ${DSCRIPTS_SOURCES} PARENT_SCOPE)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DSCRIPTS_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
4 changes: 0 additions & 4 deletions dWorldServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ add_executable(WorldServer "WorldServer.cpp")
target_link_libraries(dWorldServer ${COMMON_LIBRARIES})
target_link_libraries(WorldServer ${COMMON_LIBRARIES} dChatFilter dGame dZoneManager dPhysics Detour Recast tinyxml2 dWorldServer dNavigation)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DWORLDSERVER_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()
5 changes: 0 additions & 5 deletions dZoneManager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,3 @@ set(DZONEMANAGER_SOURCES "dZoneManager.cpp"

add_library(dZoneManager STATIC ${DZONEMANAGER_SOURCES})
target_link_libraries(dZoneManager dPhysics)

# If using gcc, warn on old-style C casts
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties(${DZONEMANAGER_SOURCES} PROPERTIES COMPILE_FLAGS "-Wold-style-cast")
endif()

0 comments on commit c82a4cc

Please sign in to comment.