-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn on CodeQL and fix BinSkim regressions #805
Conversation
How about using CMake presets instead and be a good example how CMake should be done ? |
if(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /guard:cf") | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /debugtype:cv,fixup /guard:cf") | ||
# either MSVC, or clang-cl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, we should either:
add_compile_options()
/add_link_options()
- Move these to a Toolchain file
Modifying CMAKE_C(XX)_FLAGS in the CMakeLists.txt is always a smell. That said, this works and follows what came before, so not requiring changes at this time.
This is a controversial opinion among the vcpkg maintainers, but I still believe that CMake expecting application authors to separate warnings manipulation into separate files is unreasonable. And I cite as evidence that I've reviewed a lot of things that are shipped into vcpkg ports and never ever seen a project do it. Separate files is a statement that separate people are interested in the values, and that isn't true for diagnostics. Contrast with |
Most ports predate presets and most projects don't care about proper CMake ;) |
And so do we. |
That is just the warning flag setting business and leaves at least: Lines 120 to 130 in 5fdee72
|
No description provided.