Page MenuHomeHEPForge

Only allow increase of C++ standard via environment variable
ClosedPublic

Authored by tlatham on Nov 15 2023, 1:00 PM.

Details

Summary

Tweak to the part of the CMake configuration that allows the version of the C++ standard to be modified via the environment variable CMAKE_CXX_STANDARD.
The modified implementation only allows the value to be changed if the specified standard is newer than our default, currently C++17.

Test Plan

Configured the project with the environment variable set to 14 and 20 and obtained the expected behaviour: no change, standard bumped to C++20.

Diff Detail

Repository
rEVTGEN evtgen
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tlatham created this revision.
tlatham changed the visibility from "All Users" to "Public (No Login Required)".
tlatham changed the edit policy from "All Users" to "Restricted Project (Project)".
tlatham added a project: Restricted Project.
tlatham retitled this revision from Allow increase of C++ standard via environment variable to Only allow increase of C++ standard via environment variable.

The changes look good to me. Ok, understood that this is just avoiding to use an user defined CMAKE_CXX_STANDARD if it is lower than our standard.

This revision is now accepted and ready to land.Nov 15 2023, 1:58 PM
tlatham edited the test plan for this revision. (Show Details)

Thanks. @abudinen, I've tried to improve the clarity of the description following our discussion.