Skip to content

Commit

Permalink
Do not use an imported target for Vdt
Browse files Browse the repository at this point in the history
Fixes: ROOT-9751
  • Loading branch information
amadio committed Oct 26, 2018
1 parent fbf960e commit a363eca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 0 additions & 6 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1475,12 +1475,6 @@ if(vdt OR builtin_vdt)
endif()
endif()

if(VDT_FOUND AND NOT TARGET Vdt::Vdt)
add_library(Vdt::Vdt INTERFACE IMPORTED)
set_property(TARGET Vdt::Vdt PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${VDT_INCLUDE_DIRS}")
set_property(TARGET Vdt::Vdt PROPERTY INTERFACE_LINK_LIBRARIES "${VDT_LIBRARIES}")
endif()

#---Check for VecGeom--------------------------------------------------------------------
if (vecgeom)
message(STATUS "Looking for VecGeom")
Expand Down
15 changes: 10 additions & 5 deletions math/vecops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# CMakeLists.txt file for building ROOT math/vecops package
############################################################################

if(vdt)
# needed for rootcling, to be removed
include_directories(${VDT_INCLUDE_DIRS})
if(builtin_vdt)
link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
include_directories(${HEADER_OUTPUT_PATH})
endif()

ROOT_STANDARD_LIBRARY_PACKAGE(ROOTVecOps
Expand All @@ -16,12 +16,17 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTVecOps
src/RVec.cxx
DICTIONARY_OPTIONS
-writeEmptyRootPCM
-I${VDT_INCLUDE_DIR}
LIBRARIES
Core
)

if(vdt)
target_link_libraries(ROOTVecOps PUBLIC Vdt::Vdt)
if(builtin_vdt)
target_link_libraries(ROOTVecOps PUBLIC $<INSTALL_INTERFACE:vdt>)
target_include_directories(ROOTVecOps PUBLIC $<INSTALL_INTERFACE:include>)
elseif(vdt)
target_link_libraries(ROOTVecOps PUBLIC ${VDT_LIBRARIES})
target_include_directories(ROOTVecOps PUBLIC ${VDT_INCLUDE_DIRS})
endif()

target_compile_options(ROOTVecOps PRIVATE -O3 -ffast-math)
Expand Down

0 comments on commit a363eca

Please sign in to comment.