Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vtk8 support #19518

Merged
merged 28 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8596eb7
Remove VTK 8 support from source code.
biagas Apr 5, 2024
f8535af
Remove VTK 8 version of volume plot.
biagas Apr 5, 2024
fe67d13
Move VolumeVTK9 to Volume
biagas Apr 5, 2024
42305ad
Rename VolumeVTK9 to Volume.
biagas Apr 5, 2024
255565a
Remove vtk8 support from build_visit.
biagas Apr 5, 2024
fe11c87
Remove support for ospray < 3.0 (tied to vtk8)
biagas Apr 5, 2024
2eb237e
Remove support for MSVC2017.
biagas Apr 5, 2024
2a06e5e
Remove VTK 8 support OpenFOAM reader, molecule plot.
biagas May 14, 2024
a44688b
Remove '--vtk9' usage.
biagas May 14, 2024
86bfae5
Re-add comment regarding cmake build doing the installation part as w…
biagas May 14, 2024
6adb52f
Fix typo
biagas May 14, 2024
cffb065
Remove embree, ispc, tbb from modules.xml
biagas May 14, 2024
c3814ad
Ensure vtk lib version appended when running against install.
biagas May 15, 2024
581f5ed
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 16, 2024
95158c9
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 16, 2024
247a693
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 17, 2024
5141988
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 20, 2024
e71ef7f
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 21, 2024
2f94610
Update SetUpThirdParty.cmake
biagas May 21, 2024
79caa87
Update UpdatingPlugins.rst
biagas May 21, 2024
45ede1b
Remove visit-config.h
biagas May 21, 2024
2834209
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 22, 2024
5bb5d0f
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 23, 2024
61b1333
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 23, 2024
b92fd33
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 23, 2024
48d584c
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 28, 2024
2aeb6d8
Change VTK version checks.
biagas May 28, 2024
de933e3
Merge branch 'develop' into task/biagas/remove_vtk8_support
biagas May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 36 additions & 180 deletions src/CMake/FindOSPRay.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,190 +26,46 @@ if(NOT EXISTS ${VISIT_OSPRAY_DIR})
return()
endif()

if(OSPRAY_VERSION VERSION_LESS_EQUAL "1.6.1")
IF(VISIT_OSPRAY)

# -- this is a hack for TBB_ROOT
IF(NOT DEFINED TBB_ROOT)
SET(TBB_ROOT ${VISIT_TBB_ROOT})
ENDIF()
SET(embree_DIR ${EMBREE_DIR})
MARK_AS_ADVANCED(ospray_DIR)
MARK_AS_ADVANCED(embree_DIR)

# setup ospray
# we have to search for the osprayConfig.cmake file in the ospray install
# folder. Because ospray sometimes install its library in <...>/lib64
# folder instead of the <...>/lib folder, we have to check both
# possibilities
FIND_PACKAGE(ospray REQUIRED
PATHS
${OSPRAY_DIR}/lib/cmake/ospray-${OSPRAY_VERSION}
${OSPRAY_DIR}/lib64/cmake/ospray-${OSPRAY_VERSION}
NO_DEFAULT_PATH)
ADD_DEFINITIONS(-DVISIT_OSPRAY)
# append additional module libraries
IF(NOT APPLE)
list(APPEND OSPRAY_LIBRARIES
${LIBRARY_PATH_PREFIX}ospray_module_ispc${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit_common${LIBRARY_SUFFIX})
ELSE()
list(APPEND OSPRAY_LIBRARIES
${LIBRARY_PATH_PREFIX}ospray.0${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_common.0${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_ispc${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_ispc.0${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit.0${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit_common${LIBRARY_SUFFIX}
${LIBRARY_PATH_PREFIX}ospray_module_visit_common.0${LIBRARY_SUFFIX})
ENDIF()

# ospray tries to dlopen the ispc libs at runtime
# so we need ot make sure those libs exist in
# ${VISIT_BINARY_DIR}/lib/
# so developer builds can load them

IF( NOT WIN32 )
FOREACH(ospray_lib ${OSPRAY_LIBRARIES})
IF( "${ospray_lib}" MATCHES "ispc")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
${ospray_lib}
${VISIT_BINARY_DIR}/lib/)
ENDIF()
ENDFOREACH()
ENDIF()


# install ospray libs follow visit's standard
#
# -- OSPRAY_LIBRARIES contains also libtbb and libembree, so we dont
# have to handle embree and tbb seperately. As for ISPC, since ISPC
# is only a compiler and will only be needed when we are compiling
# ospray source, we dont have to install ISPC at all here for VisIt.
#
# on linux ospray have libraries in a form of:
# libospray[xxx].so
# libospray[xxx].so.0
# libospray[xxx].so.[version]
#
# on mac ospray have libraries in a form of:
# libospray[xxx].dylib
# libospray[xxx].0.dylib
# libospray[xxx].[version].dylib
#
# on windows
# libospray[xxx].lib
# libospray[xxx].dll
#
# -- installing headers
IF(VISIT_INSTALL_THIRD_PARTY AND NOT VISIT_HEADERS_SKIP_INSTALL)
INSTALL(DIRECTORY ${OSPRAY_INCLUDE_DIR}/ospray
DESTINATION
DESTINATION ${VISIT_INSTALLED_VERSION_INCLUDE}
FILE_PERMISSIONS OWNER_WRITE OWNER_READ
GROUP_WRITE GROUP_READ
WORLD_READ
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE
GROUP_WRITE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
PATTERN ".svn" EXCLUDE)
ENDIF()
# -- installing libs
IF(NOT VISIT_OSPRAY_SKIP_INSTALL)
FOREACH(l ${OSPRAY_LIBRARIES})
# here because the CMake variable OSPRAY_LIBRARIES contains words
# like 'optimized' and 'debug', we should skip them
IF( (NOT "${l}" STREQUAL "optimized") AND
(NOT "${l}" STREQUAL "debug"))
GET_FILENAME_COMPONENT(_name_ ${l} NAME_WE)
IF(LINUX AND
(NOT "${_name_}" STREQUAL "libtbb_debug") AND
(NOT "${_name_}" STREQUAL "libtbbmalloc_debug") AND
(NOT "${_name_}" STREQUAL "libtbb") AND
(NOT "${_name_}" STREQUAL "libtbbmalloc") AND
(NOT "${_name_}" STREQUAL "libembree3") )
THIRD_PARTY_INSTALL_LIBRARY(${l}.0)
ENDIF()

if(LINUX AND ("${_name_}" MATCHES "embree" OR
"${_name_}" MATCHES "tbb"))
# embree and tbb are listed with their full extensions of
# .so.[version]. The simple .so is also needed in order for
# plugins to link correctly against an install. If the .so
# is a symlink to the full version (as with embree) the install
# library logic will correctly install both the full verison and
# the .so symlink, so only the .so is needed to be sent to the
# function.
cmake_path(SET _tmp_path ${l})
cmake_path(GET _tmp_path PARENT_PATH _par_path)
cmake_path(GET _tmp_path FILENAME _tmp_name)
cmake_path(GET _tmp_name EXTENSION LAST_ONLY _tmp_ext)
string(REPLACE "${_tmp_ext}" "" _tmp_name ${_tmp_name})
THIRD_PARTY_INSTALL_LIBRARY(${_par_path}/${_tmp_name})
# tbb's .so isn't a symlink, so install full version too
if("${_name_}" MATCHES "tbb")
THIRD_PARTY_INSTALL_LIBRARY(${l})
endif()
else()
THIRD_PARTY_INSTALL_LIBRARY(${l})
endif()
ENDIF()
ENDFOREACH()
ENDIF()

# debug
MESSAGE(STATUS "OSPRAY_INCLUDE_DIR: " ${OSPRAY_INCLUDE_DIR})
MESSAGE(STATUS "OSPRAY_LIBRARIES: " ${OSPRAY_LIBRARIES})
MESSAGE(STATUS "OSPRay for VisIt: ON")

ELSE(VISIT_OSPRAY)
MESSAGE(STATUS "OSPRay for VisIt: OFF")
ENDIF(VISIT_OSPRAY)

if(EXISTS ${VISIT_OSPRAY_DIR}/lib64)
set(LIB lib64)
else()
set(LIB lib)
endif()

if(EXISTS ${VISIT_OSPRAY_DIR}/lib64)
set(LIB lib64)
else()
set(LIB lib)
endif()
set(ospray_DIR ${VISIT_OSPRAY_DIR}/${LIB}/cmake/ospray-${OSPRAY_VERSION})
find_package(ospray ${OSPRAY_VERSION} REQUIRED
PATHS ${VISIT_OSPRAY_DIR}
PATH_SUFFIXES lib/cmake/opsray-${OSPRAY_VERSION}
lib64/cmake/ospray-${OSPRAY_VERSION}
NO_MODULE
NO_DEFAULT_PATH)

if(ospray_FOUND)
set(HAVE_LIBOSPRAY true)
add_definitions(-DHAVE_OSPRAY)
if(VISIT_INSTALL_THIRD_PARTY)
# since all the libs needed for VisIt at runtime aren't
# enumerated in the ospray targets from find_package,
# just install all of them
set(LIB_SEARCH_PATH ${VISIT_OSPRAY_DIR}/lib)
if(EXISTS ${VISIT_OSPRAY_DIR}/lib64)
set(LIB_SEARCH_PATH ${VISIT_OSPRAY_DIR}/lib64)
endif()
if(NOT ospray_lib_libs)
file(GLOB ospray_lib_libs
LIST_DIRECTORIES FALSE
${LIB_SEARCH_PATH}/*)
endif()
unset(LIB_SEARCH_PATH)
# install libraries
foreach(lib ${ospray_lib_libs})
THIRD_PARTY_INSTALL_LIBRARY(${lib})
endforeach()

if(NOT VISIT_HEADERS_SKIP_INSTALL)
THIRD_PARTY_INSTALL_INCLUDE(ospray ${OSPRAY_INCLUDE_DIR})
endif()
set(ospray_DIR ${VISIT_OSPRAY_DIR}/${LIB}/cmake/ospray-${OSPRAY_VERSION})
find_package(ospray ${OSPRAY_VERSION} REQUIRED
PATHS ${VISIT_OSPRAY_DIR}
PATH_SUFFIXES lib/cmake/opsray-${OSPRAY_VERSION}
lib64/cmake/ospray-${OSPRAY_VERSION}
NO_MODULE
NO_DEFAULT_PATH)

if(ospray_FOUND)
set(HAVE_LIBOSPRAY true)
add_definitions(-DHAVE_OSPRAY)
if(VISIT_INSTALL_THIRD_PARTY)
# since all the libs needed for VisIt at runtime aren't
# enumerated in the ospray targets from find_package,
# just install all of them
set(LIB_SEARCH_PATH ${VISIT_OSPRAY_DIR}/lib)
if(EXISTS ${VISIT_OSPRAY_DIR}/lib64)
set(LIB_SEARCH_PATH ${VISIT_OSPRAY_DIR}/lib64)
endif()
if(NOT ospray_lib_libs)
file(GLOB ospray_lib_libs
LIST_DIRECTORIES FALSE
${LIB_SEARCH_PATH}/*)
endif()
unset(LIB_SEARCH_PATH)
# install libraries
foreach(lib ${ospray_lib_libs})
THIRD_PARTY_INSTALL_LIBRARY(${lib})
endforeach()

if(NOT VISIT_HEADERS_SKIP_INSTALL)
THIRD_PARTY_INSTALL_INCLUDE(ospray ${OSPRAY_INCLUDE_DIR})
endif()
endif()

endif()

Loading
Loading