diff --git a/cmake/TaichiCXXFlags.cmake b/cmake/TaichiCXXFlags.cmake index 902261e3762ba..4313270baca19 100644 --- a/cmake/TaichiCXXFlags.cmake +++ b/cmake/TaichiCXXFlags.cmake @@ -25,7 +25,11 @@ else() if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") message("Clang compiler detected. Using std=c++17.") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fsized-deallocation") + elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + message("GNU compiler detected. Using std=c++17.") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fsized-deallocation -Wno-class-memaccess -Wno-comment -Wno-sign-compare") else() + message("Invalid compiler ${CMAKE_CXX_COMPILER_ID} detected.") message(FATAL_ERROR "clang and MSVC are the only supported compilers for Taichi compiler development. Consider using 'cmake -DCMAKE_CXX_COMPILER=clang' if you are on Linux") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") diff --git a/taichi/util/action_recorder.h b/taichi/util/action_recorder.h index f11d9522967d5..8de8f04ed7349 100644 --- a/taichi/util/action_recorder.h +++ b/taichi/util/action_recorder.h @@ -35,7 +35,7 @@ struct ActionArg { int64 val_int64; float64 val_float64; - enum argument_type { str, int64, float64 }; + enum class argument_type { str, int64, float64 }; argument_type type; };