mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Enable -Wold-style-cast
Now that casts have been changed to new style, prevent adding more old-style cast
This commit is contained in:
parent
32c2b7d449
commit
16f9a2d494
2 changed files with 2 additions and 0 deletions
|
@ -232,6 +232,7 @@ else ()
|
|||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_LOGICAL_OP -Wlogical-op)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_RANGE_LOOP_ANALYSIS -Wrange-loop-analysis)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_TAUTOLOGICAL_ZERO_COMPARE -Wtautological-unsigned-zero-compare)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_OLD_STYLE_CAST -Wold-style-cast)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_CLOBBERED -Wno-clobbered)
|
||||
# Disabled due to problems compiling OpenSSL on macOS.
|
||||
# ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation)
|
||||
|
|
|
@ -83,6 +83,7 @@ set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/addresses.c PROPERTIES COM
|
|||
|
||||
add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_TESTPAINT_SOURCES} ${RCT2_SECTIONS})
|
||||
SET_CHECK_CXX_FLAGS(testpaint)
|
||||
target_compile_options(testpaint PRIVATE -Wno-old-style-cast)
|
||||
target_include_directories(testpaint PRIVATE "${ROOT_DIR}/src/")
|
||||
target_link_libraries(testpaint z)
|
||||
|
||||
|
|
Loading…
Reference in a new issue