Problem when setting CMAKE_MAKE_PROGRAM in toolchain file

Hello,

I am trying to set the CMAKE_MAKE_PROGRAM to a specific binary with a toolchain file. But when running cmake it fails with a strange message. Is there something specific I am missing, or is it just a bug I should open a ticket for?

I am using cmake 4.0.2

The toolchain file contains only:

set (CMAKE_MAKE_PROGRAM “/usr/bin/gmake”)

The CMakeLists.txt:

cmake_minimum_required (VERSION 4.0 FATAL_ERROR)
project (test)
add_executable (main main.cpp)
message (“CMAKE_AR=${CMAKE_AR}”)
message (“CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}”)

And when I run the command from the build directory:

$ cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake ..
-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - broken
CMake Error at /usr/local/apps/cmake/4.0.2/share/cmake-4.0/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/fra4240/cmake_ar/build/CMakeFiles/CMakeScratch/TryCompile-fqYYF5'
    
    Run Build Command(s): /usr/local/apps/cmake/4.0.2/bin/cmake -E env VERBOSE=1 "" -f Makefile cmTC_ad399/fast
    no such file or directory
    
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!