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

cmake.parallelJobs ignored in workspace's .vscode/settings.json #3206

Closed
diablodale opened this issue Jun 12, 2023 · 3 comments · Fixed by #3233
Closed

cmake.parallelJobs ignored in workspace's .vscode/settings.json #3206

diablodale opened this issue Jun 12, 2023 · 3 comments · Fixed by #3233
Assignees
Labels
bug a bug in the product Feature: settings
Projects
Milestone

Comments

@diablodale
Copy link

Brief Issue Summary

When cmake.parallelJobs is set the the user's main settings.json and is also set in workspace's .vscode/settings.json, then the workspace value is ignored and only the main user's setting is used. (I thought this worked in the past but noticed it does not today).

user's settings.json

"cmake.parallelJobs": 14,

workspace .vscode/settings.json

"cmake.parallelJobs": 1,

Result

a cmake build in vscode of...

[proc] Executing command: "C:\Program Files\CMake\bin\cmake.exe" --build c:/njs/depthai-core/build --config Debug --target all -j 14 --
[build] [14/50   2% :: 0.140] cmd.exe /C "cmd.exe /C "...

Workaround

Don't use the workspace settings file for this cmt setting. Instead, set the desired parallelJobs in the main user settings.json

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.79.0",
  "cmtVersion": "1.14.33",
  "configurations": [
    {
      "folder": "c:\\njs\\depthai-core",
      "cmakeVersion": "3.26.4",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {
        "C": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
        "CXX": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 144,
    "executablesCount": 112,
    "librariesCount": 4,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

No response

Additional Information

No response

@benmcmorran
Copy link
Member

Thanks for the report! We'll try to reproduce this issue and let you know if we have any additional questions.

@benmcmorran benmcmorran added bug a bug in the product Feature: settings labels Jun 13, 2023
@benmcmorran benmcmorran added this to the 1.15 milestone Jun 13, 2023
@benmcmorran benmcmorran added this to Triage in 1.15 via automation Jun 13, 2023
@benmcmorran benmcmorran moved this from Triage to To do in 1.15 Jun 13, 2023
@gcampbell-msft gcampbell-msft linked a pull request Jul 10, 2023 that will close this issue
1.15 automation moved this from To do to Done Jul 19, 2023
@diablodale
Copy link
Author

👍

@BlackWaters
Copy link

I am unsure whether this issue has been completely resolved. I can reproduce this issue by setting different parallel jobs in remote and workspace.

If I set cmake.parallelJobs to 12 in remote settings and set 16 in workspace, then cmake build will get:

[proc] Executing command: /usr/bin/cmake --build /repo/build --config Debug --target all -j 12 --

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: settings
Projects
No open projects
1.15
Done
Development

Successfully merging a pull request may close this issue.

6 participants