You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of the fact that an include_directories command in CMake has file scope (so targets will pick such a command up even if it comes later in the CMakeLists), many of our libraries have extra directories in the path that are required for the unit tests. The solution is to add CMakeLists files to all out test directories and move the creation of the test executable targets to there.
We also have things (e.g. Qt) that are added to the include path for everywhere when they should be added only for those targets that need them.
Doing this will mean that trying to use something that isn't a dependency will be picked up sooner.
The text was updated successfully, but these errors were encountered:
Original Reporter: Russell Taylor
Because of the fact that an include_directories command in CMake has file scope (so targets will pick such a command up even if it comes later in the CMakeLists), many of our libraries have extra directories in the path that are required for the unit tests. The solution is to add CMakeLists files to all out test directories and move the creation of the test executable targets to there.
We also have things (e.g. Qt) that are added to the include path for everywhere when they should be added only for those targets that need them.
Doing this will mean that trying to use something that isn't a dependency will be picked up sooner.
The text was updated successfully, but these errors were encountered: