Skip to content

Commit

Permalink
remove hardcoded paths from clang_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Nov 8, 2015
1 parent abed19b commit 603e282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _tools/clang_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def builtin_flags_gcc():

gcc_includes = builtin_flags_gcc()

def get_tu_from_file(filepath):
def get_tu_from_file(filepath, of_root):
#f = open(filepath)
#content = f.read()
#filename = os.path.basename(filepath)
#files = [(filename,content)]
args = ("-Wall -std=c++14 -DGCC_HAS_REGEX -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -D_REENTRANT -pthread -xc++ " + gcc_includes + " -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/AL -I/usr/include/alsa -I/usr/include/GL -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/arturo/Code/openFrameworks/libs/cpp-netlib/include -I/home/arturo/Code/openFrameworks/libs/cpp-netlib/include/cpp-netlib -I/home/arturo/Code/openFrameworks/libs/cpp-netlib/include/cpp-netlib/network -I/home/arturo/Code/openFrameworks/libs/fmodex/include -I/home/arturo/Code/openFrameworks/libs/glfw/include -I/home/arturo/Code/openFrameworks/libs/glfw/include/GLFW -I/home/arturo/Code/openFrameworks/libs/kiss/include -I/home/arturo/Code/openFrameworks/libs/poco/include -I/home/arturo/Code/openFrameworks/libs/sndfile/include -I/home/arturo/Code/openFrameworks/libs/tess2/include -I/home/arturo/Code/openFrameworks/libs/utf8cpp/include -I/home/arturo/Code/openFrameworks/libs/utf8cpp/include/utf8 -I/home/arturo/Code/openFrameworks/libs/openFrameworks -I/home/arturo/Code/openFrameworks/libs/openFrameworks/build -I/home/arturo/Code/openFrameworks/libs/openFrameworks/utils -I/home/arturo/Code/openFrameworks/libs/openFrameworks/communication -I/home/arturo/Code/openFrameworks/libs/openFrameworks/app -I/home/arturo/Code/openFrameworks/libs/openFrameworks/events -I/home/arturo/Code/openFrameworks/libs/openFrameworks/graphics -I/home/arturo/Code/openFrameworks/libs/openFrameworks/math -I/home/arturo/Code/openFrameworks/libs/openFrameworks/types -I/home/arturo/Code/openFrameworks/libs/openFrameworks/sound -I/home/arturo/Code/openFrameworks/libs/openFrameworks/gl -I/home/arturo/Code/openFrameworks/libs/openFrameworks/3d -I/home/arturo/Code/openFrameworks/libs/openFrameworks/video -DDEBUG").split(" ")
args = ("-Wall -std=c++14 -DGCC_HAS_REGEX -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -D_REENTRANT -pthread -xc++ " + gcc_includes + " -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/AL -I/usr/include/alsa -I/usr/include/GL -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I{OF_ROOT}/libs/cpp-netlib/include -I{OF_ROOT}/libs/cpp-netlib/include/cpp-netlib -I{OF_ROOT}/libs/cpp-netlib/include/cpp-netlib/network -I{OF_ROOT}/libs/fmodex/include -I{OF_ROOT}/libs/glfw/include -I{OF_ROOT}/libs/glfw/include/GLFW -I{OF_ROOT}/libs/kiss/include -I{OF_ROOT}/libs/poco/include -I{OF_ROOT}/libs/sndfile/include -I{OF_ROOT}/libs/tess2/include -I{OF_ROOT}/libs/utf8cpp/include -I{OF_ROOT}/libs/utf8cpp/include/utf8 -I{OF_ROOT}/libs/openFrameworks -I{OF_ROOT}/libs/openFrameworks/build -I{OF_ROOT}/libs/openFrameworks/utils -I{OF_ROOT}/libs/openFrameworks/communication -I{OF_ROOT}/libs/openFrameworks/app -I{OF_ROOT}/libs/openFrameworks/events -I{OF_ROOT}/libs/openFrameworks/graphics -I{OF_ROOT}/libs/openFrameworks/math -I{OF_ROOT}/libs/openFrameworks/types -I{OF_ROOT}/libs/openFrameworks/sound -I{OF_ROOT}/libs/openFrameworks/gl -I{OF_ROOT}/libs/openFrameworks/3d -I{OF_ROOT}/libs/openFrameworks/video -DDEBUG").format({"OF_ROOT": of_root}).split(" ")
index = Index.create()
tu = index.parse(filepath, args=args,
options=TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD)
Expand Down
2 changes: 1 addition & 1 deletion _tools/documentation_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def parse_folder(root, files, is_addon=False):
file_count+=1
filename = os.path.join(root, name)
if name.find('of')==0 and os.path.splitext(name)[1]=='.h':
tu = clang_utils.get_tu_from_file(filename)
tu = clang_utils.get_tu_from_file(filename, of_root)
num_functions = 0
for child in tu.cursor.get_children():
if is_class(child) and child.spelling.find('of')==0:
Expand Down

0 comments on commit 603e282

Please sign in to comment.