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

preferredGenerators does not fallback on linux #2709

Closed
ZgblKylin opened this issue Aug 25, 2022 · 2 comments
Closed

preferredGenerators does not fallback on linux #2709

ZgblKylin opened this issue Aug 25, 2022 · 2 comments
Assignees
Labels
bug a bug in the product Feature: configure
Milestone

Comments

@ZgblKylin
Copy link

ZgblKylin commented Aug 25, 2022

Brief Issue Summary

I'm using VSCode on Windows machine, and with remote-ssh to Linux machine, so I configured cmake.preferredGenerators as:

  "cmake.preferredGenerators": [
    "Visual Studio 16 2019",
    "Ninja",
    "Unix Makefiles",
  ]

In this situation, it's expected to be:

  • Select Visual Studio 16 2019 on Windows, since some project does not work well with Ninja;
  • Fallback to Ninja on Linux;

But CMake: Configure fails on Linux with first generator, and didn't try of others.

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.71.0-insider",
  "cmtVersion": "1.11.26",
  "configurations": [
    {
      "folder": "/home/chongfei/git/YSG-Vision",
      "cmakeVersion": "3.22.1",
      "configured": true,
      "generator": "Visual Studio 16 2019",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 65,
    "executablesCount": 16,
    "librariesCount": 20,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

[main] Configuring folder: YSG-Vision 
[main] Saving open files before configure/build
[driver] Start configure 
[driver] Running pre-configure checks and steps
[cmakefileapi-driver] Configuring using kit
[cmakefileapi-driver] Invoking CMake /usr/local/bin/cmake with arguments ["--no-warn-unused-cli","-DCMAKE_C_COMPILER_LAUNCHER:STRING=ccache","-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache","-DBUILD_TESTING:BOOL=TRUE","-DPERCEPTION_BUILD_EXECUTABLE:BOOL=TRUE","-DCALMCAR_UNITY_BUILD:BOOL=TRUE","-DWARNING:BOOL=TRUE","-DSYSTEM_VISION_NAME:STRING=mkz_vision","-DXAVIER:BOOL=TRUE","-DPLUGIN_LIST:STRING=","-DCMAKE_TOOLCHAIN_FILE:STRING=/home/chongfei/git/YSG-Vision/cmake/Toolchain-V5L.cmake","-DVIBRANTE_PDK:STRING=/home/nvidia/sdk_install/DRIVE_OS_5.2.6.0_SDK_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux","-DCUDA_VERSION:STRING=10.2","-DSIMULATOR:BOOL=TRUE","-DCHECK_LICENSE:BOOL=TRUE","-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE","-DCMAKE_BUILD_TYPE:STRING=Debug","-S/home/chongfei/git/YSG-Vision","-B/home/chongfei/git/YSG-Vision/build/ASUS/mkz/Debug","-G","Visual Studio 16 2019"]
[proc] Executing command: /usr/local/bin/cmake --no-warn-unused-cli -DCMAKE_C_COMPILER_LAUNCHER:STRING=ccache -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache -DBUILD_TESTING:BOOL=TRUE -DPERCEPTION_BUILD_EXECUTABLE:BOOL=TRUE -DCALMCAR_UNITY_BUILD:BOOL=TRUE -DWARNING:BOOL=TRUE -DSYSTEM_VISION_NAME:STRING=mkz_vision -DXAVIER:BOOL=TRUE -DPLUGIN_LIST:STRING= -DCMAKE_TOOLCHAIN_FILE:STRING=/home/chongfei/git/YSG-Vision/cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/nvidia/sdk_install/DRIVE_OS_5.2.6.0_SDK_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux -DCUDA_VERSION:STRING=10.2 -DSIMULATOR:BOOL=TRUE -DCHECK_LICENSE:BOOL=TRUE -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -S/home/chongfei/git/YSG-Vision -B/home/chongfei/git/YSG-Vision/build/ASUS/mkz/Debug -G "Visual Studio 16 2019"
[cmake] CMake Error: Could not create named generator Visual Studio 16 2019
[cmake] Not searching for unused variables given on the command line.
[cmake] 
[cmake] Generators
[cmake]   Green Hills MULTI            = Generates Green Hills MULTI files
[cmake]                                  (experimental, work-in-progress).
[cmake] * Unix Makefiles               = Generates standard UNIX makefiles.
[cmake]   Ninja                        = Generates build.ninja files.
[cmake]   Ninja Multi-Config           = Generates build-<Config>.ninja files.
[cmake]   Watcom WMake                 = Generates Watcom WMake makefiles.
[cmake]   CodeBlocks - Ninja           = Generates CodeBlocks project files.
[cmake]   CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
[cmake]   CodeLite - Ninja             = Generates CodeLite project files.
[cmake]   CodeLite - Unix Makefiles    = Generates CodeLite project files.
[cmake]   Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
[cmake]   Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
[cmake]   Kate - Ninja                 = Generates Kate project files.
[cmake]   Kate - Unix Makefiles        = Generates Kate project files.
[cmake]   Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
[cmake]   Sublime Text 2 - Unix Makefiles
[cmake]                                = Generates Sublime Text 2 project files.
[cmake] 
[extension] [8706] cmake.configure finished (returned 1)

Additional Information

Version of plugin is v1.11.26.

@elahehrashedi elahehrashedi added the bug a bug in the product label Aug 25, 2022
@elahehrashedi
Copy link
Contributor

Thank you for reporting this issue. We will take a look at it for the next release.

@bobbrow bobbrow added this to the On Deck milestone Aug 25, 2022
@gcampbell-msft gcampbell-msft modified the milestones: On Deck, 1.16 Jul 5, 2023
@benmcmorran benmcmorran modified the milestones: 1.16, 1.17 Nov 14, 2023
@github-project-automation github-project-automation bot moved this to Triage Needed in CMake Tools Nov 29, 2023
@gcampbell-msft gcampbell-msft moved this from Triage Needed to Pending Prioritization in CMake Tools Nov 29, 2023
@gcampbell-msft gcampbell-msft modified the milestones: 1.17, On Deck Nov 29, 2023
@gcampbell-msft gcampbell-msft modified the milestones: On Deck, 1.19 Jun 24, 2024
@gcampbell-msft gcampbell-msft moved this from Pending Prioritization to Ready to be Assigned in CMake Tools Jun 24, 2024
@jophippe jophippe moved this from Ready to be Assigned to To Do in CMake Tools Jun 26, 2024
@jophippe jophippe moved this from To Do to In Progress in CMake Tools Jul 3, 2024
@jophippe jophippe moved this from In Progress to Completed in CMake Tools Jul 8, 2024
@v-frankwang
Copy link
Collaborator

@ZgblKylin We tried to verify this issue on CMake tools: v1.19.45, but we got an error while connecting to a linux machine using Remote-ssh. Are you able to go ahead and verify that this issue is fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product Feature: configure
Projects
Status: Completed
Development

No branches or pull requests

7 participants