From 97f4aa166a2c766bf57947fcd5c2b9a83b77d00c Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sun, 18 Apr 2021 10:50:53 -0600 Subject: [PATCH] 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. --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad27daa6d1..87fd071143 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)