Skip to content

Allow external management of C++ Compiler standard  #182

@kutschke

Description

@kutschke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions