Handle clang 10 warnings:

+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
This commit is contained in:
wmayer
2020-05-25 15:34:43 +02:00
parent fe2664ec65
commit 300e887480
18 changed files with 106 additions and 23 deletions

View File

@@ -125,6 +125,12 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS})
add_library(Robot SHARED ${Robot_SRCS})
target_link_libraries(Robot ${Robot_LIBS})
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
if (_flag_found)
target_compile_options(Robot PRIVATE -Wno-deprecated-copy)
endif()
SET_BIN_DIR(Robot Robot /Mod/Robot)
SET_PYTHON_PREFIX_SUFFIX(Robot)

View File

@@ -156,6 +156,12 @@ SET(RobotGuiIcon_SVG
add_library(RobotGui SHARED ${RobotGui_SRCS} ${RobotGuiIcon_SVG})
target_link_libraries(RobotGui ${RobotGui_LIBS})
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
if (_flag_found)
target_compile_options(RobotGui PRIVATE -Wno-deprecated-copy)
endif ()
SET_BIN_DIR(RobotGui RobotGui /Mod/Robot)
SET_PYTHON_PREFIX_SUFFIX(RobotGui)