microsoft / microsoft/vscode-cmake-tools
Detect toolchain gcc version to --version from -v
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
Brief Issue Summary
This is a very nice extension, but I am unable to run other GCC toolchains because I cannot detect the GCC version.
Can add detect toolchain gcc version to --version from -v ?
for example:
aarch64-linux-gcc -v is not work , change the full args --version can work,
CMake Tools Diagnostics
No response
Debug Log
[variant] Loaded new set of variants
[kit] Successfully loaded 2 kits from /home/psx/.local/share/CMakeTools/cmake-tools-kits.json
[proc] Executing command: /usr/bin/cmake --version
[proc] Executing command: /opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-gcc -v
[proc] The command: /opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-gcc -v exited with code: 1
[proc] The command: ninja --version failed with error: Error: spawn ninja ENOENT
[proc] The command: ninja-build --version failed with error: Error: spawn ninja-build ENOENT
[proc] Executing command: /usr/bin/cmake -S/home/psx/workspace/panelapp/buildapp/cmake_build -B/home/psx/workspace/panelapp/buildapp/cmake_build/build -G "Unix Makefiles"
[proc] The command: /usr/bin/cmake -S/home/psx/workspace/panelapp/buildapp/cmake_build -B/home/psx/workspace/panelapp/buildapp/cmake_build/build -G "Unix Makefiles" exited with code: 1
[main] Configuring project: cmake_build
[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-gcc -DCMAKE_CXX_COMPILER:FILEPATH=/opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-g++ -S/home/psx/workspace/panelapp/buildapp/cmake_build -B/home/psx/workspace/panelapp/buildapp/cmake_build/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- ROOT_PATH : "/home/psx/workspace/panelapp/buildapp/cmake_build"
[cmake] -- APP_SRC_DIR : "/home/psx/workspace/panelapp/buildapp/cmake_build/src"
[cmake] -- DOC_DIR : "/home/psx/workspace/panelapp/buildapp/cmake_build/docs"
[cmake] -- SOURCE_PARENT_PATH : ""
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "/home/psx/workspace/panelapp/buildapp/cmake_build/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "/home/psx/workspace/panelapp/buildapp/cmake_build/build/CMakeFiles/CMakeError.log".
[cmake] CMake Error at CMakeLists.txt:30 (find_package):
[cmake] By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
[cmake] asked CMake to find a package configuration file provided by "SDL2", but
[cmake] CMake did not find one.
[cmake]
[cmake] Could not find a package configuration file provided by "SDL2" with any of
[cmake] the following names:
[cmake]
[cmake] SDL2Config.cmake
[cmake] sdl2-config.cmake
[cmake]
[cmake] Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
[cmake] "SDL2_DIR" to a directory containing one of the above files. If "SDL2"
[cmake] provides a separate development package or SDK, be sure it has been
[cmake] installed.
[cmake]
[cmake]
[proc] The command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-gcc -DCMAKE_CXX_COMPILER:FILEPATH=/opt/lnxshare/aarch64-buildroot-linux-gnu_sdk-buildroot/bin/aarch64-linux-g++ -S/home/psx/workspace/panelapp/buildapp/cmake_build -B/home/psx/workspace/panelapp/buildapp/cmake_build/build -G "Unix Makefiles" exited with code: 1
[proc] The command: aarch64-linux-gcc -v failed with error: Error: spawn aarch64-linux-gcc ENOENT
[proc] The command: aarch64-linux-g++ -v failed with error: Error: spawn aarch64-linux-g++ ENOENT
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the toolchain version probe shown in the diagnostic log, focusing on where CMake Tools invokes the GCC executable with -v. Compare that probe with the requested --version behavior for aarch64-linux-gcc, and verify that cross-compiler detection succeeds without breaking existing compiler checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100