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
cmake: speed up warning option detection #964
Merged
tatsuhiro-t
merged 8 commits into
ngtcp2:main
from
vszakats:cmake-fast-warnopt-detection
Oct 14, 2023
Merged
cmake: speed up warning option detection #964
tatsuhiro-t
merged 8 commits into
ngtcp2:main
from
vszakats:cmake-fast-warnopt-detection
Oct 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vszakats
force-pushed
the
cmake-fast-warnopt-detection
branch
from
October 9, 2023 11:46
4aa49c6
to
8f44279
Compare
vszakats
force-pushed
the
cmake-fast-warnopt-detection
branch
from
October 9, 2023 12:07
0afcb97
to
1679e9f
Compare
Thank you for PR. Could you change the license to MIT and rpelace the license header with the following one?
|
I've updated the licenses. |
Thank you! Merged now. |
This was referenced Oct 14, 2023
vszakats
added a commit
to vszakats/ngtcp2
that referenced
this pull request
Oct 23, 2023
Previously these were were included transitively via `cmake/ExtractValidFlags.cmake`. ngtcp2#964 deleted that file. The replacements it added pulled these includes after the local code uses them. Re-add these includes into the `CMakeLists.txt` that uses them. Fixes ngtcp2#979
vszakats
added a commit
to vszakats/ngtcp2
that referenced
this pull request
Oct 23, 2023
Previously these were were included transitively via `cmake/ExtractValidFlags.cmake`. ngtcp2#964 deleted that file. The replacements it added pulled these includes after the local code uses them. Re-add these includes into the `CMakeLists.txt` that uses them. Reported-by: fpliu Fixes ngtcp2#979
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch makes CMake configuration faster by dropping feature checks
for each individual "picky" C/C++ compiler warning options and instead
enable them based on compiler version. It also allows to add options using
the old, feature-check method.
I've implemented this for libssh2 [1] and curl [2] earlier this year.
This patch is based on those, by adapting it to the warning options used
by ngtcp2.
It brings CMake configuration time down from 15 to 5 seconds on my local
machine.
Special mention for
-Wextended_offsetof
: I could find no evidence thatthis warning option was ever implemented in clang (or gcc), so this patch
deletes it.
[1] libssh2
libssh2/libssh2@ec0feae
libssh2/libssh2#952
[2] curl
curl/curl@9c543de
curl/curl#10973
If this is welcome, I have a similar patch for nghttp2 and nghttp3 as well.