cmake: improve clang-tidy test command-line reproduction#20829
Closed
vszakats wants to merge 3 commits intocurl:masterfrom
Closed
cmake: improve clang-tidy test command-line reproduction#20829vszakats wants to merge 3 commits intocurl:masterfrom
vszakats wants to merge 3 commits intocurl:masterfrom
Conversation
- also query `INTERFACE_COMPILE_DEFINITIONS` and `INTERFACE_COMPILE_OPTIONS`. For correctness, at the moment they are not likely to pick up new options. Further syncing clang-tidy manual command-lines with the compiler command-lines generated by CMake. In practice this adds `-I` options (via `INTERFACE_COMPILE_OPTIONS`) to the end of the command-line for dependency header directories. It does not change the outcome of clang-tidy runs. - drop redundant `unset()`. - rename local function to be more specific. Follow-up to d9386a2 curl#20759
This file contains hidden or 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
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.
also query
INTERFACE_COMPILE_DEFINITIONSandINTERFACE_COMPILE_OPTIONS.To further sync clang-tidy manual command-lines with the C compiler
command-lines generated by CMake. In practice this adds
-Ioptions(via
INTERFACE_COMPILE_OPTIONS) to the end of the command-line fordependency header directories. It does not change the outcome of
clang-tidy runs.
limit querying
COMPILE_DEFINITIONSandCOMPILE_OPTIONSto the toptarget, the test itself. To not include options such as
-DCURL_HIDDEN_SYMBOLSand-fvisibility=hidden(when set) viathe libcurl shared lib.
To sync with the actual C compiler command-line.
drop redundant
unset().rename local function to be more specific.
Follow-up to d9386a2 #20759