KTX-Software
KTX-Software copied to clipboard
RUN_TESTS target has no dependencies on the programs it runs
So the tests often fail because the executables aren't found as they haven't been built. It must have dependencies on all programs it is testing.
@atteneder please take a look at this and #281 urgently. Both are costing me a lot of wasted time.
Unfortunately this is a known flaw in CMake without a proper solution: https://gitlab.kitware.com/cmake/cmake/-/issues/8774
To avoid missing exes, I suggest:
- Run the
ALL_BUILD
target before running tests - Create a custom target with dependencies on all test executables and run this target before running tests
Let me know if you think option 2 is in any way useful/an improvement, in which case I'll make a PR.
Otherwise there's nothing left to do other than upvoting/commenting the original issue.
Running ALL_BUILD
works. Is there some advantage to a custom target that I'm missing? I don't see any benefit over ALL_BUILD.
I've upvoted the CMake issue. I'll leave this open to document the problem and hopefully stem a tide of duplicate reports.
Only advantage is, it would build only the executables required for testing and not other things (like the loadtest apps). Downside: CMake config/Xcode project getting a bit more bloated.
Ping @atteneder. This still bites me regularly when I forget to first build "package". Please try to fix it.