Corentin is wrong, still
This commit is contained in:
parent
0b4926cc60
commit
f60e449d8e
1 changed files with 1 additions and 15 deletions
|
@ -54,24 +54,10 @@ function(set_project_warnings)
|
||||||
set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX)
|
set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX)
|
||||||
endif ()
|
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)
|
if (WIN32)
|
||||||
set(PROJECT_WARNINGS ${MSVC_WARNINGS})
|
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 ()
|
else ()
|
||||||
set(PROJECT_WARNINGS ${GCC_WARNINGS})
|
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
|
||||||
# message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_compile_options(${PROJECT_WARNINGS})
|
add_compile_options(${PROJECT_WARNINGS})
|
||||||
|
|
Loading…
Reference in a new issue