浏览代码

Build: Add -fsized-deallocation to global CXXFLAGS

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.
Andreas Kling 4 年之前
父节点
当前提交
2362ebf483
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -101,6 +101,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
 set(CMAKE_CXX_EXTENSIONS OFF)
 
 
 add_compile_options(-Wno-literal-suffix)
 add_compile_options(-Wno-literal-suffix)
+add_compile_options(-fsized-deallocation)
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     add_compile_options(-Wno-literal-suffix)
     add_compile_options(-Wno-literal-suffix)
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")