From 17783446dddb1a60c5174031c97b13e4d1bc1f8e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 8 Mar 2023 01:36:26 +0200 Subject: [PATCH] Remove the implicit include path for the generated source directory It doesn't work properly when a source file includes a header from a different component in the local package and that header tries to include a generated header in its own component. Adding the generated source directories of all used compnents isn't good either, in case multiple components have generated headers with the same name. --- source/lib/component.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/source/lib/component.cpp b/source/lib/component.cpp index 637bc18..c12a5a8 100644 --- a/source/lib/component.cpp +++ b/source/lib/component.cpp @@ -92,18 +92,6 @@ BuildInfo Component::get_build_info_for_path(const FS::Path &path) const // XXX Cache these and check that the directories actually exist before adding them BuildInfo binfo = build_info; - FS::Path gen_dir = package.get_temp_directory()/"generated"; - if(FS::descendant_depth(path, gen_dir)>=0) - { - FS::Path subdir = FS::dirname(FS::relative(path, gen_dir)); - binfo.local_incpath.push_back(package.get_source_directory()/subdir); - } - else - { - FS::Path subdir = FS::dirname(FS::relative(path, package.get_source_directory())); - binfo.local_incpath.push_back(gen_dir/subdir); - } - if(!overlays.empty()) { FS::Path dir = FS::dirname(path); -- 2.43.0