[Cmake] beginner question

Lucas Lorenzo lucas at cvrti.utah.edu
Thu, 15 Apr 2004 11:04:54 -0600


Hi all,

I'm working with ITK. I'm adding some member functions to some classes 
already existing so, what I'm doing is to make  a copy of the .h and 
.txx files into my application directory and I'm performing the changes 
onto these copied files.

In particular, I'm working with a parent and a derived class. In my 
application I'm including the .h file for the derived class and I'm 
defining an object of the derived class.

My problem is that changes in the .h file of the derived class seemed 
to be taken into account by the compiler but when I make a change in 
the parent class .h file nothing happens. It's like it is still looking 
at the .h file in the ITK include directory (even though the path for 
my copied .h files is been included).

My CMakeList.txt file looks like this:

PROJECT(ThresholdSegPrSh)
INCLUDE_REGULAR_EXPRESSION("^.*$")

# Find ITK.
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
   INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
   MESSAGE(FATAL_ERROR
           "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)


ADD_EXECUTABLE(ThresholdSegPrSh ThresholdSegPrSh.cxx file1.txx 
file2.txx file3.txx )

TARGET_LINK_LIBRARIES(ThresholdSegPrSh ITKCommon ITKBasicFilters ITKIO
ITKAlgorithms)

Could anyone please help me to figure it out what am I doing wrong?
Thanks,

Lucas Lorenzo

University of Utah
Nora Eccles Harrison CardioVascular Research and Training Institute
Fellows Room
95 South 2000 East
Salt Lake City, UT 84112-5000

e-mail:  lucas at cvrti.utah.edu
telephone: 801-587-9536