浏览代码

CMakeLists: Resolve #4478

This switch is enabled by default in all recent versions of GCC and
Clang.
Lioncash 6 年之前
父节点
当前提交
dd2ff23621
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/CMakeLists.txt

+ 6 - 1
src/CMakeLists.txt

@@ -60,9 +60,14 @@ else()
         -Wmissing-declarations
         -Wno-attributes
         -Wno-unused-parameter
-        -fconcepts
     )
 
+    # TODO: Remove when we update to a GCC compiler that enables this
+    #       by default (i.e. GCC 10 or newer).
+    if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+        add_compile_options(-fconcepts)
+    endif()
+
     if (ARCHITECTURE_x86_64)
         add_compile_options("-mcx16")
     endif()