Is your feature request related to a problem? Please describe.
Allow optimizations to be globally configurable, as they should be, we should not be enforcing anything on the developer
Describe the solution you'd like
move to cmake vars/env vars
Describe alternatives you've considered
none
Additional context
#3458 (comment)