Replies: 1 comment
-
Have you tried using CMakePresets? This would allow you to use the preset to set the cache variable of the CMAKE_MAKE_PROGRAM, and I wonder if this would work well and be easier to manage. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am pretty sure this is not a vscode-make-tools issue, but maybe someone has seen this before?
In my CMakeLists.txt I set the CMAKE_MAKE_PROGRAM to the specific version of ninja I want to use (which is same ninja version as in my path at the moment).
set(CMAKE_MAKE_PROGRAM “${CMAKE_SOURCE_DIR}/xpacks/@xpack-dev-tools/ninja-build/.content/bin/ninja.exe”)
I also have this set.
set(CMAKE_TRY_COMPILE_TARGET_TYPE “STATIC_LIBRARY”)
However when I do this the compiler test fails:
Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.
Compiler: D:/Projects/SECA/LoRa/cmake_test/xpacks/@xpack-dev-tools/arm-none-eabi-gcc/.content/bin/arm-none-eabi-gcc.exe
Build flags:
Id flags:
The output was:
1
This is done with this command line:
Executing command:
D:/Projects/SECA/LoRa/cmake_test/xpacks/@xpack-dev-tools/cmake/.content/bin/cmake.exe -DCMAKE_BUILD_TYPE=Debug -SD:/Projects/SECA/LoRa/cmake_test -BD:/Projects/SECA/LoRa/cmake_test/build/debug -G Ninja
Now if I pass in the CMAKE_MAKE_PROGRAM via command line like this:
D:/Projects/SECA/LoRa/cmake_test/xpacks/@xpack-dev-tools/cmake/.content/bin/cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=D:/Projects/SECA/LoRa/cmake_test/xpacks/@xpack-dev-tools/ninja-build/.content/bin/ninja.exe -SD:/Projects/SECA/LoRa/cmake_test -BD:/Projects/SECA/LoRa/cmake_test/build/debug -G Ninja
Then the compiler is detected correctly.
A few notes, I am setting up cmake such that for each project I can use a different version of build tools as needed. In this case the version is the same as my path version, but might not be in the future. I figured that cmake or ninja has a bug that is causing an issue.
Beta Was this translation helpful? Give feedback.
All reactions