For the GLOB
ing it doesn't really matter, acc_SRC
or SRC_FILES
is just a variable name. When I started implementing this I used the acc_SRC
but then since I was copy-pasting a lot, I just used a non module-name variable.
We can decide on one, but since we can't enforce it somehow, it will be just a guideline. MODULE_SOURCES
seems a good candidate indeed.
Regarding the library name itself, that's a good alternative, I think, as well. We might as well promote it to the modules/CMakLists.txt
to have it defined there and enforce the library name, and just define the sources in the CMake of each module with target_sources
. Whether this is preferable, I don't know yet.
This might also solve the 3.10
- 3.13
version debate, since the target will be defined in the same CMakeList
that we try to alter it. The only caveat is that add_library
requires at least one source file add_library docs and we can workaround this with add_library(${module_name} PRIVATE "")
.
Feels a bit hacky, and not sure if there is an unexpected behavior on this.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.