Check executability at all before checking for features
Jean-Alexandre Collin ended up with odd compilation issues:
from /home/jacollin/libs/chameleon/runtime/starpu/control/runtime_async.c:22:
/home/jacollin/libs/chameleon/runtime/starpu/include/runtime_mpi.h:26:20: error: expected declaration specifiers or ‘...’ before ‘(’ token
26 | static inline void starpu_mpi_data_register( starpu_data_handle_t handle, int64_t tag, int owner )
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/jacollin/libs/chameleon/build/runtime/starpu/include/chameleon_starpu.h:198:2: warning: #warning "WAR dependencies need starpu_mpi_cached_receive support from StarPU 1.2.1 or greater" [-Wcpp]
198 | #warning "WAR dependencies need starpu_mpi_cached_receive support from StarPU 1.2.1 or greater"
that was because cmake hadn't detected starpu_mpi_data_register etc. We found that it was because of a missing piece in his LD_LIBRARY_PATH, which was making all tests fail.
Before checking for presence of functions etc., cmake should probably check that a trivial program that includes starpu/starpu-mpi does pass fine, and if not stop there because the rest is doomed to fail, in odd ways such as above.