diff --git a/Common/Utils/CMakeLists.txt b/Common/Utils/CMakeLists.txt index def743d11791c..d9954e23ab435 100644 --- a/Common/Utils/CMakeLists.txt +++ b/Common/Utils/CMakeLists.txt @@ -91,3 +91,6 @@ o2_add_executable(treemergertool COMPONENT_NAME CommonUtils SOURCES src/TreeMergerTool.cxx PUBLIC_LINK_LIBRARIES O2::CommonUtils Boost::program_options ROOT::Core) + +add_library(fpu_support OBJECT src/fpu.cxx) +add_library(O2::fpu_support ALIAS fpu_support) diff --git a/cmake/O2AddExecutable.cmake b/cmake/O2AddExecutable.cmake index d5fea084e2c23..752678c44baf0 100644 --- a/cmake/O2AddExecutable.cmake +++ b/cmake/O2AddExecutable.cmake @@ -92,7 +92,7 @@ function(o2_add_executable baseTargetName) endif() # add the executable with its sources - add_executable(${target} ${A_SOURCES} ${CMAKE_SOURCE_DIR}/Common/Utils/src/fpu.cxx) + add_executable(${target} ${A_SOURCES}) # set the executable output name set_property(TARGET ${target} PROPERTY OUTPUT_NAME ${exeName}) @@ -118,6 +118,7 @@ function(o2_add_executable baseTargetName) # needed for fpu.c target_link_libraries(${target} PUBLIC ROOT::XMLIO) + target_link_libraries(${target} PUBLIC O2::fpu_support) if(NOT A_NO_INSTALL) # install the executable