فهرست منبع

Merge pull request #4479 from lioncash/concepts

CMakeLists: Resolve #4478
bunnei 6 سال پیش
والد
کامیت
e8868c2ed1
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      src/CMakeLists.txt

+ 6 - 1
src/CMakeLists.txt

@@ -60,9 +60,14 @@ else()
         -Wmissing-declarations
         -Wmissing-declarations
         -Wno-attributes
         -Wno-attributes
         -Wno-unused-parameter
         -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)
     if (ARCHITECTURE_x86_64)
         add_compile_options("-mcx16")
         add_compile_options("-mcx16")
     endif()
     endif()