Adding a .ycm_clang_options.py file for YCM
This commit is contained in:
parent
3a820f1fb4
commit
3868f94ac7
50
cpp/ycm/.ycm_clang_options.py
Normal file
50
cpp/ycm/.ycm_clang_options.py
Normal file
@ -0,0 +1,50 @@
|
||||
import os
|
||||
|
||||
flags = [
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Werror',
|
||||
'-Wc++98-compat',
|
||||
'-Wno-long-long',
|
||||
'-Wno-variadic-macros',
|
||||
'-DNDEBUG',
|
||||
'-isystem',
|
||||
'../BoostParts',
|
||||
'-isystem',
|
||||
# This path will only work on OS X, but extra paths that don't exist are not
|
||||
# harmful
|
||||
'/System/Library/Frameworks/Python.framework/Headers',
|
||||
'-isystem',
|
||||
'../llvm/include',
|
||||
'-isystem',
|
||||
'../llvm/tools/clang/include',
|
||||
'-I',
|
||||
'.',
|
||||
'-isystem',
|
||||
'./tests/gmock/gtest',
|
||||
'-isystem',
|
||||
'./tests/gmock/gtest/include',
|
||||
'-isystem',
|
||||
'./tests/gmock',
|
||||
'-isystem',
|
||||
'./tests/gmock/include'
|
||||
]
|
||||
|
||||
def DirectoryOfThisScript():
|
||||
return os.path.dirname( os.path.abspath( __file__ ) )
|
||||
|
||||
|
||||
def MakeAbsoluteIfRelativePath( path ):
|
||||
if not path.startswith( '.' ):
|
||||
return path
|
||||
|
||||
full_path = os.path.join( DirectoryOfThisScript(), path )
|
||||
return os.path.normpath( full_path )
|
||||
|
||||
|
||||
def FlagsForFile( filename ):
|
||||
results = {}
|
||||
results[ 'flags' ] = [ MakeAbsoluteIfRelativePath( x ) for x in flags ]
|
||||
results[ 'do_cache' ] = True
|
||||
return results
|
||||
|
Loading…
Reference in New Issue
Block a user