Created
October 28, 2021 08:38
-
-
Save orklann/2f5c2989cdf0a84a1f6ff96f9c442c13 to your computer and use it in GitHub Desktop.
Generating .clang_complete for current folder
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
#!/usr/bin/env python3 | |
import os | |
def walk_through_files(path, file_extension='.h'): | |
for (dirpath, dirnames, filenames) in os.walk(path): | |
for filename in filenames: | |
if filename.endswith(file_extension): | |
yield os.path.join(dirpath, filename) | |
current_dir = os.getcwd() | |
for fname in walk_through_files(current_dir): | |
print('-include "' + fname + '"') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment