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

Ninja is used as a default generator #2598

Closed
OleksandrKvl opened this issue Jun 14, 2022 · 9 comments · Fixed by #2600
Closed

Ninja is used as a default generator #2598

OleksandrKvl opened this issue Jun 14, 2022 · 9 comments · Fixed by #2600
Labels
bug a bug in the product Feature: kits
Projects
Milestone

Comments

@OleksandrKvl
Copy link

Brief Issue Summary

After recent VSCode update to 1.68.0 and CMake tools extension to v1.11.25 my configuration step stopped working. The problem is that now it passes -G Ninja option even though cmake.generator option is empty.

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.68.0",
  "cmtVersion": "1.11.25",
  "configurations": [
    {
      "folder": "/home/my/private/path",
      "cmakeVersion": "3.20.3",
      "configured": true,
      "generator": "Unix Makefiles",
      "usesPresets": false,
      "compilers": {
        "C": "/opt/gcc-6.3.0/bin/gcc",
        "CXX": "/opt/gcc-6.3.0/bin/g++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

[main] Configuring folder: backend 
[main] Saving open files before configure/build
[driver] Start configure 
[driver] Running pre-configure checks and steps
[driver] Using compilers in GCC 6.3 for configure
[cmakefileapi-driver] Configuring using kit
[cmakefileapi-driver] Invoking CMake /home/user/bin/cmake with arguments ["--no-warn-unused-cli","-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE","-DCMAKE_BUILD_TYPE:STRING=Debug","-DCMAKE_C_COMPILER:FILEPATH=/opt/gcc-6.3.0/bin/gcc","-DCMAKE_CXX_COMPILER:FILEPATH=/opt/gcc-6.3.0/bin/g++","-S/home/my/private/dir","-B/home/my/private/dir/build_Debug","-G","Ninja"]
[proc] Executing command: /home/user/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/gcc-6.3.0/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/opt/gcc-6.3.0/bin/g++ -S/home/my/private/dir -B/home/my/private/dir/build_Debug -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error: Error: generator : Ninja
[cmake] Does not match the generator used previously: Unix Makefiles
[cmake] Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
[extension] [1620] cmake.configure finished (returned 1)

Additional Information

No response

@ZarkSPb
Copy link

ZarkSPb commented Jun 14, 2022

Today I faced the same problem.

@DrMagicalStone
Copy link

One solution is to make cmake.generator not empty, such as "cmake.generator": "Unix Makefiles". To set an exist generator.

@FredM67
Copy link

FredM67 commented Jun 14, 2022

Same problem !!!!
What making such breaking changes ?!?! it just makes dev lose their time to first understand what's going on and then repair !!!!

@FredM67
Copy link

FredM67 commented Jun 14, 2022

Please revert to the (previous) default behavior

@Lyvsain
Copy link

Lyvsain commented Jun 14, 2022

Same here ! My whole team got errors since this morning...

@Flame12220
Copy link

Flame12220 commented Jun 14, 2022

Got exactly the same issue here too. Didnt know where the issue came from but after i installed the CMake Tool v1.10.5 everything went back to normal.

@Andrew9317
Copy link

Yup same issue here.

@bobbrow
Copy link
Member

bobbrow commented Jun 14, 2022

We're sorry for the disruption. We will investigate and get a fix out as soon as possible.

@bobbrow
Copy link
Member

bobbrow commented Jun 14, 2022

We've identified the root cause. It was this PR: #2502
We're working on a fix.

@elahehrashedi elahehrashedi added the bug a bug in the product label Jun 14, 2022
@elahehrashedi elahehrashedi added this to the 1.11 milestone Jun 14, 2022
@elahehrashedi elahehrashedi added this to Triage in 1.11 via automation Jun 14, 2022
@elahehrashedi elahehrashedi moved this from Triage to Done in 1.11 Jun 14, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: kits
Projects
No open projects
1.11
Done
Development

Successfully merging a pull request may close this issue.

9 participants