Skip to content

Commit

Permalink
CMake: Remove redundancies and support clang ToT
Browse files Browse the repository at this point in the history
Problem:
- There are redundant options being set for some directories.
- Clang ToT fails to compile the project.

Solution:
- Remove redundancies.
- Fix clang error list.
  • Loading branch information
ldm5180 authored and awesomekling committed Apr 18, 2021
1 parent aaf3d26 commit 97f4aa1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 97f4aa1

Please sign in to comment.