# Create a library called "libFairTools" 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} ${GTEST_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/fairtools ${CMAKE_SOURCE_DIR}/test/testlib ) # Boost is needed for the regular expression handling find_package(Boost COMPONENTS regex) If(Boost_FOUND) Set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS} ) EndIf(Boost_FOUND) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) ############### build the test ##################### If(Boost_FOUND) add_executable(_GTestFairTools _GTestFairTools.cxx) target_link_libraries(_GTestFairTools ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${GTEST_BOTH_LIBRARIES} FairTools FairTest) add_test(_GTestFairTools ${FAIRROOT_BINARY_DIR}/bin/_GTestFairTools) Else(Boost_FOUND) Message(STATUS "Could not build the test executable, because the Boost libraries are misssing.") EndIf(Boost_FOUND) #If(Boost_FOUND) # add_executable(_BoostTestFairTools _BoostTestFairTools.cxx) # target_link_libraries(_BoostTestFairTools ${Boost_LIBRARIES} FairTools FairTest) # add_test(_BoostTestFairTools ${FAIRROOT_BINARY_DIR}/bin/_BoostTestFairTools) #Else(Boost_FOUND) # Message(STATUS "Could not build the test executable, because the Boost libraries are misssing.") #EndIf(Boost_FOUND)