Commit b3694f29 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Add support to build pvospray plugin.

parent 23b17097
......@@ -169,7 +169,8 @@ endif()
#-----------------------------------------------------------------------------
# Make sure install/lib directories exist by creating them
# Windows doesn't like it if that directory does not exist even if it is empty
file(MAKE_DIRECTORY "${install_location}/lib")
file(MAKE_DIRECTORY "${install_location}/lib"
"${install_location}/bin")
if (UNIX AND NOT APPLE)
......@@ -311,6 +312,9 @@ else()
include(mesa)
include(osmesa)
include(catalyst)
include(ispc)
include(ospray)
include(pvospray)
endif()
# Build CosmoTools on Linux and OS X
......
add_external_project(ispc
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy <SOURCE_DIR>/ispc <INSTALL_DIR>/bin/
)
add_external_project(ospray
DEPENDS ispc
CMAKE_ARGS
-DOSPRAY_ISPC_DIRECTORY:PATH=<INSTALL_DIR>/bin
)
# OSPRay's CMakeLists hard-codes the install path to /tmp/<user>/...
# This patch fixes that.
add_external_project_step(patch_fix_install
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/ospray.CMakeLists.txt
<SOURCE_DIR>/CMakeLists.txt
DEPENDEES update # do after update
DEPENDERS patch # do before patch
)
add_extra_cmake_args(
-DOSPRAY_DIR:PATH=${SuperBuild_BINARY_DIR}/ospray/src/ospray
-DOSPRAY_CMAKE_DIR:PATH=${SuperBuild_BINARY_DIR}/ospray/src/ospray/cmake/
-DOSPRAY_BUILD_DIR:PATH=${SuperBuild_BINARY_DIR}/ospray/src/ospray-build
-DLIB_OSPRAY:PATH=${SuperBuild_BINARY_DIR}/ospray/src/ospray-build/lib
-DLIB_OSPRAY_EMBREE:PATH=${SuperBuild_BINARY_DIR}/ospray/src/ospray-build
)
......@@ -61,7 +61,8 @@ endif ()
add_external_project(paraview
DEPENDS_OPTIONAL
adios boost cosmotools ffmpeg hdf5 libxml3 manta matplotlib mpi numpy png python qt4 qt5 visitbridge zlib silo cgns xdmf3
adios boost cosmotools ffmpeg hdf5 libxml3 manta matplotlib mpi numpy png
python qt4 qt5 visitbridge zlib silo cgns xdmf3 ospray
mesa osmesa nektarreader netcdf vrpn tbb
${PV_EXTERNAL_PROJECTS} ${plugins}
......
## ======================================================================== ##
## Copyright 2009-2015 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. ##
## ======================================================================== ##
PROJECT(OSPRay)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 NEW)
IF(${CMAKE_MAJOR_VERSION} EQUAL 3)
CMAKE_POLICY(SET CMP0042 NEW)
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 3)
ENDIF(COMMAND cmake_policy)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
SET(OSPRAY_VERSION 0.8.2)
SET(OSPRAY_SOVERSION 0)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel)
ENDIF(NOT CMAKE_BUILD_TYPE)
MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
SET(OSPRAY_BINARY_DIR ${PROJECT_BINARY_DIR})
SET(LIBRARY_OUTPUT_PATH ${OSPRAY_BINARY_DIR})
SET(EXECUTABLE_OUTPUT_PATH ${OSPRAY_BINARY_DIR})
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH)
MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH)
MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# add experimental KNL/AVX512 build option - not fully supported, yet, so keep it hidden
OPTION(OSPRAY_BUILD_ENABLE_KNL "Enable experimental 'Knights Landing' build?")
MARK_AS_ADVANCED(OSPRAY_BUILD_ENABLE_KNL)
# compiler selection for the non-MIC part
IF (APPLE)
SET(OSPRAY_COMPILER "CLANG" CACHE STRING "compiler to use (ICC,GCC, or CLANG)")
SET_PROPERTY(CACHE OSPRAY_COMPILER PROPERTY STRINGS ICC GCC CLANG)
ELSE(APPLE)
SET(OSPRAY_COMPILER "GCC" CACHE STRING "compiler to use (ICC or GCC)")
SET_PROPERTY(CACHE OSPRAY_COMPILER PROPERTY STRINGS ICC GCC)
ENDIF(APPLE)
# whether to build in MIC/xeon phi support
OPTION(OSPRAY_BUILD_MIC_SUPPORT "Build OSPRay with KNC/MIC Support?")
# whether to build in MPI support
OPTION(OSPRAY_BUILD_MPI_DEVICE "Add MPI Remote/Distributed rendering support?")
# the arch we're targeting for the non-MIC/non-xeon phi part of ospray
SET(OSPRAY_BUILD_ISA "ALL" CACHE STRING "Target ISA (SSE,AVX,AVX2,or ALL)")
IF (OSPRAY_BUILD_ENABLE_KNL)
SET_PROPERTY(CACHE OSPRAY_BUILD_ISA PROPERTY STRINGS ALL SSE AVX AVX2 AVX512)
OPTION(OSPRAY_ISPC_KNL_NATIVE "Enable ISPC's native KNL build")
ELSE()
SET_PROPERTY(CACHE OSPRAY_BUILD_ISA PROPERTY STRINGS ALL SSE AVX AVX2)
ENDIF()
# make ospray target and compiler uppercase - we need this in some other parts of the build system
STRING(TOUPPER ${OSPRAY_COMPILER} OSPRAY_COMPILER)
STRING(TOUPPER ${OSPRAY_BUILD_ISA} OSPRAY_BUILD_ISA)
SET(OSPRAY_MIC ${OSPRAY_BUILD_MIC_SUPPORT})
SET(OSPRAY_MPI ${OSPRAY_BUILD_MPI_DEVICE})
##############################################################
# cmake modules
##############################################################
INCLUDE(cmake/ospray.cmake)
INCLUDE(cmake/ispc.cmake)
INCLUDE(cmake/configure_embree.cmake)
INCLUDE(cmake/mpi.cmake)
INCLUDE(cmake/doxygen.cmake)
SET(OSPRAY_INSTALL_TARGET ospray-${OSPRAY_VERSION}-${CMAKE_SYSTEM_NAME})
STRING(TOLOWER "${OSPRAY_INSTALL_TARGET}" OSPRAY_INSTALL_TARGET_LC)
#SET(CMAKE_INSTALL_PREFIX
# /tmp/$ENV{USER}/OSPRAY-RELEASES/${OSPRAY_INSTALL_TARGET_LC})
##############################################################
# the ospray library
##############################################################
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
SET (OSPRAY_TARGET "intel64")
ADD_SUBDIRECTORY(ospray builddir/ospray/intel64)
IF (OSPRAY_MIC)
SET (OSPRAY_TARGET "mic")
ADD_SUBDIRECTORY(ospray builddir/ospray/mic)
ENDIF()
##############################################################
# ospray modules
##############################################################
SET (OSPRAY_TARGET "intel64")
ADD_SUBDIRECTORY(modules builddir/modules/intel64)
IF (OSPRAY_MIC)
SET (OSPRAY_TARGET "mic")
ADD_SUBDIRECTORY(modules builddir/modules/mic)
ENDIF()
##############################################################
# ospray sample apps at the end, they may need modules
##############################################################
#SET (OSPRAY_TARGET "intel64")
#ADD_SUBDIRECTORY(apps builddir/apps/intel64)
#IF (OSPRAY_MIC)
# SET (OSPRAY_TARGET "mic")
# ADD_SUBDIRECTORY(apps builddir/apps/mic)
#ENDIF()
add_external_pv_plugin(pvospray
PLUGIN_NAME pvOSPRay
DEPENDS paraview ospray
)
## Patch to update pvospray to depend on correct rendering backend.
#add_external_project_step(patch_fix_install
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
# ${SuperBuild_PROJECTS_DIR}/patches/pvospray.vtk.module.cmake
# <SOURCE_DIR>/VTK/module.cmake
# DEPENDEES update # do after update
# DEPENDERS patch # do before patch
# )
......@@ -117,6 +117,12 @@ if(python_ENABLED)
COMPONENT superbuild)
endif()
if (ospray_ENABLED)
install(DIRECTORY "${install_location}/lib/"
DESTINATION "lib/paraview-${pv_version}"
FILES_MATCHING PATTERN "libospray*")
endif()
add_test(NAME GenerateParaViewPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ -V
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
......
......@@ -257,3 +257,18 @@ endif ()
add_revision(tbb
URL "http://www.paraview.org/files/dependencies/${tbb_file}"
URL_MD5 "${tbb_md5}")
add_revision(ispc
URL "http://sourceforge.net/projects/ispcmirror/files/v1.8.2/ispc-v1.8.2-linux.tar.gz"
URL_MD5 "39dca86592deb207ce4dc1211eef9d33")
add_revision(ospray
GIT_REPOSITORY "https://github.com/ospray/OSPRay.git"
GIT_TAG "master")
add_revision(pvospray
GIT_REPOSITORY https://github.com/tj-corona/pvOSPRay.git
GIT_TAG paraview-superbuild)
#add_revision(pvospray
# GIT_REPOSITORY "https://github.com/TACC/pvOSPRay.git"
#GIT_TAG "836c814758127e1fede695fc7f51b54c26f80b34")
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