[CMake] error 255 while re-make

Brad King brad.king at kitware.com
Wed Feb 23 16:59:35 EST 2005


Marius S Giurgi wrote:
> saruman:/Developer/VTK/myVTK/cxx/vtkfltktest marius$ make
> Building dependencies cmake.check_depends...
> CMake Error: Unexpected file type /Developer/VTK/myVTK/cxx/vtkfltktest/test
> make[1]: *** [cmake.check_depends] Error 255
> make: *** [default_target] Error 2
[snip]
> SET (TEST_SRCS test)
> 
> # Add the target
> ADD_EXECUTABLE (test ${TEST_SRCS})

In your list of sources you specify "test", not "test.cxx".  The first 
time CMake can't find "test" so it automatically searches and finds 
"test.cxx".  Then when you do an in-source build there is now a file 
called test so CMake uses the executable itself as the source file. 
This is why the file type is wrong and why you get the circular 
dependency.  Just use

SET(TEST_SRCS test.cxx)

-Brad


More information about the CMake mailing list