Wierd build quirk using symbolic links. Anyone has ideas for a solution?

I'm trying to use CLion for an old, involved, and quirky build environment at work. It's `make` based, so I'm using a compile_commands.json file.

 

Things are generally working fine, but the projects custom build flow creates a custom "fake" include directory (that is included with -I fake). This "fake" directory then creates a "utils" directory that contains symbolic links to some files.

 

The quirk is that the source files call `#include "utils/some_file.h"` but there is no utils directory! The build script creates it in the "fake" directory! So the real `some_file.h` is actually located in `<project>/path/to/sime_file.h` and linked.

 

This quirk would work fine IF CLion would be aware of symbolic links. Problem is that when CLion resolves "utils/some_file.h" then it doesn't realize that this is the same file as `<project>/path/to/some_file.h` so it complains that "utils/some_file.h" is not part of project.

 

Any ideas for how to work around this? I can't change how the project includes files (at the moment)

0

Please sign in to leave a comment.