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

Allow external management of C++ Compiler standard #182

Open
kutschke opened this issue Sep 18, 2023 · 1 comment
Open

Allow external management of C++ Compiler standard #182

kutschke opened this issue Sep 18, 2023 · 1 comment

Comments

@kutschke
Copy link
Contributor

Currently the choice of the C++ compiler standard is hard coded at this line:

set(CMAKE_CXX_STANDARD 20)

Dave asked how we can manage it externally so that we can make a compiler version change in a production build without needing to edit and retag the repo. My suggestion is that CMakeLists.txt can check for the environment variable CMAKE_CXX_STANDARD; if it is present copy its value into the cmake variable of the same name; if it is not present, default to a recommended value, currently 20.

To complete the solution for Mu2e, upate KinKal_to_UPS to define CMAKE_CXX_STANDARD, with a default of 20 that can be overriden by a command line option.

We can also consider adding similar support for other compiler options that we wish to control externally.

@kutschke
Copy link
Contributor Author

When the fix is made in KinKal, please contact me and I will add the new piece to KinKal_to_UPS.

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

No branches or pull requests

1 participant