CMake: avoid header and source files Visual Studio Filters and put cpp and h files at the root of the solution

Does anyone know how to put source and header files at the root of a solution without VS filters? I have all my source subfolders that sort well in vs filters, however the files in the root directory of the source go to "Header Files" and "Source Files".

Thanks.

+6
source share
1 answer

You can give an empty source_group line to achieve this:

 source_group("" FILES ${MY_TOP_LEVEL_SOURCES} ${MY_TOP_LEVEL_HEADERS}) 
+6
source

Source: https://habr.com/ru/post/955457/


All Articles