Skip to content

Commit

Permalink
[infra] Support GCC as compiler for Taichi developers (experimental) (#…
Browse files Browse the repository at this point in the history
…1598)

* [infra] Support GCC as compiler for Taichi developers

* revert
  • Loading branch information
archibate authored Aug 2, 2020
1 parent 3d88de6 commit 0019090
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmake/TaichiCXXFlags.cmake
Original file line number Diff line number Diff line change
@@ -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 ")
2 changes: 1 addition & 1 deletion taichi/util/action_recorder.h
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 0019090

Please sign in to comment.