SmartCommandlineArgs
SmartCommandlineArgs copied to clipboard
support of cmake VS2022 projects
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
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.
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?