Open fdk17 opened 3 days ago
Hi @fdk17, thanks for reporting issue here! After reading the above information, there are a few questions need to confirm with you:
cmake:build
command in VS code.1) It only happens with the Green Hills MULTI generator. Ninja and others work fine to the best of my knowledge.
2) Yes, any simple project will show the issue.
3) Correct, the issue occurs when using cmake:build
or F7
when the build target is all
or the Utility target ALL_BUILD
is chosen.
Refer to https://github.com/microsoft/vscode-cmake-tools/issues/3 and https://github.com/microsoft/vscode-cmake-tools/commit/d76e047d5e0c0eb8ab9a48ede4e1f461fd498b70 on how the problem was fixed for Visual Studio generators, then again for XCode in https://github.com/microsoft/vscode-cmake-tools/commit/047c918d2a68cafaf2ff2a5952763cae2bdff375. This function should also return 'ALL_BUILD' when the generator is 'Green Hills MULTI'.
get allTargetName(): string {
const gen = this.generatorName;
if (gen && (gen.includes('Visual Studio') || gen.toLowerCase().includes('xcode'))) {
return 'ALL_BUILD';
} else {
return 'all';
}
}
Essentially, the build command should be
/opt/cmake/bin/cmake --build /home/XXX/Projects/bin_dir --config Debug --target ALL_BUILD -j 6 --
@fdk17 thanks for your detailed investigation. That would be great if you can create a PR, we are always happy to receive contributions from the community.
@gcampbell-msft FYI.
@Amy-Li03 Is there a getting started guide detailed enough for an absolute beginner? I've not sure what a .ts file is or how I would get VS Code to use my changes.
Brief Issue Summary
The default target for gbuild and Green Hills MULTI should be ALL_BUILD, not all. ALL_BUILD is the same Utility target used by Visual Studio generators.
CMake Tools Diagnostics
Debug Log
Additional Information
No response