This PR ensures that compiler flags are applied exclusively during compiler invocations.
Below is a summary of differences between CMAKE_CXX_FLAGS and APPEND_CXXFLAGS variables:
CMAKE_CXX_FLAGS |
APPEND_CXXFLAGS |
|
|---|---|---|
| Origin | CMake’s standard variable | Bitcoin Core’s custom variable |
| Context | Language-wide, applied during compiling and linking | Compiler only |
| Position | Prepends others flags | Appends other flags |
Fixes #31487. However, during the development of the staging branch, the general consensus was to adhere to CMake’s standard variables as much as possible.