|
|
@@ -35,38 +35,8 @@ import subprocess
|
|
|
# These are the compilation flags that will be used in case there's no
|
|
|
# compilation database set (by default, one is not set).
|
|
|
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
|
|
|
-flags = [
|
|
|
-'-Wall',
|
|
|
-'-Wextra',
|
|
|
-#'-Werror',
|
|
|
-'-Wno-long-long',
|
|
|
-'-Wno-variadic-macros',
|
|
|
-'-fexceptions',
|
|
|
-'-DNDEBUG',
|
|
|
-'-m32',
|
|
|
-# You 100% do NOT need -DUSE_CLANG_COMPLETER in your flags; only the YCM
|
|
|
-# source code needs it.
|
|
|
-'-DUSE_CLANG_COMPLETER',
|
|
|
-# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
|
|
|
-# language to use when compiling headers. So it will guess. Badly. So C++
|
|
|
-# headers will be compiled as C headers. You don't want that so ALWAYS specify
|
|
|
-# a "-std=<something>".
|
|
|
-# For a C project, you would set this to something like 'c99' instead of
|
|
|
-# 'c++11'.
|
|
|
-'-std=c++11',
|
|
|
-# ...and the same thing goes for the magic -x option which specifies the
|
|
|
-# language that the files to be compiled are written in. This is mostly
|
|
|
-# relevant for c++ headers.
|
|
|
-# For a C project, you would set this to 'c' instead of 'c++'.
|
|
|
-'-x',
|
|
|
-'c++',
|
|
|
-'-isystem',
|
|
|
-os.environ['NDLESS_GIT'] + '/ndless-sdk/include',
|
|
|
-'-isystem',
|
|
|
-os.environ['HOME'] + '/.ndless/include',
|
|
|
-]
|
|
|
-
|
|
|
-flags += subprocess.check_output(["make", "include"]).split(" ")
|
|
|
+flags = ['-x', 'c++']
|
|
|
+flags += subprocess.check_output(["make", "cflags"]).split(" ")
|
|
|
|
|
|
|
|
|
# Set this to the absolute path to the folder (NOT the file!) containing the
|