Closed alexcani closed 3 years ago
@muggenhor, (if you're still reading along and can find some time) can you elaborate on why the CACHE STRING "" FORCE
was part of setting the CMAKE_CXX_FLAGS?
I somehow cannot deduce from the the cmake documentation that this bleeds into the external / calling project, but that may be an implicit property of a cached variable (i.e. always being set at the highest level and not for the current directory only).
Hi @alexcani,
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾
In return for this generous offer we hope you will:
On behalf of the Cucumber core team, Aslak Hellesøy Creator of Cucumber
@muggenhor, (if you're still reading along and can find some time) can you elaborate on why the
CACHE STRING "" FORCE
was part of setting the CMAKE_CXX_FLAGS?I somehow cannot deduce from the the cmake documentation that this bleeds into the external / calling project, but that may be an implicit property of a cached variable (i.e. always being set at the highest level and not for the current directory only).
Just noticed this message now (ever since our company switched to GitHub I get swamped in GH mails).
Anyway, I'm pretty sure this was a copy paste error on my side because a few other CMake projects that I used at the time injected CMAKE_*_FLAGS
via the cache, so this was the only way to affect a change there. That wouldn't have applied here, but it affected my approach to thinking about CMake at the time.
Remove CACHE FORCE arguments from CMAKE_CXX_FLAG on colored terminal output
Summary
By using CACHE STRING "" FORCE on 'set' command this updated CMAKE_CXX_FLAG on any parent directory, thus leaking internal configuration into external projects that may be using cucumber-cpp through add_directory.
Details
An example is -Werror -Wall -Wextra flags set on "Generic Compiler Flags". In a Unix + Ninja + GCC environment those flags would leak into parent directories
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: