Xavier Larrode wrote: > Hi all, > I have a general Makefile wich is doing that : > > REPERTOIRES = \ > $(VAR)/src/common/share/folder1 \ > $(VAR)/src/common/share/folder2 \ > [...] > > normal : > for i in $(REPERTOIRES); do \ > echo "=================================="; \ > echo "Compiling $$i..."; \ > echo "=================================="; \ > cd $$i && make ; \ > done > @echo "***************************************************" > > clean : > for i in $(REPERTOIRES); do \ > echo "=================================="; \ > echo "Cleaning $$i..."; \ > echo "=================================="; \ > cd $$i && make clean ; \ > > > And i was wonderning if there is a simple way to do that in Cmake > Thanks > > _______________________________________________ > CMake mailing list > [email protected] > http://www.cmake.org/mailman/listinfo/cmake
ADD_SUBDIRECTORY(src/common/share/folder1)
ADD_SUBDIRECTORY(...)
or
SET(REPERTOIRES src/common/share/folder1 ...)
FOREACH(folder ${REPERTOIRES})
ADD_SUBDIRECTORY(${folder})
ENDFOREACH(folder)
for each one of these directories you have to create a CMakeLists.txt
with commands to compile your sources (ADD_EXECUTABLE or ADD_LIBRARY)
--
Filipe Sousa
signature.asc
Description: OpenPGP digital signature
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
