Hi Erk, On Fri, 2009-03-20 at 10:06 +0100, Eric Noulard wrote: > add_executable(t_hello t_ EXCLUDE_FROM_ALL hello.cpp) > > add_test(t_hello t_hello) > > add_custom_target(check > COMMAND ${CMAKE_BUILD_TOOL} test > DEPENDS t_hello)
I stumbled upon a tiny problem with your solution: make now complains with the following warning: gmake[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. I checked the generated file ./test/CMakeFiles/check.dir/build.make and found the line that causes this warning: cd /export/home/loose/work/hello/build/test && /usr/bin/gmake test It is caused by the fact that make is called as /usr/bin/gmake, instead of $(MAKE) which is recommended by the GNU Make manual. (See http://www.gnu.org/software/automake/manual/make/Error-Messages.html and http://www.gnu.org/software/automake/manual/make/MAKE-Variable.html#MAKE-Variable) I guess that /usr/bin/gmake has been put there as result of the expansion of CMAKE_BUILD_TOOL. Would there be a workaround? Best regards, Marcel Loose. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake