Skip to content

Commit

Permalink
[CMake] force C++ version for more recent ROOT
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed May 14, 2024
1 parent 735862d commit afba498
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ if(NOT DISABLE_CERN_ROOT)
find_package(CERN_ROOT)
if (CERN_ROOT_FOUND)
message(STATUS "ROOT Version: ${CERN_ROOT_VERSION}")
if (${CERN_ROOT_VERSION} VERSION_GREATER 6.23.99)
if (${CERN_ROOT_VERSION} VERSION_GREATER 6.29.99)
message(STATUS "ROOT Version is >= 6.30. Setting the minimum CXX version to 20.")
UseCXX(20)
elseif (${CERN_ROOT_VERSION} VERSION_GREATER 6.27.99)
message(STATUS "ROOT Version is >= 6.28. Setting the minimum CXX version to 17.")
UseCXX(17)
elseif (${CERN_ROOT_VERSION} VERSION_GREATER 6.23.99)
message(STATUS "ROOT Version is >= 6.24. Setting the minimum CXX version to 14.")
UseCXX(14)
endif()
Expand Down
5 changes: 3 additions & 2 deletions documentation/release_6.1.htm
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ <h3>Other code changes</h3>

<h3>Build system</h3>
<ul>
<li>
</li>
<li>
Force C++ version according to CERN ROOT versions: ROOT 6.28.10 needs C++17 and 6.30.2 needs C++20.
</li>
</ul>

<h3>Test changes</h3>
Expand Down

0 comments on commit afba498

Please sign in to comment.