PROPERTIES project_group

I need in my project, to organize my sub projects.

Can you add this functionality ?

set_target_properties(${project_name} PROPERTIES PROJECT_GROUP group_name)

I’m not the first one that talk about it, I found many reference about “PROJECT_GROUP” for CMAKE.

Thank you,

What would this property actually do? Nothing is stopping you from adding such a property today…but what it does needs more explanation here.

It’s the same idea as

https://cmake.org/cmake/help/latest/command/source_group.html

But with the project:

Define a grouping for project in IDE project generation.

This would need some investigation in how to do this at the IDE generator level. If groups can’t be disjoint[1], this is probably going to make generation a real pain as targets will need grouped before writing out.

[1] Something like:

group1/
  lib1a
group2/
  lib2
group1/ # should join the first `group1`
  lib1b

given a declaration order like:

add_library(lib1a)
add_library(lib2)
add_library(lib1b)

Isn’t https://cmake.org/cmake/help/latest/prop_tgt/FOLDER.html doing that?

You are right:

set_target_properties(${project_name} PROPERTIES FOLDER “Lib”)

it’s working in the IDE.

Thanks,