cmake source_group has no effect

Asked

Viewed 23 times

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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.