quarnster/SublimeClang — pull request #170 by mchamberlain (2012-11-16 14:21:20+00:00)
Title: Added the options_file setting.

A JSON file that contains a map of source file names to lists of options
for that file. This provides similar functionality to options_script,
but without the need to run an external script.

I originally based this on issue #135 with the aim of making it more
general, but I am working on a Sublime Text 2/SublimeClang generator for
CMake where I would like to make use of this.

I realise that the options_script is the favoured way of providing this
functionality, I just feel it makes sense for the plug-in to have a built-in way
(that doesn't rely on external scripts that may or may not be limited to a
certain platform or build system) to get different compile flags/options
per source file.

Example:
{
"/path/to/source_file1.cpp" :
[
"-DTEST1",
"-DTEST2",
"-I/some/include/dir1"
],
"/path/to/source_file2.h" :
[
"-DTEST3",
"-DTEST4",
"-I/some/include/dir2"
]
}