Skip to content

Conversation

jcwchen
Copy link
Member

@jcwchen jcwchen commented Sep 21, 2023

Description

  • Bump CMAKE_CXX_STANDARD as 17 globally (Windows and non-Windows).
  • Update README.md accordingly.

Motivation and Context

Currently by default onnx uses CMAKE_CXX_STANDARD 17 on Windows, but by contrast it uses CMAKE_CXX_STANDARD 14 on other platforms. It's a bit confusing. Also it blocks onnx utilizing C++ 17 features. Trying this PR to verify ONNX CI Pipelines with this update. If no one has other concern, we will target next release (possibly 1.16) to include this CMAKE_CXX_STANDARD bump. Users who build their onnx from their own are still able to specify their own CMAKE_CXX_STANDARD version.

Anyone has any question/concern, feel free to chime in. Thanks!

🤖 Generated by Copilot at a1c07ad

Summary

🧹🔄📝

Simplify and unify the C++ standard version setting for ONNX. Update the README.md file accordingly.

CMAKE_CXX_STANDARD
Simpler and consistent now
Autumn of cleanup

Walkthrough

  • Simplify CMake logic for setting C++ standard version (link)
  • Update README documentation to match CMake changes (link)

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@jcwchen jcwchen added module: CI pipelines Issues related to the CI pipeline run release CIs Use this label to trigger release tests in CI labels Sep 21, 2023
@jcwchen jcwchen added this to the 1.16 milestone Sep 21, 2023
@jcwchen jcwchen requested a review from a team as a code owner September 21, 2023 16:29
@jcwchen jcwchen marked this pull request as draft September 21, 2023 16:29
@jcwchen jcwchen marked this pull request as ready for review September 22, 2023 03:09
@jcwchen jcwchen added the announcement Important information for users/developers label Sep 22, 2023
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
@xadupre xadupre enabled auto-merge October 2, 2023 16:46
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

@xadupre xadupre added this pull request to the merge queue Oct 26, 2023
Merged via the queue into onnx:main with commit b5e1378 Oct 26, 2023
@jcwchen jcwchen deleted the jcw/bump-c-17 branch October 26, 2023 23:50
isdanni pushed a commit to isdanni/onnx that referenced this pull request Nov 2, 2023
### Description
<!-- - Describe your changes. -->
- Bump CMAKE_CXX_STANDARD as 17 globally (Windows and non-Windows).
- Update README.md accordingly.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
Currently by default onnx uses CMAKE_CXX_STANDARD 17 on Windows, but by
contrast it uses CMAKE_CXX_STANDARD 14 on other platforms. It's a bit
confusing. Also it blocks onnx utilizing C++ 17 features. Trying this PR
to verify ONNX CI Pipelines with this update. If no one has other
concern, we will target next release (possibly 1.16) to include this
CMAKE_CXX_STANDARD bump. Users who build their onnx from their own are
still able to specify their own CMAKE_CXX_STANDARD version.

Anyone has any question/concern, feel free to chime in. Thanks!

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at a1c07ad</samp>

### Summary
🧹🔄📝

<!--
1. 🧹 - This emoji represents the simplification and cleanup of the CMake
logic for setting the C++ standard version.
2. 🔄 - This emoji represents the consistency and alignment of the C++
standard version across platforms and the possibility of overriding it
with a custom value.
3. 📝 - This emoji represents the documentation update in the README.md
file.
-->
Simplify and unify the C++ standard version setting for ONNX. Update the
`README.md` file accordingly.

> _`CMAKE_CXX_STANDARD`_
> _Simpler and consistent now_
> _Autumn of cleanup_

### Walkthrough
* Simplify CMake logic for setting C++ standard version
([link](https://github.com/onnx/onnx/pull/5612/files?diff=unified&w=0#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL58-R59))
* Update README documentation to match CMake changes
([link](https://github.com/onnx/onnx/pull/5612/files?diff=unified&w=0#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L114-R114))

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Miriup pushed a commit to Miriup/onnx-cuda-10.2 that referenced this pull request Nov 28, 2024
<!-- - Describe your changes. -->
- Bump CMAKE_CXX_STANDARD as 17 globally (Windows and non-Windows).
- Update README.md accordingly.

<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
Currently by default onnx uses CMAKE_CXX_STANDARD 17 on Windows, but by
contrast it uses CMAKE_CXX_STANDARD 14 on other platforms. It's a bit
confusing. Also it blocks onnx utilizing C++ 17 features. Trying this PR
to verify ONNX CI Pipelines with this update. If no one has other
concern, we will target next release (possibly 1.16) to include this
CMAKE_CXX_STANDARD bump. Users who build their onnx from their own are
still able to specify their own CMAKE_CXX_STANDARD version.

Anyone has any question/concern, feel free to chime in. Thanks!

<!--
copilot:all
-->

🧹🔄📝

<!--
1. 🧹 - This emoji represents the simplification and cleanup of the CMake
logic for setting the C++ standard version.
2. 🔄 - This emoji represents the consistency and alignment of the C++
standard version across platforms and the possibility of overriding it
with a custom value.
3. 📝 - This emoji represents the documentation update in the README.md
file.
-->
Simplify and unify the C++ standard version setting for ONNX. Update the
`README.md` file accordingly.

> _`CMAKE_CXX_STANDARD`_
> _Simpler and consistent now_
> _Autumn of cleanup_

* Simplify CMake logic for setting C++ standard version
([link](https://github.com/onnx/onnx/pull/5612/files?diff=unified&w=0#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL58-R59))
* Update README documentation to match CMake changes
([link](https://github.com/onnx/onnx/pull/5612/files?diff=unified&w=0#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L114-R114))

---------

Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
(cherry picked from commit b5e1378)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement Important information for users/developers module: CI pipelines Issues related to the CI pipeline run release CIs Use this label to trigger release tests in CI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants