Closed audetto closed 2 months ago
@audetto In order to better solve your problem, we need more information from you, such as a project that can reproduce this issue and some screenshots? Thank you!
Unfortunately I cannot replicate (I was trying here https://github.com/audetto/cmake-kits) But I have learnt 2 things
1) it is prefixed with [proc]
which I had originally omitted
2) it is harmless. I always thought it was a fatal error, but it is not
maybe it is something the extension does to guess the version (-v
).
cmake
handles it properly, and I see as soon as I err (permission or other), a real fatal error comes prefixed with [cmake]
.
So, probably, not worth investing more time.
Actually yes. Found (look at the repo https://github.com/audetto/cmake-kits)
If I rename the compiler to clang-opt.sh
, then I can reproduce.
I suspect, it tries to guess something and in this case, not being an executable it fails.
I guess it is totally harmless.
[main] Configuring project: cmake-kits
[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_CXX_COMPILER:FILEPATH=/home/andrea/projects/cvs/cmake-kits/clang-opt.sh -S/home/andrea/projects/cvs/cmake-kits -B/home/andrea/projects/cvs/cmake-kits/build/Debug-bad -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Configuring done (0.0s)
[cmake] -- Generating done (0.0s)
[cmake] -- Build files have been written to: /home/andrea/projects/cvs/cmake-kits/build/Debug-bad
[proc] The command: clang-opt -v failed with error: Error: spawn clang-opt ENOENT
but the message could be silenced.
@gcampbell-msft I can reproduce the problem based on the project provided by the client, but the client feels that it is possible that this is not a serious bug or not a bug, and I was hoping you could give me some advice.
Repro steps recording:
Actual results:
The last line of the output is the same as mine, but since my project is linux based, you have as well some real cmake errors where the compiler is broken
.
If you run this in linux, you will have a less confusing output.
@audetto Thank you very much for your reply, we will close this issue, it is a mini-feature that allows the suite of scripts to fully support it, if you guys want this to be a feature that explicitly supports shell scripts as a "compiler", please create a specific issue for this.
Brief Issue Summary
If I specify the the path of a shell script as compiler in
cmake-kits.json
, this fails with[proc] The command: my-script -v failed with error: Error: spawn my-script ENOENT
The same shell script works if I pass it in the kits via a
toolchain
file where I have setCMAKE_CXX_COMPILER
to the exact same path.The problem only happens for scripts, executables work in both modes.
CMake Tools Diagnostics
Debug Log
No response
Additional Information
This is an example of a
cmake-kits.json
which failsVersion involved
vscode 1.87.2 cmake 3.22.1 cmake-tools 1.17.17