Move compiler flags from cmake files and into preset files.
#21 aberto em 1 de out. de 2025
Métricas do repositório
- Stars
- (3 stars)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
Is your feature request related to a problem? Please describe.
I want to move the hard-coded compiler flags out of cmake configuration to allow users the flexibility to provide their own flags if they choose to not use cmake --preset and instead use cmake -DCMAKE_CXX_FLAGS=.
Describe the solution you'd like
Currently, the compiler flags exist in cmake\project_compile_options.cmake. These flags need to be moved to their reespective use-<compiler>.json file found in cmake/preset/.
- General compiler flags moved to:
-
use-clang.json -
use-gcc.json -
use-msvc.json
-
- Create presets and move flags into:
-
use-clang-tsan.json. Inheritsuse-clang. -
user-clang-asan.json. Inheritsuse-clang.
-
- Create preset and move hardened flags into:
-
use-clang-hardened.json -
use-gcc-hardened.json -
use-msvc-hardened.json
-
Describe alternatives you've considered For the longest time, these flags remained in the cmake file to enfore all sub projects to use. With the advent of cmake presets this is no longer necessary to ensure quick, automatic, configuration.
Additional context I'm not 100% sure all the different compiler options work. They've been untested for a while.