CMake generator full path
Normally it is not necessary to specify the path to the CMake generator backend, assuming the generator executable is in environment variable $PATH
or
CMAKE_PROGRAM_PATH.
For special use cases such as testing CMake with different versions of a generator the generator executable absolute path may be specified via
CMAKE_MAKE_PROGRAM.
The absolute path to the generator is necessary or CMake will not find it.
Suppose a GitHub Actions Linux image has ninja-linux.zip containing executable file “ninja”. Get the absolute path using realpath.
- run: unzip ninja-linux.zip
- name: CMake configure
run: cmake -G Ninja -DCMAKE_MAKE_PROGRAM=$(realpath ./ninja) -Bbuild