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

Use the recommended way to set the c++ standard via cmake #23

Merged

Conversation

tmadlener
Copy link
Contributor

Use the recommended CMAKE_CXX_STANDARD to set the c++ standard instead of adding it to the CMAKE_CXX_FLAGS. Leave the default at 11 and for now only allow 11, 14, 17 and 20.

Effectively the same change as PandoraPFA/PandoraSDK#16

CMakeLists.txt Outdated
Comment on lines 45 to 47
if(NOT CMAKE_CXX_STANDARD MATCHES "11|14|17|20")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}")
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the proposed changes Thomas. My main request here would be to avoid this restriction. We only want to require a minimum standard (at which point the previous set of CMAKE_CXX_STANDARD should be sufficient), not apply future constraints. (We should now be able to make this minimum 17 rather than 11).

Copy link
Collaborator

@AndyChappell AndyChappell left a comment

Choose a reason for hiding this comment

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

Change looks good, thanks.

@AndyChappell AndyChappell changed the base branch from master to feature/cmake_update January 6, 2025 12:53
@AndyChappell AndyChappell merged commit c3617b3 into PandoraPFA:feature/cmake_update Jan 6, 2025
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