Can CTest be run on the installed version of a project instead of the version in the CMake build directory?
@mcflugen challenged me with this question and I don’t CTest well enough to answer it. I couldn’t find an answer in the CMake docs or on the internets. My hunch is that this is outside the scope of what CMake/CTest are designed to do, but it would be helpful for us to know if the installed version of a project we’re working on behaves as expected.
It seems like both target_link_libraries and add_test can take generator expressions, so you might be able to fiddle around with those to either link to the installed version of a library or call the installed version of an executable. I don’t use generator expressions often enough to know off the top of my head what would work (or even if it definitely would), but that’s what I would look into.