microsoft / microsoft/SPTAG

include previous value when setting CMAKE_CXX_FLAGS on Linux

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.