include previous value when setting CMAKE_CXX_FLAGS on Linux
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 622
- Avg merge
- 8h 37m
- Merged PRs (30d)
- 5
Description
On Linux, the CXXFLAGS passed to cmake are not preserved, this is because the main cmake file overwrites CMAKE_CXX_FLAGS instead of appending to it. This does not occur on Windows and the other CMAKE_*_FLAGS variables are all set correctly.
Currently CMAKE_CXX_FLAGS is set like this:
set (CMAKE_CXX_FLAGS "...")
It should be set like this instead:
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ...")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the main CMake file and inspect where CMAKE_CXX_FLAGS is set on Linux. Reproduce the configuration with an existing CXXFLAGS value, update the setting to preserve it, and verify that the resulting CMake configuration includes both the previous and project flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100