GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » CMake Problem Thread
Re: CMake Problem Thread [message #4777 is a reply to message #4776] Wed, 01 August 2007 10:25 Go to previous messageGo to previous message
Florian Nebel
Messages: 10
Registered: July 2007
Location: TU Munich
occasional visitor
From: *e12.physik.tu-muenchen.de
Hi,

yes in deed this is my private could which I am currently developing. I located it in the recotask/demo directory. The corresponding CMakeList.txt file reads as follows:

# Create a library called "" which includes the source files given in
# the array .
# The extension is already found. Any number of sources could be listed here.

set(INCLUDE_DIRECTORIES
${ROOT_INCLUDE_DIR}
${CLHEP_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/geobase
${CMAKE_SOURCE_DIR}/parbase
${CMAKE_SOURCE_DIR}/base
${CMAKE_SOURCE_DIR}/field
${CMAKE_SOURCE_DIR}/mcstack
${CMAKE_SOURCE_DIR}/passive
${CMAKE_SOURCE_DIR}/mvd
${CMAKE_SOURCE_DIR}/mvd/tst
${CMAKE_SOURCE_DIR}/genfit
${CMAKE_SOURCE_DIR}/tpc
${CMAKE_SOURCE_DIR}/tpc/tpcreco
${CMAKE_SOURCE_DIR}/tpcreco
${CMAKE_SOURCE_DIR}/recotasks
${CMAKE_SOURCE_DIR}/recotasks/demo
)

include_directories( ${INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
)

link_directories( ${LINK_DIRECTORIES})

set(RECOTASKS_SRCS
CbmFieldAdaptor.cxx
demo/DemoRecoHit.cxx
demo/DemoPatternRecoTask.cxx
demo/DemoKalmanTask.cxx
demo/PrintTask.cxx
demo/MCAnalysisTask.cxx
demo/ClusterAnalysisTask.cxx
KalmanTask.cxx
TrackVisTask.cxx
TrackFitStat.cxx
TrackFitStatTask.cxx
../tpc/tpcreco/TpcPlanarRecoHit.cxx
)

# fill list of header files from list of source files
# by exchanging the file extension
CHANGE_FILE_EXTENSION(*.cxx *.h RECOTASKS_HEADERS "${RECOTASKS_SRCS}")

set(RECOTASKS_LINKDEF recotasksLinkDef.h)
set(RECOTASKS_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/recotasksDict.cxx)

ROOT_GENERATE_DICTIONARY("${RECOTASKS_HEADERS}" "${RECOTASKS_LINKDEF}" "${RECOTASKS_DICTIONARY}" "${INCLUDE_DIRECTORIES}")

SET(RECOTASKS_SRCS ${RECOTASKS_SRCS} ${RECOTASKS_DICTIONARY})

add_library(recotasks SHARED ${RECOTASKS_SRCS})
target_link_libraries(recotasks ${ROOT_LIBRARIES})
set_target_properties(recotasks PROPERTIES VERSION 0.0.1 SOVERSION 0 )

################ install ###################
install(TARGETS recotasks DESTINATION ${CMAKE_BINARY_DIR}/lib)

The lines:
demo/PrintTask.cxx
demo/MCAnalysisTask.cxx
demo/ClusterAnalysisTask.cxx

and

../tpc/tpcreco/TpcPlanarRecoHit.cxx

have been added by myself. The first three tasks have been developed by myself, the first two compiled well with automake and cmake. The third task is extremely similar to the second task just using another root file as input, and includes some minor modifications on variable names which are in no relation with the produced errors.

The last line was necessary to resolve the dynamic link error:

dlopen error: /home/knucl/FAIRroot/PANDAroot/cbuild/lib/librecotasks.so: undefined symbol: _ZTI16TpcPlanarRecoHit
Load Error: Failed to load Dynamic link library /home/knucl/FAIRroot/PANDAroot/cbuild/lib/librecotasks.so

Maybe this is related to the problem at hand?
 
Read Message icon1.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EvtGen searches for 64-bit include files
Next Topic: new external packages /misc/cbmsoft/Etch32/jul08
Goto Forum:
  


Current Time: Tue Dec 03 06:34:38 CET 2024

Total time taken to generate the page: 0.00901 seconds