diff --git a/algo/test/CMakeLists.txt b/algo/test/CMakeLists.txt index d4adaee8acef623ac0d80200302b1055ba745978..9a40f30d8d7818de555fa0e0ccbd4443a5a14a55 100644 --- a/algo/test/CMakeLists.txt +++ b/algo/test/CMakeLists.txt @@ -1,10 +1,6 @@ Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _pub_dep _pvt_dep _int_dep _testdepend) add_executable(${_testname} ${_sources}) - if(CBM_LOCAL_GTEST) - add_dependencies(${_testname} GTEST) - endif() - add_dependencies(${_testname} GTEST) target_link_libraries(${_testname} PUBLIC ${_pub_dep} PRIVATE ${_pvt_dep} INTERFACE ${_int_dep} ) target_include_directories(${_testname} PUBLIC ${_includeDirs}) Gen_Exe_Script(${_testname}) @@ -18,37 +14,18 @@ Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _pub_de EndMacro(CreateGTestExeAndAddTest) - get_target_property(_inDir Gtest INTERFACE_INCLUDE_DIRECTORIES) - set_property(TARGET Gtest APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_inDir}/..") +# get_target_property(_inDir Gtest INTERFACE_INCLUDE_DIRECTORIES) +# set_property(TARGET Gtest APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_inDir}/..") -set(INCLUDE_DIRECTORIES - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/algo/trigger - ${CMAKE_SOURCE_DIR}/algo/evbuild - ) - -set(PUB_DEPS - CbmData +set(PVT_DEPS + Algo Gtest GtestMain - ROOT::Physics - ) - -set(PVT_DEPS - ROOT::Core - ROOT::Matrix - ROOT::EG - ) - -set(INT_DEPS - FairRoot::Base - external::fles_ipc ) Set(TimeClusterTriggerSources - ${CMAKE_SOURCE_DIR}/algo/trigger/TimeClusterTrigger.cxx _GTestTimeClusterTrigger.cxx ) @@ -56,7 +33,6 @@ CreateGTestExeAndAddTest(_GTestTimeClusterTrigger "${INCLUDE_DIRECTORIES}" "${LI "${TimeClusterTriggerSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "") Set(EventBuilderSources - ${CMAKE_SOURCE_DIR}/algo/evbuild/EventBuilder.cxx _GTestEventBuilder.cxx ) diff --git a/core/data/test/CMakeLists.txt b/core/data/test/CMakeLists.txt index b213044a866baf814cb715714079bf409a124f11..c82655841ca6f85b696e844b655057357e4c5193 100644 --- a/core/data/test/CMakeLists.txt +++ b/core/data/test/CMakeLists.txt @@ -1,9 +1,6 @@ Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _pub_dep _pvt_dep _int_dep _testdepend) add_executable(${_testname} ${_sources}) - if(CBM_LOCAL_GTEST) - add_dependencies(${_testname} GTEST) - endif() target_link_libraries(${_testname} PUBLIC ${_pub_dep} PRIVATE ${_pvt_dep} INTERFACE ${_int_dep} ) target_include_directories(${_testname} PUBLIC ${_includeDirs}) Gen_Exe_Script(${_testname}) @@ -21,35 +18,18 @@ add_subdirectory(global) add_subdirectory(psd) add_subdirectory(trd) -set(INCLUDE_DIRECTORIES - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/sts - ${CMAKE_CURRENT_SOURCE_DIR}/global -) - - - -set(PUB_DEPS +set(PVT_DEPS CbmData Gtest GtestMain + + FairRoot::Base + ROOT::Physics - ) - -set(PVT_DEPS - CbmTrdBase - NicaCbmFormat ROOT::Core ROOT::Matrix - ROOT::EG - ) - -set(INT_DEPS - FairRoot::Base - external::fles_ipc - xpu - VMCLibrary + + Boost::serialization ) @@ -61,7 +41,6 @@ endif() Set(CbmLinkSources - ../CbmLink.cxx _GTestCbmLink.cxx ) @@ -69,7 +48,6 @@ CreateGTestExeAndAddTest(_GTestCbmLink "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTOR "${CbmLinkSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "") Set(CbmMatchSources - ../CbmMatch.cxx _GTestCbmMatch.cxx ) @@ -77,7 +55,6 @@ CreateGTestExeAndAddTest(_GTestCbmMatch "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTO "${CbmMatchSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmLink") Set(CbmClusterSources - ../CbmCluster.cxx _GTestCbmCluster.cxx ) @@ -85,7 +62,6 @@ CreateGTestExeAndAddTest(_GTestCbmCluster "${INCLUDE_DIRECTORIES}" "${LINK_DIREC "${CbmClusterSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmDigi") Set(CbmHitSources - ../CbmHit.cxx _GTestCbmHit.cxx ) @@ -93,7 +69,6 @@ CreateGTestExeAndAddTest(_GTestCbmHit "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORI "${CbmHitSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmCluster") Set(CbmPixelHitSources - ../CbmPixelHit.cxx _GTestCbmPixelHit.cxx ) @@ -101,7 +76,6 @@ CreateGTestExeAndAddTest(_GTestCbmPixelHit "${INCLUDE_DIRECTORIES}" "${LINK_DIRE "${CbmPixelHitSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmHit") Set(CbmStripHitSources - ../CbmStripHit.cxx _GTestCbmStripHit.cxx ) @@ -110,7 +84,6 @@ CreateGTestExeAndAddTest(_GTestCbmStripHit "${INCLUDE_DIRECTORIES}" "${LINK_DIRE Set(CbmEventSources - ../CbmEvent.cxx _GTestCbmEvent.cxx ) @@ -126,7 +99,6 @@ CreateGTestExeAndAddTest(_GTestCbmConstants "${INCLUDE_DIRECTORIES}" "${LINK_DIR "${CbmConstantsSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmEvent") Set(CbmErrorMessageSources - ../CbmErrorMessage.cxx _GTestCbmErrorMessage.cxx ) @@ -135,7 +107,6 @@ CreateGTestExeAndAddTest(_GTestCbmErrorMessage "${INCLUDE_DIRECTORIES}" "${LINK_ Set(CbmAddressSources - ../CbmAddress.cxx _GTestCbmAddress.cxx ) @@ -143,26 +114,14 @@ CreateGTestExeAndAddTest(_GTestCbmAddress "${INCLUDE_DIRECTORIES}" "${LINK_DIREC "${CbmAddressSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmErrorMessage") - -#Set(CbmModuleListSources -# ${CBMDATA_DIR}/CbmModuleList.cxx -# _GTestCbmModuleList.cxx -#) -# -#CreateGTestExeAndAddTest(_GTestCbmModuleList "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" -# "${CbmModuleListSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmVertex") - - Set(CbmStsDigiSources - ../sts/CbmStsDigi.cxx sts/_GTestCbmStsDigi.cxx ) CreateGTestExeAndAddTest(_GTestCbmStsDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" - "${CbmStsDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmVertex") + "${CbmStsDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestCbmAddress") Set(CbmTofDigiSources - ../tof/CbmTofDigi.cxx tof/_GTestCbmTofDigi.cxx ) @@ -170,7 +129,6 @@ CreateGTestExeAndAddTest(_GTestCbmTofDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIREC "${CbmTofDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestStsDigi") Set(CbmRichDigiSources - ../rich/CbmRichDigi.cxx rich/_GTestCbmRichDigi.cxx ) @@ -179,7 +137,6 @@ CreateGTestExeAndAddTest(_GTestCbmRichDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIRE Set(CbmMuchDigiSources - ../much/CbmMuchDigi.cxx much/_GTestCbmMuchDigi.cxx ) @@ -187,24 +144,9 @@ CreateGTestExeAndAddTest(_GTestCbmMuchDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIRE "${CbmMuchDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTesRichDigi") Set(CbmMuchBeamTimeDigiSources - ../much/CbmMuchBeamTimeDigi.cxx much/_GTestCbmMuchBeamTimeDigi.cxx ) CreateGTestExeAndAddTest(_GTestCbmMuchBeamTimeDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" "${CbmMuchBeamTimeDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestMuchDigi") -#GENERATE_ROOT_TEST_SCRIPT(${CMAKE_SOURCE_DIR}/test/cbmdata/load_all_libs.C) -# Add_Test(load_all_libs -# ${CMAKE_BINARY_DIR}/test/cbmdata/load_all_libs.sh) -# Set_Tests_Properties(load_all_libs PROPERTIES TIMEOUT "30") -# Set_Tests_Properties(load_all_libs PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished succesfully") - -#Set(CbmTrackSources -# ${CBMDATA_DIR}/CbmTrack.cxx -# _GTestCbmTrack.cxx -#) - -#CreateGTestExeAndAddTest(_GTestCbmTrack "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" -# "${CbmTrackSources}" "${DEPENDENCIES}" "_GTestCbmConstants") - diff --git a/core/data/test/global/CMakeLists.txt b/core/data/test/global/CMakeLists.txt index 9e0526f5c709196ed1044be8a44119082257bffc..23d1d4836cc12e04941b543d10c5e12a4652a716 100644 --- a/core/data/test/global/CMakeLists.txt +++ b/core/data/test/global/CMakeLists.txt @@ -7,26 +7,20 @@ set(INCLUDE_DIRECTORIES ) -set(PUB_DEPS +set(PVT_DEPS CbmData Gtest GtestMain - ) - -set(PVT_DEPS - FairLogger::FairLogger - Boost::regex + + Boost::serialization + ROOT::Matrix ROOT::Physics ) -set(INT_DEPS - ) - # --- Test CbmDigiEvent Set(CbmDigiEventSources - ${CBMDATA_DIR}/global/CbmDigiEvent.h _GTestCbmDigiEvent.cxx ) CreateGTestExeAndAddTest(_GTestCbmDigiEvent "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" @@ -34,7 +28,6 @@ CreateGTestExeAndAddTest(_GTestCbmDigiEvent "${INCLUDE_DIRECTORIES}" "${LINK_DIR # --- Test CbmDigiTimeslice Set(CbmDigiTimesliceSources - ${CBMDATA_DIR}/global/CbmDigiTimeslice.h _GTestCbmDigiTimeslice.cxx ) CreateGTestExeAndAddTest(_GTestCbmDigiTimeslice "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" @@ -42,7 +35,6 @@ CreateGTestExeAndAddTest(_GTestCbmDigiTimeslice "${INCLUDE_DIRECTORIES}" "${LINK # --- Test CbmVertex Set(CbmVertexSources - ${CBMDATA_DIR}/global/CbmVertex.cxx _GTestCbmVertex.cxx ) CreateGTestExeAndAddTest(_GTestCbmVertex "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" diff --git a/core/data/test/global/_GTestCbmVertex.cxx b/core/data/test/global/_GTestCbmVertex.cxx index 0ecdfe243b21779b2116093af2c501619e33b549..3ffff0dd481c7f0f1faacac6a3b6b4eed2d84f25 100644 --- a/core/data/test/global/_GTestCbmVertex.cxx +++ b/core/data/test/global/_GTestCbmVertex.cxx @@ -4,8 +4,6 @@ #include "CbmVertex.h" -#include <Logger.h> - #include <TMatrixTSym.h> #include <TVector3.h> diff --git a/core/data/test/psd/CMakeLists.txt b/core/data/test/psd/CMakeLists.txt index a7bcd55a5f8792c81b41af59b731b13610a78913..455e6415f0addcaa38d265cb9601292f2840433f 100644 --- a/core/data/test/psd/CMakeLists.txt +++ b/core/data/test/psd/CMakeLists.txt @@ -7,17 +7,11 @@ set(PUB_DEPS CbmData Gtest GtestMain - ) - -set(PVT_DEPS - ) -set(INT_DEPS + FairRoot::Base ) - Set(CbmPsdDigiSources - ${CBMDATA_DIR}/psd/CbmPsdDigi.cxx _GTestCbmPsdDigi.cxx ) @@ -25,7 +19,6 @@ CreateGTestExeAndAddTest(_GTestCbmPsdDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIREC "${CbmPsdDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "") Set(CbmPsdAddressSources - ${CBMDATA_DIR}/psd/CbmPsdAddress.cxx _GTestCbmPsdAddress.cxx ) @@ -33,14 +26,12 @@ CreateGTestExeAndAddTest(_GTestCbmPsdAddress "${INCLUDE_DIRECTORIES}" "${LINK_DI "${CbmPsdAddressSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestPsdDigi") Set(CbmPsdPointSources - ${CBMDATA_DIR}/psd/CbmPsdPoint.cxx _GTestCbmPsdPoint.cxx ) CreateGTestExeAndAddTest(_GTestCbmPsdPoint "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" "${CbmPsdPointSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestPsdAddress") Set(CbmPsdHitSources - ${CBMDATA_DIR}/psd/CbmPsdHit.cxx _GTestCbmPsdHit.cxx ) diff --git a/core/data/test/trd/CMakeLists.txt b/core/data/test/trd/CMakeLists.txt index f464d27969285acd3576c822d9c733f15ac17ff3..49e78660ce7f8c7459bce98f8e1c27f92b5bf03c 100644 --- a/core/data/test/trd/CMakeLists.txt +++ b/core/data/test/trd/CMakeLists.txt @@ -1,59 +1,25 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} - ${CBMDATA_DIR}/trd ${CMAKE_CURRENT_SOURCE_DIR}/.. ) -set(PUB_DEPS +set(PVT_DEPS CbmData Gtest GtestMain - ROOT::Physics - ) - -set(PVT_DEPS - CbmTrdBase - NicaCbmFormat ROOT::Core - ROOT::Matrix - ROOT::EG - ) - -set(INT_DEPS FairRoot::Base - external::fles_ipc - xpu - VMCLibrary ) -#Set(CbmTrdDetectorIdSources -# ${CBMDATA_DIR}/trd/CbmTrdAddress.cxx -# _GTestCbmTrdDetectorId.cxx -#) - -#CreateGTestExeAndAddTest(_GTestCbmTrdDetectorId "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" -# "${CbmTrdDetectorIdSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "") - - Set(CbmTrdDigiSources - ${CBMDATA_DIR}/trd/CbmTrdDigi.cxx _GTestCbmTrdDigi.cxx ) CreateGTestExeAndAddTest(_GTestCbmTrdDigi "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" "${CbmTrdDigiSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "") -#Set(CbmTrdAddressSources -# ${CBMDATA_DIR}/trd/CbmTrdAddress.cxx -# _GTestCbmTrdAddress.cxx -#) - -#CreateGTestExeAndAddTest(_GTestCbmTrdAddress "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}" -# "${CbmTrdAddressSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestTrdDigi") - Set(CbmTrdPointSources - ${CBMDATA_DIR}/trd/CbmTrdPoint.cxx _GTestCbmTrdPoint.cxx ) @@ -61,7 +27,6 @@ CreateGTestExeAndAddTest(_GTestCbmTrdPoint "${INCLUDE_DIRECTORIES}" "${LINK_DIRE "${CbmTrdPointSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "_GTestTrdDigi") Set(CbmTrdHitSources - ${CBMDATA_DIR}/trd/CbmTrdHit.cxx _GTestCbmTrdHit.cxx )