Skip to content

Commit

Permalink
Fix Vc link directory when external
Browse files Browse the repository at this point in the history
  • Loading branch information
dberzano committed Dec 9, 2016
1 parent 0ef6b93 commit c548005
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,28 +336,29 @@ else()
# try to find an external Vc
find_package(Vc 1.0)
if(Vc_FOUND)
message(STATUS "External Vc => 1.0 FOUND")
# define a convenience macro
message(STATUS "External Vc version ${Vc_VERSION} (>= 1.0) found")
# Redefinition of a macro originally under the Vc/ directory which we don't include
macro(ALICE_UseVc)
include_directories(SYSTEM "${Vc_INCLUDE_DIR}")
add_definitions(${Vc_DEFINITIONS})
string(REPLACE ";" " " TMP_CMAKE_CXX_VC_FLAGS "${Vc_COMPILE_FLAGS} ${Vc_ARCHITECTURE_FLAGS}")
set(CMAKE_CXX_FLAGS "${TMPCMAKE_CXX_VC_FLAGS} ${CMAKE_CXX_FLAGS}")
endmacro()
link_directories(${Vc_LIB_DIR})
else()
message(STATUS "External Vc => 1.0 NOT FOUND; looking for Vc 0.7 ...")
# we could try to see if find_packagge(Vc 0.7 IS OK)
message(WARNING "External Vc >= 1.0 not found: falling back on Vc >= 0.7")
find_package(Vc 0.7)
if (Vc_FOUND)
message(STATUS "External Vc => 0.7 FOUND")
message(STATUS "External Vc version ${Vc_VERSION} (>= 0.7) found")
# put here the macros suitable for Vc version 0.7
macro(ALICE_UseVc)
include_directories(SYSTEM "${Vc_INCLUDE_DIR}")
add_definitions(${Vc_DEFINITIONS})
endmacro()
link_directories(${Vc_LIB_DIR})
else()
# finally we fallback to the deprecated internal Vc
message(WARNING "You are using the internal Vc installation: support for this is deprecated and it will be removed soon")
message(WARNING "You are using AliRoot's builtin Vc: this is deprecated and it will be dropped soon")
# Include Vc own cmake
include(Vc/Vc.cmake)
if(NOT ROOT_HASVC)
Expand Down

0 comments on commit c548005

Please sign in to comment.