Skip to content
Open
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

project(torch-mlir LANGUAGES CXX C)
set(CMAKE_C_STANDARD 11)
Copy link
Author

Choose a reason for hiding this comment

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

I did not apply the same change for the CMAKE_C_STANDARD , as downstream we use an older c version

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use")
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about just using 20 here if this is what we want? Then also CI builds of this repo will use the version we want?
See also my comment on onnx-mlir

Suggested change
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use")
set(CMAKE_CXX_STANDARD 20)


include(CMakeDependentOption)

Expand Down
2 changes: 1 addition & 1 deletion lib/RefBackend/RefBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static std::string getConsumeReturnFunctionNameForReturnTypes(TypeRange types) {
tokens.push_back(getTypeToken(type));

return std::accumulate(tokens.begin(), tokens.end(), std::string(),
[](std::string &a, std::string &b) {
[](const std::string &a, const std::string &b) {
return a.empty() ? b : (a + "_" + b);
});
}
Expand Down
Loading