Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How to select which executable to run #339
Comments
|
It should depend on which buffer is active, but if a file is used in two executables, the first executable is selected. You can however use Set Run Arguments in the Build/Debug menu. |
|
Thanks. Set run argument worked for me. The active buffer did always open the first project. Even when only having the main.cpp of the second executable open. |
|
Thank you, I think I got this fixed in eidheim@99cb3f6. Pushing this commit to master in a few days, but feel free to try it out. |
|
Thank you, I'll have a look at this and figure out where I messed up. |
|
Oh never mind, both sample and server executables lies within the edit: typo |
|
I think the issue is fixed in eidheim@786b6b8. |
|
yes that works! thanks. Only "issue" now is that I have another directory with code that is compiled to a static lib which is shared between sample and server. When I have one of those files open, then nothing is executed. (Propably because it is a static lib?) Would be nice if the IDE remembered my last exec and then run this instead? |
|
Commits fixing the original issue above is pushed to master, but leaving this issue open a bit further for discussion on how to chose executable when for instance working on an library. |
|
I feel like having some sort of drop down selector that lists all available executables would be the most intuitive? first option could be auto which behaves the way it does now. |
|
For the time being you can use Set Run Arguments in the Project menu to set project wide executable that will be run no matter which file you have open. Regarding providing alternatives, I would have to add this to my TODO list. If it was only for Meson project, it would be easy, but the issue is within CMake projects since it is harder to identify executables here. The reason behind the CMake difficulties is that one would have to parse all CMakeLists.txt files in the project, not only the ones in the source folder and its parents. On the other hand, with Meson, one could merely look into the |
|
The Run Arguments settings are now also stored between sessions: 8a4cab0 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


I have the following CMakeLists.txt:
Compile and Run opens the server executable. Is there a way to select which one is executed?