以下是我的.ycm_extra_conf.py文件部分内容:
import os.path as p
import os
import subprocess
pwd = os.getcwd() + '/src/includes'
print(pwd)
flags = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-ferror-limit=10000',
'-DNDEBUG',
'-std=c99',
'-x',
'c',
'-isystem',
'/usr/include/',
'-isystem',
'/data/data/com.termux/files/home/repo/libnice/src/includes', ] flags.append('-isystem')
flags.append(pwd)
其中真实起作用的是:
'-isystem',
'/data/data/com.termux/files/home/repo/libnice/src/includes',
想知道为什么后面的没有效果
flags.append('-isystem')
flags.append(pwd)
用后面的可以让项目直接移植使用都不用做任何更改,如果只能数组里面静态设置每次更改目录都要重新设置位置。