druidengine / druidengine/druid

Move compiler flags from cmake files and into preset files.

Open
#21 0 comments 0 reactions 1 assignee Claimed by @funnan-dev View on GitHub
enhancement good first issue
Dominant language
C++
Stars
3
Forks
6
PR merge metrics
No merged PRs in 30d

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-.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`. Inherits `use-clang`.
- [ ] `user-clang-asan.json`. Inherits `use-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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.