Skip to content

Use CMAKE_CXX_FLAGS_${BUILD_TYPE}_INIT to overwrite cmake defaults #6577

@stwunsch

Description

@stwunsch

The current setup of the defaults for CMAKE_CXX_FLAGS_${BUILD_TYPE} are not picked up (also see #6574). To change the defaults for ROOT and allowing users to set their own CMAKE_CXX_FLAGS_${BUILD_TYPE} flags, the definition of the ROOT specific defaults have to move before we invoke project(ROOT).

Geant4 has a proper implementation of such a mechanic here. The proper approach is overwriting CMAKE_CXX_FLAGS_${BUILD_TYPE}_INIT (note the _INIT) before invoking project(ROOT).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions