Commit 1955bbf8 authored by David DeMarle's avatar David DeMarle
Browse files

changes after testing on linux and mac dashboard machines

update version of and make ispc available on all platforms
changes to tbb install and findtbb within ospray to make sure
that ospray can find the version we have in our install scratch
space
parent 8175f90b
Pipeline #15737 passed with stage
......@@ -275,6 +275,7 @@ else()
include(cgns)
include(freetype)
include(hdf5)
include(ispc)
include(netcdf)
include(libxml2)
include(manta)
......@@ -314,7 +315,6 @@ else()
include(osmesa)
include(egl)
include(catalyst)
include(ispc)
endif()
# Build CosmoTools on Linux and OS X
......
set(_exe_extension "")
if(WIN32)
set(_exe_extension ".exe")
endif()
add_external_project(ispc
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy <SOURCE_DIR>/ispc <INSTALL_DIR>/bin/
${CMAKE_COMMAND} -E copy <SOURCE_DIR>/ispc${_exe_extension} <INSTALL_DIR>/bin/
)
......@@ -3,8 +3,9 @@ set_property(CACHE OSPRAY_BUILD_ISA PROPERTY STRINGS SSE AVX AVX2 ALL)
mark_as_advanced(OSPRAY_BUILD_ISA)
add_external_project(ospray
DEPENDS ispc
DEPENDS ispc tbb
CMAKE_ARGS
-DTBB_ROOT:PATH=<INSTALL_DIR>
-DOSPRAY_ISPC_DIRECTORY:PATH=<INSTALL_DIR>/bin
-DOSPRAY_BUILD_ISA:STRING=${OSPRAY_BUILD_ISA}
-DOSPRAY_APPS_MODELVIEWER:BOOL=OFF
......@@ -18,6 +19,22 @@ add_external_project(ospray
-DOSPRAY_MODULE_TACHYON:BOOL=OFF
)
if (WIN32)
add_external_project_step(patch_osprayFindTBB
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${SuperBuild_PROJECTS_DIR}/patches/ospray.FindTBB.cmake"
"<SOURCE_DIR>/cmake/FindTBB.cmake"
DEPENDEES update # do after update
)
add_external_project_step(patch_embreeFindTBB
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${SuperBuild_PROJECTS_DIR}/patches/ospray.FindTBB.cmake"
"<SOURCE_DIR>/ospray/embree-v2.7.1/common/cmake/FindTBB.cmake"
DEPENDEES patch_osprayFindTBB # do after ospray patch
DEPENDERS configure # do before configure
)
endif()
add_extra_cmake_args(
-DOSPRAY_BUILD_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/ospray/src/ospray-build
)
## ======================================================================== ##
## Copyright 2009-2016 Intel Corporation ##
## ##
## Licensed under the Apache License, Version 2.0 (the "License"); ##
## you may not use this file except in compliance with the License. ##
## You may obtain a copy of the License at ##
## ##
## http://www.apache.org/licenses/LICENSE-2.0 ##
## ##
## Unless required by applicable law or agreed to in writing, software ##
## distributed under the License is distributed on an "AS IS" BASIS, ##
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
## See the License for the specific language governing permissions and ##
## limitations under the License. ##
## ======================================================================== ##
SET(TBB_VERSION_REQUIRED "3.0")
IF (NOT TBB_ROOT)
SET(TBB_ROOT $ENV{TBB_ROOT})
ENDIF()
IF (NOT TBB_ROOT)
SET(TBB_ROOT $ENV{TBBROOT})
ENDIF()
# detect changed TBB_ROOT
IF (NOT TBB_ROOT STREQUAL TBB_ROOT_LAST)
UNSET(TBB_INCLUDE_DIR CACHE)
UNSET(TBB_LIBRARY CACHE)
UNSET(TBB_LIBRARY_DEBUG CACHE)
UNSET(TBB_LIBRARY_MALLOC CACHE)
UNSET(TBB_LIBRARY_MALLOC_DEBUG CACHE)
UNSET(TBB_INCLUDE_DIR_MIC CACHE)
UNSET(TBB_LIBRARY_MIC CACHE)
UNSET(TBB_LIBRARY_MALLOC_MIC CACHE)
ENDIF()
IF (WIN32)
# workaround for parentheses in variable name / CMP0053
SET(PROGRAMFILESx86 "PROGRAMFILES(x86)")
SET(PROGRAMFILES32 "$ENV{${PROGRAMFILESx86}}")
IF (NOT PROGRAMFILES32)
SET(PROGRAMFILES32 "$ENV{PROGRAMFILES}")
ENDIF()
IF (NOT PROGRAMFILES32)
SET(PROGRAMFILES32 "C:/Program Files (x86)")
ENDIF()
FIND_PATH(TBB_ROOT include/tbb/task_scheduler_init.h
DOC "Root of TBB installation"
HINTS ${TBB_ROOT}
PATHS
${PROJECT_SOURCE_DIR}/tbb
${PROJECT_SOURCE_DIR}/../tbb
"${PROGRAMFILES32}/IntelSWTools/compilers_and_libraries/windows/tbb"
"${PROGRAMFILES32}/Intel/Composer XE/tbb"
"${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb"
)
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(TBB_ARCH intel64)
ELSE()
SET(TBB_ARCH ia32)
ENDIF()
IF (MSVC10)
SET(TBB_VCVER vc10)
ELSEIF (MSVC11)
SET(TBB_VCVER vc11)
ELSEIF (MSVC12)
SET(TBB_VCVER vc12)
ELSE()
SET(TBB_VCVER vc14)
ENDIF()
SET(TBB_LIBDIR ${TBB_ROOT}/lib/)
SET(TBB_BINDIR ${TBB_ROOT}/bin/)
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY tbb
PATHS ${TBB_LIBDIR} ${TBB_LIBDIR}/${TBB_ARCH}/${TBB_VCVER}
NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_DEBUG tbb_debug
PATHS ${TBB_LIBDIR} ${TBB_LIBDIR}/${TBB_ARCH}/${TBB_VCVER}
NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc
PATHS ${TBB_LIBDIR} ${TBB_LIBDIR}/${TBB_ARCH}/${TBB_VCVER}
NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug
PATHS ${TBB_LIBDIR} ${TBB_LIBDIR}/${TBB_ARCH}/${TBB_VCVER}
NO_DEFAULT_PATH)
ELSE ()
FIND_PATH(TBB_ROOT include/tbb/task_scheduler_init.h
DOC "Root of TBB installation"
HINTS ${TBB_ROOT}
PATHS
${PROJECT_SOURCE_DIR}/tbb
/opt/intel/composerxe/tbb
/opt/intel/compilers_and_libraries/tbb
)
IF (APPLE)
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_DEBUG tbb_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
ELSE()
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY libtbb.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
FIND_LIBRARY(TBB_LIBRARY_DEBUG libtbb_debug.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
FIND_LIBRARY(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG libtbbmalloc_debug.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
ENDIF()
FIND_PATH(TBB_INCLUDE_DIR_MIC tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MIC libtbb.so.2 PATHS ${TBB_ROOT}/lib/mic NO_DEFAULT_PATH)
FIND_LIBRARY(TBB_LIBRARY_MALLOC_MIC libtbbmalloc.so.2 PATHS ${TBB_ROOT}/lib/mic NO_DEFAULT_PATH)
MARK_AS_ADVANCED(TBB_INCLUDE_DIR_MIC)
MARK_AS_ADVANCED(TBB_LIBRARY_MIC)
MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC_MIC)
ENDIF()
SET(TBB_ROOT_LAST ${TBB_ROOT} CACHE INTERNAL "Last value of TBB_ROOT to detect changes")
SET(TBB_ERROR_MESSAGE
"Threading Building Blocks (TBB) with minimum version ${TBB_VERSION_REQUIRED} not found.
OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
Alternatively, you can try to use OpenMP as tasking system by setting OSPRAY_TASKING_SYSTEM=OpenMP")
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB
${TBB_ERROR_MESSAGE}
TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_MALLOC
)
# check version
IF (TBB_INCLUDE_DIR)
FILE(READ ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h TBB_STDDEF_H)
STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
SET(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})
STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
SET(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")
IF (TBB_VERSION VERSION_LESS TBB_VERSION_REQUIRED)
MESSAGE(FATAL_ERROR ${TBB_ERROR_MESSAGE})
ENDIF()
SET(TBB_VERSION ${TBB_VERSION} CACHE STRING "TBB Version")
MARK_AS_ADVANCED(TBB_VERSION)
ENDIF()
IF (TBB_FOUND)
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
# NOTE(jda) - TBB found in CentOS 6/7 package manager does not have debug
# versions of the library...silently fall-back to using only the
# libraries which we actually found.
IF (NOT TBB_LIBRARY_DEBUG)
SET(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC})
ELSE ()
SET(TBB_LIBRARIES
optimized ${TBB_LIBRARY} optimized ${TBB_LIBRARY_MALLOC}
debug ${TBB_LIBRARY_DEBUG} debug ${TBB_LIBRARY_MALLOC_DEBUG}
)
ENDIF()
ENDIF()
IF (TBB_INCLUDE_DIR AND TBB_LIBRARY_MIC AND TBB_LIBRARY_MALLOC_MIC)
SET(TBB_FOUND_MIC TRUE)
SET(TBB_INCLUDE_DIRS_MIC ${TBB_INCLUDE_DIR_MIC})
SET(TBB_LIBRARIES_MIC ${TBB_LIBRARY_MIC} ${TBB_LIBRARY_MALLOC_MIC})
ENDIF()
MARK_AS_ADVANCED(TBB_INCLUDE_DIR)
MARK_AS_ADVANCED(TBB_LIBRARY)
MARK_AS_ADVANCED(TBB_LIBRARY_DEBUG)
MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC)
MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC_DEBUG)
##############################################################
# redistribute TBB
##############################################################
IF (WIN32)
SET(TBB_DLL_HINTS
${TBB_ROOT}/../redist/${TBB_ARCH}_win/tbb/${TBB_VCVER}
${TBB_ROOT}/../redist/${TBB_ARCH}/tbb/${TBB_VCVER}
${TBB_ROOT}/bin/
)
FIND_FILE(TBB_DLL tbb.dll HINTS ${TBB_DLL_HINTS})
FIND_FILE(TBB_DLL_MALLOC tbbmalloc.dll PATHS HINTS ${TBB_DLL_HINTS})
MARK_AS_ADVANCED(TBB_DLL)
MARK_AS_ADVANCED(TBB_DLL_MALLOC)
INSTALL(PROGRAMS ${TBB_DLL} ${TBB_DLL_MALLOC} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT apps) # 3rd party?
ELSEIF (OSPRAY_ZIP_MODE)
INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib) # /intel64?
IF(OSPRAY_MIC AND TBB_FOUND_MIC)
INSTALL(PROGRAMS ${TBB_LIBRARIES_MIC} DESTINATION ${CMAKE_INSTALL_LIBDIR}/mic COMPONENT lib_mic)
ENDIF()
ENDIF()
......@@ -22,13 +22,17 @@ file(INSTALL
DESTINATION "${install_location}/lib"
FILES_MATCHING
PATTERN "${libprefix}tbb${libsuffix}"
PATTERN "${libprefix}tbbmalloc${libsuffix}")
PATTERN "${libprefix}tbb_debug${libsuffix}"
PATTERN "${libprefix}tbbmalloc${libsuffix}"
PATTERN "${libprefix}tbbmalloc_debug${libsuffix}")
if (WIN32)
# Install DLLs
string(REPLACE "lib" "bin" bindir "${libdir}")
file(INSTALL
"${source_location}/${bindir}/${libprefix}tbb${libsuffixshared}"
"${source_location}/${bindir}/${libprefix}tbb_debug${libsuffixshared}"
"${source_location}/${bindir}/${libprefix}tbbmalloc${libsuffixshared}"
"${source_location}/${bindir}/${libprefix}tbbmalloc_debug${libsuffixshared}"
DESTINATION "${install_location}/bin")
endif ()
......@@ -243,6 +243,7 @@ add_revision(adios
)
set(tbb_ver "44_20150728oss")
if (WIN32)
set(tbb_file "tbb${tbb_ver}_win.zip")
set(tbb_md5 "e7bbf293cdb5a50ca81347c80168956d")
......@@ -253,14 +254,28 @@ else ()
set(tbb_file "tbb${tbb_ver}_lin_0.tgz")
set(tbb_md5 "ab5df80a65adf423b14637a1f35814b2")
endif ()
add_revision(tbb
URL "http://www.paraview.org/files/dependencies/${tbb_file}"
URL_MD5 "${tbb_md5}")
set(ispc_file "")
set(ispc_md5 "")
if (WIN32)
set(ispc_file
"https://sourceforge.net/projects/ispcmirror/files/v1.9.0/ispc-v1.9.0-windows-vs2013.zip")
set(ispc_md5 "436101ac570b3d1e29f106e10d466c31")
elseif (APPLE)
set(ispc_file
"https://sourceforge.net/projects/ispcmirror/files/v1.9.0/ispc-v1.9.0-osx.tar.gz")
set(ispc_md5 "2e95991e9d29e8d512b906a27e7775c5")
else ()
set(ispc_file
"http://sourceforge.net/projects/ispcmirror/files/v1.9.0/ispc-v1.9.0-linux.tar.gz")
set(ispc_md5 "18e60e1b554fa08cace2a4e40102a908")
endif ()
add_revision(ispc
URL "http://sourceforge.net/projects/ispcmirror/files/v1.9.0/ispc-v1.9.0-linux.tar.gz"
#URL_MD5 "39dca86592deb207ce4dc1211eef9d33")
URL "${ispc_file}"
URL_MD5 "${ispc_md5")
)
add_revision(ospray
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment