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',
|
||||
'-Wno-long-long',
|
||||
'-Wno-variadic-macros',
|
||||
'-fexceptions',
|
||||
'-DNDEBUG',
|
||||
# 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>"
|
||||
'-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',
|
||||
'../BoostParts',
|
||||
'-isystem',
|
||||
|
Loading…
x
Reference in New Issue
Block a user