Skip to content

Commit

Permalink
Build: Add -fsized-deallocation to global CXXFLAGS
Browse files Browse the repository at this point in the history
This is enabled by default for GCC (>=C++14) but apparently not for
Clang, which has been causing CLion to get confused about kernel code.
  • Loading branch information
awesomekling committed Aug 7, 2021
1 parent 9da9398 commit 2362ebf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_compile_options(-Wno-literal-suffix)
add_compile_options(-fsized-deallocation)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-Wno-literal-suffix)
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
Expand Down

0 comments on commit 2362ebf

Please sign in to comment.