Skip to content

Do not override C++ standard in in-tree built. Also fix an issue preventing building with C++20#618

Open
jorickert wants to merge 1 commit intofeature/backport_ea1_opsfrom
jrickert.c++20
Open

Do not override C++ standard in in-tree built. Also fix an issue preventing building with C++20#618
jorickert wants to merge 1 commit intofeature/backport_ea1_opsfrom
jrickert.c++20

Conversation

@jorickert
Copy link
Copy Markdown

No description provided.

@jorickert jorickert requested a review from mgehre-amd October 2, 2025 11:47
Comment thread CMakeLists.txt
@@ -23,7 +23,7 @@ endif()

project(torch-mlir LANGUAGES CXX C)
set(CMAKE_C_STANDARD 11)
Copy link
Copy Markdown
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

Comment thread CMakeLists.txt
project(torch-mlir LANGUAGES CXX C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use")
Copy link
Copy Markdown
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants