Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can no longer use a cmd script as a wrapper in cmake.cmakePath (regression) #4043

Closed
emmenlau opened this issue Sep 4, 2024 · 2 comments
Closed
Labels

Comments

@emmenlau
Copy link

emmenlau commented Sep 4, 2024

Brief Issue Summary

For a number of reasons, in our build setup we can not call cmake directly, but need to wrap cmake in a wrapper shell script. This worked sufficiently well for us using cmake.cmakePath with a path to a CMD batch script on Windows. However since a short time, this stopped working, and I get error:

Bad CMake executable: "C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path

Did something change how cmake is invoked in recent versions? Would it be possible to consider invoking cmake via cmd on Windows, so that scripts can be supported?

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.92.2",
  "cmtVersion": "1.19.50",
  "configurations": [
    {
      "folder": "c:\\BDA\\Src\\BDAImageFileHandler",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[expand] expanded ${env:BBS_VSCODE_CMAKE_EXTENSION_BBS_BUILD_WRAPPER_OSPATH}
[cmakeExecutable] CMake executable not found in cache. Checking again.
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat --version
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat -E capabilities
[main] Building folder: BDAImageFileHandler 
[expand] expanded ${env:BBS_VSCODE_CMAKE_EXTENSION_BBS_BUILD_WRAPPER_OSPATH}
[cmakeExecutable] CMake executable not found in cache. Checking again.
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat --version
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat -E capabilities
[rollbar] Unhandled exception: Unhandled Promise rejection: build Error: Build failed: Unable to configure the project {}
[extension] [2395] cmake.logDiagnostics started
[expand] expanded ${env:BBS_VSCODE_CMAKE_EXTENSION_BBS_BUILD_WRAPPER_OSPATH}
[cmakeExecutable] CMake executable not found in cache. Checking again.
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat --version
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat -E capabilities
[expand] expanded ${env:BBS_VSCODE_CMAKE_EXTENSION_BBS_BUILD_WRAPPER_OSPATH}
[cmakeExecutable] CMake executable not found in cache. Checking again.
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat --version
[proc] Executing command: C:/data/scripts/bin/vscode-cmake-extension-build-scripts-wrapper.bat -E capabilities
[extension] [2395] cmake.logDiagnostics finished (returned undefined)

Additional Information

No response

@gcampbell-msft
Copy link
Collaborator

@emmenlau I'm curious, I don't think we've changed any behavior for this in the past couple official version releases, does this still happen to you for 1.18.44 for example?

@emmenlau
Copy link
Author

emmenlau commented Sep 4, 2024

Dear @gcampbell-msft , I literally just found the duplicate issue from two days ago in #4037, only a few seconds after submitting my report. So it seems I'm not the only one with this (new) problem. And in #4037 there are already some insights into this, so I'll close my issue again!

@emmenlau emmenlau closed this as completed Sep 4, 2024
@github-project-automation github-project-automation bot moved this from Blocked to Completed in CMake Tools Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

No branches or pull requests

2 participants