[CMake] How to make sure "make test" depends on "make all"

Shlomi Fish shlomif at iglu.org.il
Wed Jun 24 08:04:56 EDT 2009


Hi Marcel!

On Tuesday 23 June 2009 13:03:25 Marcel Loose wrote:
> Hi Shlomi
>
> You might consider using another target, say 'check'. I've used that to
> mimic more or less the GNU autotools behaviour. See
> http://www.cmake.org/Wiki/CMakeEmulateMakeCheck. Don't use
> EXCLUDE_FROM_ALL if you want your test programs to depend on the target
> 'all'.
>

Tried it and it didn't work. I still couldn't get it to run the "all" target 
by default (i.e: depend on it). The EXCLUDE_FROM_ALL specifies whether "check" 
will be built as part of "all" - not vice versa.

Regards,

	Shlomi Fish


> Best regards,
> Marcel Loose.
>
> -----Original Message-----
> From: Hugo Heden <hugoheden at gmail.com>
> To: Shlomi Fish <shlomif at iglu.org.il>
> Cc: Cmake Mailing List <cmake at cmake.org>
> Subject: Re: [CMake] How to make sure "make test" depends on "make all"
> Date: Tue, 23 Jun 2009 10:57:16 +0200
>
> On Tue, Jun 23, 2009 at 9:56 AM, Shlomi Fish <shlomif at iglu.org.il>
> wrote:
>         Hi all!
>
>         I'm using cmake-2.6.4-3mdv2010.0 on Mandriva Linux Cooker, and
>         ran into a
>         problem. I want "make test" (which is a custom target) to depend
>         on "make
>         all", in this codebase:
>
>
> I can't say that I understand the error messages you're getting, but it
> is unfortunately *not* possible to make built-in targets like "test",
> "all" and "install" depend on each other. See for example this bug:
>
> http://public.kitware.com/Bug/view.php?id=8438
>
>
> _______________________________________________
> 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

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Stop Using MSIE - http://www.shlomifish.org/no-ie/

God gave us two eyes and ten fingers so we will type five times as much as we
read.


More information about the CMake mailing list