Using -x c++ in clang opts so that headers compile
The problem is that clang loves to assume that .h files are in C. -x c++ gives it a nudge in the right direction.
This commit is contained in:
parent
f88c9feb4f
commit
6a2f8c859c
@ -7,12 +7,18 @@ flags = [
|
|||||||
'-Wc++98-compat',
|
'-Wc++98-compat',
|
||||||
'-Wno-long-long',
|
'-Wno-long-long',
|
||||||
'-Wno-variadic-macros',
|
'-Wno-variadic-macros',
|
||||||
|
'-fexceptions',
|
||||||
'-DNDEBUG',
|
'-DNDEBUG',
|
||||||
# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
|
# 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++
|
# 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
|
# headers will be compiled as C headers. You don't want that so ALWAYS specify
|
||||||
# a "-std=<something>"
|
# a "-std=<something>"
|
||||||
'-std=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.
|
||||||
|
'-x',
|
||||||
|
'c++',
|
||||||
'-isystem',
|
'-isystem',
|
||||||
'../BoostParts',
|
'../BoostParts',
|
||||||
'-isystem',
|
'-isystem',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user