Corentin is wrong, still

This commit is contained in:
Patricia Aas 2021-09-10 13:50:30 +02:00
parent 0b4926cc60
commit f60e449d8e
1 changed files with 1 additions and 15 deletions

View File

@ -54,24 +54,10 @@ function(set_project_warnings)
set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX)
endif ()
set(GCC_WARNINGS
${CLANG_WARNINGS}
-Wmisleading-indentation # warn if indentation implies blocks where blocks do not exist
-Wduplicated-cond # warn if if / else chain has duplicated conditions
-Wduplicated-branches # warn if if / else branches have duplicated code
-Wlogical-op # warn about logical operations being used where bitwise were probably wanted
-Wuseless-cast # warn if you perform a cast to the same type
)
if (WIN32)
set(PROJECT_WARNINGS ${MSVC_WARNINGS})
# elseif (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
# set(PROJECT_WARNINGS ${CLANG_WARNINGS})
# elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# set(PROJECT_WARNINGS ${GCC_WARNINGS})
else ()
set(PROJECT_WARNINGS ${GCC_WARNINGS})
# message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
endif ()
add_compile_options(${PROJECT_WARNINGS})