Suppose I have directories such as:
dir1
main.cpp
dir2
abc.cpp
dir3
def.cpp
dir4
ghi.cpp
jkl.cpp
And suppose that main.cpp includes dir2 / abc.cpp and dir3 / def.cpp, def.cpp includes dir4 / ghi.cpp and dir4 / jkl.cpp.
My question is: how can I do one Makefile / CMakeLists.txt in dir1 /, which recursively goes to each directory and compiles * .cpp and then "joins" them?
Sorry for my English, I hope I explained my question well!
Thanks!
source
share