[CMake] How to make sure "make test" depends on "make all"
Shlomi Fish
shlomif at iglu.org.il
Thu Jun 25 09:58:46 EDT 2009
On Thursday 25 June 2009 14:50:39 Marcel Loose wrote:
> Hi Shlomi,
>
> As you already found out the hard way, it is not possible to let the
> target 'all' depend on, e.g., 'test'. Targets like 'all' and 'test' are
> special to CMake.
OK. I want "check" or "test" to depend on "all" - not vice versa.
>
> How does run-tests.pl know which tests to run? Does it read some kind of
> configuration file?
>
No, I'm just globbing all files that match a certain pattern:
{{{
my $tests_glob = "*.{exe,t}";
[and later]
# Put the valgrind test last because it takes a long time.
my @tests =
sort
{
(($a =~ /valgrind/) <=> ($b =~ /valgrind/))
||
($a cmp $b)
}
glob("t/$tests_glob")
;
}}}
Regards,
Shlomi Fish
> Best regards,
> Marcel Loose.
>
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://xrl.us/bjn7t
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