Re: ClassicCPP scanner fails with UTF-8 BOM on non-UTF8 file

Dirk Bächle <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
Hi Damjan,

On 29.06.20 06:29, Damjan Jovanovic wrote:
> Hi
>
> I am trying to port Apache OpenOffice to build with SCons, and while it's still early, so far it's been a fantastic replacement for
> its current "gbuild" system based on GNU make with unmaintainable custom eval()-based logic. It has all the advanced build features
> we need usable in such a clear and simple way.
>
> [...]
>
>
> I could hack File.get_text_contents() in engine/SCons/Node/FS.py to catch exceptions when parsing in utf-8 with the BOM removed and
> retry in latin-1. But an even better solution would be to limit the ClassicCPP scanner to only scan the .src files under the source/
> directory and ignore the generated files in other directories. Is there some way to do that?
>

If you don't want to scan files in the "generated" folders, wouldn't it be enough to remove those directories from the CPPPATH
variable? I mean, you could make a copy of CPPPATH, let's name it L10PATH, and remove the offending folders from it. Then pass that
one to the Scanner instead.

Best regards,

Dirk

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.