Reputation: 1290
I am creating and building a c++
project using cmake
from scratch.
The executable requires command line arguments.
I am specifying them in Visual studio
.
Is it possible to specify them by default when cmake builds the project (in my CmakeLists.txt
for example) ?
So that I (or others) won't need to specify these arguments each time I build the project for the first time (I would want to just run the project without worrying about that but still can change them in visual studio of course if needed) ?
Upvotes: 4
Views: 4580
Reputation: 170163
If you are using CMake 3.13 and above you can add the VS_DEBUGGER_COMMAND_ARGUMENTS
property to your executable target in order specify those arguments.
Upvotes: 6