[CMake] Call multiple Makefile
Filipe Sousa
filipe at ipb.pt
Thu Jul 27 06:24:23 EDT 2006
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
> CMake at cmake.org
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20060727/c05783fc/signature.pgp
More information about the CMake
mailing list