|
|
|
|
|
|
|
|
compile_command_info compile_file_plan::generate_compile_command(build_env_ref env) const { |
|
|
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)}; |
|
|
compile_file_spec spec{_source.path, calc_object_file_path(env)}; |
|
|
spec.enable_warnings = _rules.enable_warnings(); |
|
|
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()) { |
|
|
for (const auto& use : _rules.uses()) { |
|
|
extend(spec.external_include_dirs, env.ureqs.include_paths(use)); |
|
|
extend(spec.external_include_dirs, env.ureqs.include_paths(use)); |
|
|
} |
|
|
} |