Correct file resolution with multiple target
Hi,
We often use mock classes in our project in order to test features.
This means that we have, for example, a header file with the declaration of a class `class Foo` and its methods, `src/class.hpp`.
and then we'd have, for example, `src/class.cpp`, and also `tests/class_mock.cpp` and possibly `tests/some_test.cpp` which all implement the methods of class `Foo`.
Then, depending on the target which we compile, we link vs the correct implementation.
I would like it that when I try to go to declaration or usages, it would always resolve to the version under the `src` directory.
How can this be done?
Thanks!
* p.s., we compile using SCons, invoked by `add_custom_target` in the CMakeLists.txt (which takes a -DVAR to specify which exact target to compile), so CLion is probably not even aware of the different targets.
请先登录再写评论。
any ideas?