Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] Support GCC as compiler for Taichi developers (experimental) #1598

Merged
merged 2 commits into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/TaichiCXXFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this message and doc when GCC is battle-tested.

endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ")
Expand Down
2 changes: 1 addition & 1 deletion taichi/util/action_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down