Recent CMake (>= 3.28) do not allow exec_program() any more by default, but prefer execute_process(), which takes slightly different flags. According to the documentation, exec_program() has been deprecated since CMake 3.0 (which was released in 2014, so it should be common enough that I don't feel like making allowances for any really old CMake). References: https://cmake.org/cmake/help/latest/policy/CMP0153.html