`source_group(TREE)` not working for source files any longer
Hi there,
I'm using the following code to create source groups for Visual Studio:
get_property("TARGET_SOURCE_FILES" TARGET "${target}" PROPERTY SOURCES)
source_group(TREE "${CMAKE_CURRENT_LIST_DIR}" FILES ${TARGET_SOURCE_FILES})
This always used to work fine for me - until I upgraded my CMake version some time ago (not sure which version I was using before). I'm on version 3.15.0-rc3 now and the source groups are correctly generated for all header files (./include/LibName/xxx.h
) but not for the source files (./src/xxx.c
).
All source files are instead put in the default group "Source Files".
Best regards