[Cmake] test target problems on Solaris 2.9

Brad King brad . king at kitware . com
Tue, 15 Jul 2003 13:31:28 -0400 (EDT)


Dan,

> Assume I have the following directory tree:
>
> 	root ------> source ------> test
>
> Where all directories have a CMakeLists.txt file.  If I use the ADD_TEST
> command in the test directory's CMakeLists.txt, the command "make test"
> will run when executed from either "root" or "test".  However, if I run
> it from "source", make echoes back "target test is up to date".

Since your subdirectory under source is called "test", make sees it and
thinks the "test" target is up to date (since there are no dependencies).
GNU make provides a ".PHONY:"  target that can be used to tell it to
ignore any file/dir called "test", but that isn't portable to other makes.
We're looking for work-arounds.  Any ideas?

-Brad