Changed the way the hash is created in hash_inputs()
#24
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.
I changed the way the hash is created in
hash_inputs()
because building a project with VSCode and Ninja outputs many thousands of lines of code when running this part of the original code:which causes the project to hang indefinately.
I also noticed that
stdout
andstderr
get switched around when compiling with cl.exe vs clang.exe although I can no longer be sure that was the case.The method now calculates the hash with the time the source file was last modified, the lines within any .clang-tidy config files, and then the args. The last two are more or less the same as the original code although the method I use to find the .clang-tidy is different and requires a new arg to be passed to clang-tidy:
--directories_with_clang_tidy=<file1*file2*...>
. This can be achieved in CMake with the following code:I used "*" because (at least on Windows) this character can not be used in a folder name. I have only done limited testing with my hobby projects, there may be other
source_file_extensions
to consider when identifying the source file clang-tidy is being called on.Thank you for creating such a cool tool. I spent about a day trying to figure out what the issue was and how to fix it but I'm sure this will save me a great deal of time in the future.