From f60e449d8eff8eba7f698b0fcb0052d5d89d3555 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Fri, 10 Sep 2021 13:50:30 +0200 Subject: [PATCH] Corentin is wrong, still --- cmake/CompilerWarnings.cmake | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index fba5515..8ff7cd4 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -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})