浏览代码

Relative #include directories are resolve to be relative to the directory in which the build executes

default_compile_flags
vector-of-bool 4 年前
父节点
当前提交
fa81bff674
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      src/dds/build/plan/compile_file.cpp

+ 7
- 1
src/dds/build/plan/compile_file.cpp 查看文件

@@ -15,7 +15,13 @@ using namespace dds;
compile_command_info compile_file_plan::generate_compile_command(build_env_ref env) const {
compile_file_spec spec{_source.path, calc_object_file_path(env)};
spec.enable_warnings = _rules.enable_warnings();
extend(spec.include_dirs, _rules.include_dirs());
for (auto dirpath : _rules.include_dirs()) {
if (!dirpath.is_absolute()) {
dirpath = env.output_root / dirpath;
}
dirpath = fs::weakly_canonical(dirpath);
spec.include_dirs.push_back(std::move(dirpath));
}
for (const auto& use : _rules.uses()) {
extend(spec.external_include_dirs, env.ureqs.include_paths(use));
}

正在加载...
取消
保存