Skip to content
Snippets Groups Projects
Commit 58b26fd1 authored by Omveer Singh's avatar Omveer Singh Committed by Omveer_Singh
Browse files

!1006 commit modifications

MQ/monitor/CMakeLists.txt: Boost added as dependency
algo/data/CMakeLists.txt: modified in Modern CMake
algo/test/CMakeLists: modified in Modern CMake
core/data/test/global/CMakeLists.txt: Unnecessary dependencies removed and added required dependencies
core/data/test/psd/CMakeLists.txt: Unnecessary dependencies removed
core/detectors/trd/CMakeLists.txt: TMVA dependency change to ROOT::TMVA
parent a63e8459
No related branches found
No related tags found
1 merge request!1006Transition to Modern CMake (Remaining CMakeList.txt files)
......@@ -31,6 +31,8 @@ set(PRIVATE_DEPS
CbmFlibMcbm2018
FairMQ::Tools
FairRoot::ParBase
Boost::serialization
Boost::program_options
ROOT::Gpad
ROOT::Hist
ROOT::RIO
......
......@@ -40,20 +40,9 @@ target_include_directories(OnlineData
PUBLIC ${CMAKE_SOURCE_DIR}/core/data/psd
PUBLIC ${CMAKE_SOURCE_DIR}/core/data/global
PUBLIC ${CMAKE_SOURCE_DIR}/core/data/raw
PUBLIC ${FLES_IPC_INCLUDE_DIRECTORY}
)
target_include_directories(OnlineData SYSTEM
PUBLIC ${Boost_INCLUDE_DIR}
PUBLIC ${FAIRLOGGER_INCLUDE_DIR}
PUBLIC ${XPU_INCLUDE_DIRECTORY}
)
target_link_directories(OnlineData
PUBLIC ${FAIRLOGGER_LIBRARY_DIR}
)
target_compile_definitions(OnlineData PUBLIC NO_ROOT)
target_link_libraries(OnlineData FairLogger)
target_link_libraries(OnlineData FairLogger::FairLogger external::fles_ipc xpu)
install(TARGETS OnlineData DESTINATION lib)
Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _dependencies _testdepend)
Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _pub_dep _pvt_dep _int_dep _testdepend)
Include_Directories(SYSTEM "${_includeDirs}")
Link_Directories(${_linkDirs})
Add_Executable(${_testname} ${_sources})
add_executable(${_testname} ${_sources})
if(CBM_LOCAL_GTEST)
Add_Dependencies(${_testname} GTEST)
add_dependencies(${_testname} GTEST)
endif()
Target_Link_Libraries(${_testname} ${_dependencies})
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})
string(REPLACE ${PROJECT_SOURCE_DIR}
${PROJECT_BINARY_DIR} new_path ${CMAKE_CURRENT_SOURCE_DIR}
......@@ -18,41 +17,35 @@ Macro(CreateGTestExeAndAddTest _testname _includeDirs _linkDirs _sources _depend
EndIf()
EndMacro(CreateGTestExeAndAddTest)
FIND_PACKAGE(Threads REQUIRED)
Set(INCLUDE_DIRECTORIES
${CBMBASE_DIR}
${CBMDATA_DIR}
${CBMDATA_DIR}/base
${CBMDATA_DIR}/global
${CBMDATA_DIR}/sts
${CBMDATA_DIR}/tof
${CBMDATA_DIR}/rich
${CBMDATA_DIR}/much
${CBMDATA_DIR}/psd
${CBMDATA_DIR}/trd
${FLES_IPC_INCLUDE_DIRECTORY}
${CMAKE_SOURCE_DIR}/algo
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
${BASE_INCLUDE_DIRECTORIES}
${GTEST_INCLUDE_DIR}
)
MESSAGE("FAIRROOT_LIBRARY_DIR: ${FAIRROOT_LIBRARY_DIR}")
Set(LINK_DIRECTORIES
${FAIRROOT_LIBRARY_DIR}
)
Set(DEPENDENCIES
${GTEST_BOTH_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
set(PUB_DEPS
CbmData
)
if (CMAKE_SYSTEM_NAME MATCHES Linux)
set(DEPENDENCIES ${DEPENDENCIES} rt)
endif()
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
......@@ -60,7 +53,7 @@ Set(TimeClusterTriggerSources
)
CreateGTestExeAndAddTest(_GTestTimeClusterTrigger "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}"
"${TimeClusterTriggerSources}" "${DEPENDENCIES}" "")
"${TimeClusterTriggerSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "")
Set(EventBuilderSources
${CMAKE_SOURCE_DIR}/algo/evbuild/EventBuilder.cxx
......@@ -68,6 +61,6 @@ Set(EventBuilderSources
)
CreateGTestExeAndAddTest(_GTestEventBuilder "${INCLUDE_DIRECTORIES}" "${LINK_DIRECTORIES}"
"${EventBuilderSources}" "${DEPENDENCIES}" "")
"${EventBuilderSources}" "${PUB_DEPS}" "${PVT_DEPS}" "${INT_DEPS}" "")
......@@ -11,22 +11,16 @@ set(PUB_DEPS
CbmData
Gtest
GtestMain
ROOT::Physics
)
set(PVT_DEPS
CbmTrdBase
NicaCbmFormat
ROOT::Core
FairLogger::FairLogger
Boost::regex
ROOT::Matrix
ROOT::EG
VMCLibrary
ROOT::Physics
)
set(INT_DEPS
FairRoot::Base
external::fles_ipc
xpu
)
......
......@@ -7,22 +7,12 @@ set(PUB_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
)
......
......@@ -98,7 +98,7 @@ set(PRIVATE_DEPENDENCIES
ROOT::Gpad
ROOT::MathCore
ROOT::Tree
TMVA
ROOT::TMVA
)
set(INTERFACE_DEPENDENCIES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment