Allow marking targets as runnable and expose that via file API
See https://discourse.cmake.org/t/adding-run-functionality/3893/21 and the parent replies for context.
Some IDEs want to know which targets can be 'run' and which one should appear as the default runnable target.
I think it makes sense to introduce some specific target properties and variables which would enable the above use case.
For example a new target property CMAKE_RUNNABLE
and a new cmake variable CMAKE_DEFAULT_RUNNABLE_TARGET
.
Setting these does not necessarily mean that cmake suddenly needs to learn how to run targets itself (like rust's cargo does).
Alternatively, if there is no consensus on what the semantics these new additions should be, another possibility would be to allow projects to specify which additional target properties should be exported via file API.
Then, for example, the Qt CMake API could set and export such properties internally and use them in Qt Creator, until there is consensus on what the officially blessed 'runnable' property should do.
If that is more preferable, I can open a separate issue for that.