1
I’m trying to organize the project generated in visual studio, for this I’m using the function source_group
to add the directories I want, only it doesn’t seem to take effect:
set(CPP_FILES_REGEX "\\b(\\w|\\d)+\\b\\.(hpp|cpp|c|h)")
source_group("my_folder" REGULAR_EXPRESSION "${sourcers_dir}\/${CPP_FILES_REGEX}")
add_executable(my_executable ${sourcers_dir}/main.cpp ${sourcers_dir}/teste.hpp)
I tested the regular expression here: Regexr and it works, the generated project continues with the standard folders: Header and Sources.