Fix tests being skipped due to executables not found after ECM min bump
ECM, when requiring ECM >=5.38, sets CMAKE_*_OUTPUT_DIRECTORY, so the tests executables are no longer generated in the current binary dir. Calling add_test() with the signature add_test(<name> <command> [...]) will not result in any further processing of the <command> argument, it will be executed as is. Using instead add_test(NAME <name> COMMAND <command> [...]) will result in <command> getting some handling, cmp. CMake docs: "If <command> specifies an executable target (created by add_executable()) it will automatically be replaced by the location of the executable created at build time." Which is what is needed now here (and also used in ecm_add_test).
parent
f86a2ed5
Please register or sign in to comment