cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="cmake/toolchains/linux_gcc_x86_64_x32.cmake" is not working
CMake 3.21.2
The call with existing toolchain file:
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="cmake/toolchains/linux_gcc_x86_64_x32.cmake"
[cmake] CMake Error at /usr/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake:130 (message):
[cmake] Could not find toolchain file:
[cmake] "cmake/toolchains/linux_gcc_x86_64_x32.cmake"
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:3 (project)
but this one is working:
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/linux_gcc_x86_64_x32.cmake
[cmake] -- The C compiler identification is GNU 10.2.1
[cmake] -- The CXX compiler identification is GNU 10.2.1
It looks like it has something to do with quotes "" ?
P.S.: It is called from VSCode that reads CMakePresets.json toolchainFile
and passes it as -DCMAKE_TOOLCHAIN_FILE="cmake/toolchains/linux_gcc_x86_64_x32.cmake"
to be compatible to older CMake versions