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

Build fails when using the Green Hills MULTI generator #4179

Open
fdk17 opened this issue Nov 18, 2024 · 5 comments
Open

Build fails when using the Green Hills MULTI generator #4179

fdk17 opened this issue Nov 18, 2024 · 5 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure help wanted we currently are not planning work on this and would like help from the open source community
Milestone

Comments

@fdk17
Copy link

fdk17 commented Nov 18, 2024

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.

[build] Starting build
[proc] Executing command: /opt/cmake/bin/cmake --build /home/XXX/Projects/bin_dir --config Debug --target all -j 6 --
[build] Building all.tgt.gpj
[build] Could not find: all.tgt.gpj within: amcs_oe_sdk.top.gpj
[build] Not all requested files were built. Skipped: all.tgt.gpj
[build] Done

CMake Tools Diagnostics

Debug Log

Additional Information

No response

@Amy-Li03
Copy link
Collaborator

Hi @fdk17, thanks for reporting issue here!
After reading the above information, there are a few questions need to confirm with you:

  1. Does this issue only occur when using the Green Hills MULTI generator? Is it possible to build successfully with other generators (e.g. Ninja)?
  2. Can this issue be reproduced on a simple project? If not, please provide us with a sample project.
  3. This issue occurs after using the cmake:build command in VS code.

@Amy-Li03 Amy-Li03 added more info needed More info is needed from the community for us to properly triage and investigate. and removed triage labels Nov 20, 2024
@fdk17
Copy link
Author

fdk17 commented Nov 22, 2024

  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 #3 and d76e047 on how the problem was fixed for Visual Studio generators, then again for XCode in 047c918. This function should also return 'ALL_BUILD' when the generator is 'Green Hills MULTI'.

https://github.com/microsoft/vscode-cmake-tools/blob/0b8ebcfdb1077e59b1037be913f37be7e719254b/src/drivers/cmakeDriver.ts#L903C1-L910C6

    get allTargetName(): string {
        const gen = this.generatorName;
        if (gen && (gen.includes('Visual Studio') || gen.toLowerCase().includes('xcode'))) {
            return 'ALL_BUILD';
        } else {
            return 'all';
        }
    }

@fdk17
Copy link
Author

fdk17 commented Nov 22, 2024

Essentially, the build command should be

/opt/cmake/bin/cmake --build /home/XXX/Projects/bin_dir --config Debug --target ALL_BUILD -j 6 --

@Amy-Li03
Copy link
Collaborator

@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.

@fdk17
Copy link
Author

fdk17 commented Nov 22, 2024

@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.

@gcampbell-msft gcampbell-msft added help wanted we currently are not planning work on this and would like help from the open source community Feature: configure enhancement an enhancement to the product that is either not present or an improvement to an existing feature and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Nov 22, 2024
@gcampbell-msft gcampbell-msft moved this from Blocked to Pending Prioritization in CMake Tools Nov 22, 2024
@gcampbell-msft gcampbell-msft added this to the Backlog milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure help wanted we currently are not planning work on this and would like help from the open source community
Projects
Status: Pending Prioritization
Development

No branches or pull requests

3 participants