With my patch cflags can be read from an ini styled file.
The format of the file looks like this:
[<path/to/project>]
-I
-D
...
The file is read every time a new clang-complete process is created. This way
one can update the cflags file and the changes will be applied as soon a file is
newly opened.
The paths to the include directories are expanded relative to the path within
the brackets, if they are relative. None, one or more sections my apply to a
single source file if the paths within the braces lay in the path of the current
source file:
source file: ~/src/myproj/subdir/module.cpp
cflags-file:
[~]
...
[~/src/myproj]
...
[~/src/myproj/subdir]
...
[~/src/otherproj]
...
If the file ~/src/myproj/subdir/module.cpp is visited the flags from the
sections [~], [~/src/myproj] and [~/src/myproj/subdir] are applied to this file.
The file, which is used to fill the cflags variable, can be customized by setting
the variable ac-clang-cflags-file.
With my patch cflags can be read from an ini styled file.
The format of the file looks like this:
[<path/to/project>] -I
-D
...
The file is read every time a new clang-complete process is created. This way one can update the cflags file and the changes will be applied as soon a file is newly opened. The paths to the include directories are expanded relative to the path within the brackets, if they are relative. None, one or more sections my apply to a single source file if the paths within the braces lay in the path of the current source file:
source file: ~/src/myproj/subdir/module.cpp
cflags-file:
[~] ...
[~/src/myproj] ...
[~/src/myproj/subdir] ...
[~/src/otherproj] ...
If the file ~/src/myproj/subdir/module.cpp is visited the flags from the sections [~], [~/src/myproj] and [~/src/myproj/subdir] are applied to this file.
The file, which is used to fill the cflags variable, can be customized by setting the variable ac-clang-cflags-file.