Skip to content
Snippets Groups Projects
Commit b5aaed5d authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Changes for ROOT-7914 - Unbundle Vc from ROOT

Added test/testVc (test-Vc)
parent 1c873d2e
No related branches found
No related tags found
No related merge requests found
......@@ -184,5 +184,9 @@ Three methods have been added to manage implicit multi-threading in ROOT: ROOT::
## Class Reference Guide
## Build, Configuration and Testing Infrastructure
* Added new 'builtin_vc' option to bundle a version of Vc within ROOT.
The default is OFF, however if the Vc package is not found in the system the option is switched to
ON if the option 'vc' option is ON.
......@@ -66,21 +66,22 @@ ROOT_BUILD_OPTION(alien ON "AliEn support, requires libgapiUI from ALICE")
ROOT_BUILD_OPTION(asimage ON "Image processing support, requires libAfterImage")
ROOT_BUILD_OPTION(astiff ON "Include tiff support in image processing")
ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")
ROOT_BUILD_OPTION(builtin_afterimage ON "Built included libAfterImage, or use system libAfterImage")
ROOT_BUILD_OPTION(builtin_fftw3 OFF "Built the FFTW3 library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_ftgl ON "Built included libFTGL, or use system libftgl")
ROOT_BUILD_OPTION(builtin_freetype OFF "Built included libfreetype, or use system libfreetype")
ROOT_BUILD_OPTION(builtin_glew ON "Built included libGLEW, or use system libGLEW")
ROOT_BUILD_OPTION(builtin_afterimage ON "Build included libAfterImage, or use system libAfterImage")
ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build the FFTW3 library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_ftgl ON "Build included libFTGL, or use system libftgl")
ROOT_BUILD_OPTION(builtin_freetype OFF "Build included libfreetype, or use system libfreetype")
ROOT_BUILD_OPTION(builtin_glew ON "Build included libGLEW, or use system libGLEW")
ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally, or use system OpenSSL")
ROOT_BUILD_OPTION(builtin_pcre OFF "Built included libpcre, or use system libpcre")
ROOT_BUILD_OPTION(builtin_zlib OFF "Built included libz, or use system libz")
ROOT_BUILD_OPTION(builtin_lzma OFF "Built included liblzma, or use system liblzma")
ROOT_BUILD_OPTION(builtin_davix OFF "Built the Davix library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_gsl OFF "Built the GSL library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_cfitsio OFF "Built the FITSIO library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_xrootd OFF "Built the XROOTD internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_llvm ON "Built the LLVM internally")
ROOT_BUILD_OPTION(builtin_tbb OFF "Built the TBB internally")
ROOT_BUILD_OPTION(builtin_pcre OFF "Build included libpcre, or use system libpcre")
ROOT_BUILD_OPTION(builtin_zlib OFF "Build included libz, or use system libz")
ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
......
......@@ -1113,6 +1113,31 @@ if(geocad)
endif()
endif()
#---Check for Vc---------------------------------------------------------------------
if(vc)
if(NOT builtin_vc)
message(STATUS "Looking for Vc")
find_package(Vc 1.0 CONFIG QUIET)
if(NOT Vc_FOUND)
message(STATUS "Vc not found. Switching on builtin_vc option")
set(builtin_vc ON CACHE BOOL "" FORCE)
endif()
set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR}) # Missing from VcConfig.cmake
endif()
if(builtin_vc)
set(vc_version 1.1.0)
ExternalProject_Add(
VC
URL ${repository_tarfiles}/Vc-${vc_version}.tar.gz
INSTALL_DIR ${CMAKE_BINARY_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
)
set(Vc_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
set(Vc_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
endif()
#---Report non implemented options---------------------------------------------------
foreach(opt afs glite sapdb srp)
if(${opt})
......
if(vc)
if(testing)
set(vc_tests ON)
endif()
set(TARGET_ARCHITECTURE auto CACHE STRING "")
add_subdirectory(vc)
mark_as_advanced(TARGET_ARCHITECTURE TEST_OPERATOR_FAILURES VC_IMPL)
endif()
#if(vc)
# if(testing)
# set(vc_tests ON)
# endif()
# set(TARGET_ARCHITECTURE auto CACHE STRING "")
# add_subdirectory(vc)
# mark_as_advanced(TARGET_ARCHITECTURE TEST_OPERATOR_FAILURES VC_IMPL)
#endif()
add_subdirectory(mathcore)
if(mathmore)
add_subdirectory(mathmore)
......
......@@ -291,6 +291,23 @@ if(ROOT_imt_FOUND)
endif()
endif()
#--Vc basic test-----------------------------------------------------------------------------------
if(ROOT_vc_FOUND)
include_directories(${Vc_INCLUDE_DIRS})
ROOT_ADD_CXX_FLAG(vc_flags -Wno-unused-parameter)
ROOT_ADD_CXX_FLAG(vc_flags -Wno-missing-braces)
ROOT_ADD_CXX_FLAG(vc_flags -Wno-conditional-uninitialized)
set_source_files_properties(testVc.cxx PROPERTIES COMPILE_FLAGS "${vc_flags}")
ROOT_EXECUTABLE(testVc testVc.cxx LIBRARIES ${Vc_LIBRARIES})
ROOT_ADD_TEST(test-Vc COMMAND testVc FAILREGEX "FAILED|Error in")
if(builtin_vc)
add_dependencies(testVc VC)
endif()
endif()
#--g2root------------------------------------------------------------------------------------------
if(TARGET g2root)
ROOT_ADD_TEST(test-g2root COMMAND g2root)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment