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

support of cmake VS2022 projects #169

Open
yalov opened this issue Feb 14, 2024 · 2 comments
Open

support of cmake VS2022 projects #169

yalov opened this issue Feb 14, 2024 · 2 comments

Comments

@yalov
Copy link

yalov commented Feb 14, 2024

Hello,

I have added the set_property in the CMakeLists.txt as you specified in the
https://github.com/MBulli/SmartCommandlineArgs/wiki/Cmake-support
but in the Visual Studio GUI, in the extension tab, the green plus button ("add command line argument") is not active, so I can't add an argument

@Irame
Copy link
Collaborator

Irame commented Feb 25, 2024

Hi, thanks for using the extension and reaching out to us.

I am guessing that you open your CMake project directly with Visual Studio. We currently don't support this use case because it does not involve a solution file which we rely on at the moment. If I find some time I will look into this issue.

The wiki refers to a setup, where you generate a solution file (*.sln) with CMake (e.g. cmake -B builds -G 'Visual Studio 17 2022') and then open this file inside Visual Studio.

@yalov
Copy link
Author

yalov commented Apr 3, 2024

The cmake VS2022 projects have the cmd arguments in PROJECT\.vs\launch.vs.json, as "args" value per project target:

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "name.exe",
      "name": "name.exe",
      "args": [
        "-v"
      ]
    },
    {
      "type": "cppgdb",
      "project": "CMakeLists.txt",
      "projectTarget": "name",
      "name": "name",
      "debuggerConfiguration": "gdb",
      "MIMode": "gdb",
      "args": [
        "-v"
      ],
      "env": {}
    }
  ]
}

so the extension probably could support cmake projects by changing the args value, if the target is specified?

@yalov yalov changed the title cmake environment - "add command line arg" button is not active support of cmake VS2022 projects Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants