CMake: Remove redundancies and support clang ToT

Problem:
- There are redundant options being set for some directories.
- Clang ToT fails to compile the project.

Solution:
- Remove redundancies.
- Fix clang error list.
This commit is contained in:
Lenny Maiorani 2021-04-18 10:50:53 -06:00 committed by Andreas Kling
parent aaf3d26dae
commit 97f4aa166a

View file

@ -77,7 +77,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fconcepts -Wno-literal-suffix)
add_compile_options(-fconcepts)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-Wno-overloaded-virtual -Wno-user-defined-literals)
endif()
@ -171,6 +171,7 @@ add_compile_options(-Wdouble-promotion)
add_compile_options(-Wno-expansion-to-defined)
add_compile_options(-Wformat=2)
add_compile_options(-Wimplicit-fallthrough)
add_compile_options(-Wno-literal-suffix)
add_compile_options(-Wlogical-op)
add_compile_options(-Wmisleading-indentation)
add_compile_options(-Wmissing-declarations)
@ -187,13 +188,7 @@ add_compile_options(-fstack-protector-strong)
add_compile_options(-g1)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-Wno-literal-suffix)
add_compile_options(-fconcepts)
add_compile_options(-fstack-clash-protection)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-Wno-overloaded-virtual)
add_compile_options(-Wno-user-defined-literals)
endif()
add_compile_definitions(DEBUG SANITIZE_PTRS)