-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Currently the choice of the C++ compiler standard is hard coded at this line:
Line 35 in 07abb0f
| 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.