[CMake] error 255 while re-make
Marius S Giurgi
rendezvous at dreamxplosion.com
Wed Feb 23 16:49:42 EST 2005
Hi,
I was wondering if anyone could help me figure out this error I'm
getting.
First time I compile the project (cmake followed by make) it works
fine, it builds everything nicely and the application runs.
Then, I expected that, if I need to make modification to the source
file (the only .cxx file in the project) all I need to do to rebuild
the project is to run make again. However, the second time I re-make
the project i get the following error.
First make gives the following output:
saruman:/Developer/VTK/myVTK/cxx/vtkfltktest marius$ make
Building dependencies cmake.check_depends...
Building object file test.o...
Building executable /Developer/VTK/myVTK/cxx/vtkfltktest/test...
then I made (minor) changes to the test.cxx
Second make gives:
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
Third made (just out of curiosity) gives:
make[1]: Circular test.o <- /Developer/VTK/myVTK/cxx/vtkfltktest/test
dependency dropped.
cmake.depends is up-to-date
make[1]: Circular test.o <- /Developer/VTK/myVTK/cxx/vtkfltktest/test
dependency dropped.
The only way I could rebuild my project was to do enter "make clean" ,
"cmake .", "make"
Can anyone help? any hint appreciated. thanks
marius
Here's the CMakeLists.txt for this project:
PROJECT (TEST)
# find the FLTK
FIND_PACKAGE (FLTK)
IF (FLTK_FOUND)
INCLUDE_DIRECTORIES (${FLTK_INCLUDE_DIR})
ENDIF (FLTK_FOUND)
# Include the vtkFLTK CMake configuration.
IF (NOT FIND_VTK_FLTK_FILE)
FIND_FILE (FIND_VTK_FLTK_FILE FindvtkFLTK.cmake
${CMAKE_ROOT}/Modules
)
ENDIF (NOT FIND_VTK_FLTK_FILE)
IF (FIND_VTK_FLTK_FILE)
INCLUDE (${FIND_VTK_FLTK_FILE})
IF (VTK_FLTK_FOUND)
INCLUDE (${VTK_FLTK_USE_FILE})
ELSE (VTK_FLTK_FOUND)
MESSAGE(SEND_ERROR "UsevtkFLTK.cmake not found!")
ENDIF (VTK_FLTK_FOUND)
ELSE (FIND_VTK_FLTK_FILE)
MESSAGE(SEND_ERROR "FindvtkFLTK.cmake not found!")
ENDIF (FIND_VTK_FLTK_FILE)
SET (TEST_SRCS test)
# Add the target
ADD_EXECUTABLE (test ${TEST_SRCS})
TARGET_LINK_LIBRARIES (test vtkFLTK vtkIO vtkHybrid)
# ATTACH the default FLTK resource fork to the executable.
IF(APPLE)
FIND_PROGRAM(VTK_APPLE_RESOURCE Rez /Developer/Tools)
IF(VTK_APPLE_RESOURCE)
ADD_CUSTOM_COMMAND(SOURCE test
POST_BUILD
COMMAND ${VTK_APPLE_RESOURCE}
ARGS -t APPL -o
${TEST_SOURCE_DIR}/test
${FLTK_INCLUDE_DIR}/FL/mac.r
TARGET test)
ENDIF(VTK_APPLE_RESOURCE)
ENDIF(APPLE)
More information about the CMake
mailing list