X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcsourcefile.cpp;h=13c74b9dcef247402490da7d7638de379c50f067;hb=c51e8844f19c31b2809ba459a1659d3b94a86f89;hp=ee301d7254d35b9699687e80f9d20d8663e83adb;hpb=f76c063eb9b792088e034ffb4c2f173b843e8c57;p=builder.git diff --git a/source/csourcefile.cpp b/source/csourcefile.cpp index ee301d7..13c74b9 100644 --- a/source/csourcefile.cpp +++ b/source/csourcefile.cpp @@ -48,8 +48,10 @@ void CSourceFile::find_dependencies() cache.set_values(this, "includes", includes); } - const BuildInfo::PathList &incpath = component->get_build_info().incpath; + const BuildInfo &build_info = component->get_build_info_for_path(path); + const BuildInfo::PathList &incpath = build_info.incpath; BuildInfo::PathList local_incpath = incpath; + local_incpath.insert(local_incpath.begin(), build_info.local_incpath.begin(), build_info.local_incpath.end()); local_incpath.push_front(FS::dirname(path).str()); for(IncludeList::iterator i=includes.begin(); i!=includes.end(); ++i) @@ -59,3 +61,10 @@ void CSourceFile::find_dependencies() add_dependency(*hdr); } } + +void CSourceFile::modified() +{ + includes.clear(); + depends.clear(); + find_dependencies(); +}