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

update install rules for launchers.

Adding logic to update install rules when launchers are enabled.

* Remove obsolete `PARAVIEW_DEFAULT_SYSTEM_GL`. If mesa is enabled and
  launchers project is enabled, then that is same as setting
  PARAVIEW_DEFAULT_SYSTEM_GL to TRUE.
* If launchers are enabled, add logic to install mpi libraries under a
  `lib/mpi` prefix.
* If launchers are enabled, install the launcher executables along with
  the paraview executables and rename the executables so that the
  launchers act as the real executables and add "-real" suffix to the
  real executables.
parent 635598be
Pipeline #159609 passed with stage
......@@ -253,7 +253,6 @@ function (superbuild_add_packaging)
mesa_USE_SWR
mesa_SWR_ARCH
nvidiaindex_SOURCE_SELECTION
PARAVIEW_DEFAULT_SYSTEM_GL
PARAVIEW_PACKAGE_SUFFIX
PARAVIEW_CATALYST_EDITION
paraview_is_shared)
......@@ -381,4 +380,11 @@ if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/superbuild/CMakeLists.txt")
"and `git submodule update`?")
endif ()
# Warn about deprecated PARAVIEW_DEFAULT_SYSTEM_GL.
if (DEFINED PARAVIEW_DEFAULT_SYSTEM_GL)
message(WARNING "The 'PARAVIEW_DEFAULT_SYSTEM_GL' variable is deprecated. "
"Use the 'launchers' project instead.")
set(_superbuild_default_launchers "${PARAVIEW_DEFAULT_SYSTEM_GL}")
endif()
add_subdirectory(superbuild)
......@@ -35,7 +35,9 @@ endif()
# General rendering/graphics options
set(ENABLE_mesa OFF CACHE BOOL "")
set(PARAVIEW_DEFAULT_SYSTEM_GL OFF CACHE BOOL "")
# Don't build launchers for mesa or mpi
set(ENABLE_launchers OFF CACHE BOOL "")
# Some general options
set(BUILD_SHARED_LIBS ON CACHE BOOL "")
......
......@@ -17,6 +17,9 @@ set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
set(ENABLE_hdf5 ON CACHE BOOL "")
# disabling for now since I don't see mesa enabled
# and we're using system MPI.
# set(ENABLE_launchers ON CACHE BOOL "")
set(ENABLE_libxml2 ON CACHE BOOL "")
set(ENABLE_llvm ON CACHE BOOL "")
set(ENABLE_matplotlib ON CACHE BOOL "")
......@@ -63,8 +66,5 @@ endif()
set(mesa_SOURCE_SELECTION "v13.0.0-rc2" CACHE STRING "")
set(mesa_USE_SWR ON CACHE BOOL "")
# Package mesa/osmesa with the binaries
set(PARAVIEW_DEFAULT_SYSTEM_GL ON)
# Too many CPU cores on KNL. Limit build threads to 32
set(SUPERBUILD_PROJECT_PARALLELISM 32 CACHE STRING "")
......@@ -37,10 +37,6 @@ if (python_enabled)
pvbatch
pvpython)
endif ()
if (mesa_enabled)
list(APPEND paraview_executables
paraview-mesa)
endif ()
set(paraview_has_gui FALSE)
if (qt5_enabled)
......
......@@ -8,8 +8,6 @@ set_property(CACHE PARAVIEW_BUILD_EDITION
PROPERTY
STRINGS "CORE;RENDERING;CATALYST;CATALYST_RENDERING;CANONICAL")
option(PARAVIEW_DEFAULT_SYSTEM_GL "Default to using the system OpenGL" OFF)
set (paraview_extra_cmake_options)
if (PV_NIGHTLY_SUFFIX)
list(APPEND paraview_extra_cmake_options
......@@ -78,11 +76,6 @@ if (UNIX)
genericio cosmotools)
endif ()
set(paraview_mesa_libdir "<LIBDIR>")
if (PARAVIEW_DEFAULT_SYSTEM_GL AND mesa_enabled)
set(paraview_mesa_libdir "<LIBDIR>/mesa")
endif ()
if (WIN32)
list(APPEND paraviews_platform_dependencies
openvr)
......@@ -196,10 +189,6 @@ superbuild_add_project(paraview
-DVTK_SMP_IMPLEMENTATION_TYPE:STRING=${paraview_smp_backend}
-DVTK_USE_X:BOOL=${paraview_use_x}
# mesa flags
-DPARAVIEW_BUILD_MESA_LAUNCHER:BOOL=${mesa_enabled}
-DPARAVIEW_MESA_LIBDIR:STRING=${paraview_mesa_libdir}
# raytracing flags
-DPARAVIEW_ENABLE_RAYTRACING:BOOL=${paraview_use_raytracing}
-DVTKOSPRAY_ENABLE_DENOISER:BOOL=${openimagedenoise_enabled}
......
......@@ -14,19 +14,40 @@ if (fortran_enabled)
endif ()
set(exclude_regexes)
if (PARAVIEW_DEFAULT_SYSTEM_GL OR
if (launchers_enabled OR
(mesa_built_by_superbuild OR osmesa_built_by_superbuild))
list(APPEND exclude_regexes
".*/libglapi"
".*/libGL")
endif ()
if (launchers_enabled AND mpi_built_by_superbuild)
list(APPEND exclude_regexes
".*/libmpi"
".*/libmpicxx")
endif()
foreach (executable IN LISTS paraview_executables)
superbuild_unix_install_program("${superbuild_install_location}/bin/${executable}"
"lib"
SEARCH_DIRECTORIES "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})
if (launchers_enabled)
superbuild_unix_install_program("${superbuild_install_location}/bin/${executable}-launcher"
"lib"
SEARCH_DIRECTORIES "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})
# rename executables.
install(CODE "
set(_prefix \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin\")
file(RENAME \"\${_prefix}/${executable}\" \"\${_prefix}/${executable}-real\")
file(RENAME \"\${_prefix}/${executable}-launcher\" \"\${_prefix}/${executable}\")"
COMPONENT superbuild)
endif()
endforeach ()
if (EXISTS "${superbuild_install_location}/bin/paraview.conf")
......@@ -56,7 +77,7 @@ install(
if (mesa_libraries)
set(suffix)
if (PARAVIEW_DEFAULT_SYSTEM_GL)
if (launchers_enabled)
set(suffix "/mesa")
endif ()
......@@ -75,6 +96,26 @@ if (mesa_libraries)
endforeach ()
endif ()
if (launchers_enabled AND mpi_built_by_superbuild)
set(mpi_libraries
mpi
mpicxx)
set(suffix "/mpi")
foreach (mpi_library IN LISTS mpi_libraries)
file(GLOB lib_filenames
RELATIVE "${superbuild_install_location}/lib"
"${superbuild_install_location}/lib/lib${mpi_library}.so*")
foreach (lib_filename IN LISTS lib_filenames)
superbuild_unix_install_plugin("${lib_filename}"
"lib${suffix}"
"lib"
LOADER_PATHS "${library_paths}"
LOCATION "lib${suffix}")
endforeach ()
endforeach ()
endif()
if (nvidiaindex_enabled)
set(nvidiaindex_libraries
dice
......
......@@ -2,7 +2,6 @@ set(paraview_extract_dir "${CMAKE_CURRENT_BINARY_DIR}/paraview/test-extraction")
if (WIN32)
set(generator "ZIP")
set(paraview_exe "${paraview_extract_dir}/bin/paraview.exe")
set(paraview_mesa_exe "${paraview_extract_dir}/bin/paraview-mesa.exe")
set(pvpython_exe "${paraview_extract_dir}/bin/pvpython.exe")
set(pvserver_exe "${paraview_extract_dir}/bin/pvserver.exe")
set(pvbatch_exe "${paraview_extract_dir}/bin/pvbatch.exe")
......@@ -10,14 +9,12 @@ elseif (APPLE)
set(generator "DragNDrop")
include(paraview-appname)
set(paraview_exe "${paraview_extract_dir}/${paraview_appname}/Contents/MacOS/paraview")
set(paraview_mesa_exe "${paraview_extract_dir}/${paraview_appname}/Contents/bin/paraview-mesa")
set(pvpython_exe "${paraview_extract_dir}/${paraview_appname}/Contents/bin/pvpython")
set(pvserver_exe "${paraview_extract_dir}/${paraview_appname}/Contents/bin/pvserver")
set(pvbatch_exe "${paraview_extract_dir}/${paraview_appname}/Contents/bin/pvbatch")
else ()
set(generator "TGZ")
set(paraview_exe "${paraview_extract_dir}/bin/paraview")
set(paraview_mesa_exe "${paraview_extract_dir}/bin/paraview-mesa")
set(pvpython_exe "${paraview_extract_dir}/bin/pvpython")
set(pvserver_exe "${paraview_extract_dir}/bin/pvserver")
set(pvbatch_exe "${paraview_extract_dir}/bin/pvbatch")
......@@ -48,10 +45,6 @@ if (NOT mpi_enabled)
set(pvbatch_exe)
endif ()
if (NOT mesa_enabled)
set(paraview_mesa_exe)
endif ()
function (paraview_add_test name exe)
if (NOT exe)
return ()
......@@ -163,25 +156,21 @@ paraview_add_test("version-client" "${paraview_exe}"
if (mesa_enabled AND python_enabled)
set(mesa_llvm_arg)
set(mesa_swr_arg)
if (PARAVIEW_DEFAULT_SYSTEM_GL)
set(mesa_llvm_arg --backend llvmpipe)
set(mesa_swr_arg --backend swr)
if (launchers_enabled)
set(mesa_llvm_arg --mesa --backend llvmpipe)
set(mesa_swr_arg --mesa --backend swr)
endif ()
paraview_add_test("mesa-llvm" "${paraview_mesa_exe}"
paraview_add_test("mesa-llvm" ${pvpython_exe}
${mesa_llvm_arg}
pvpython
--
"${CMAKE_CURRENT_LIST_DIR}/python/CheckOpenGLVersion.py"
"mesa" "llvmpipe")
if (mesa_USE_SWR)
# Either don't add or add but explicitly disable this test for now
# until the underlying VTK segfault is fixed.
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.9)
paraview_add_test("mesa-swr" "${paraview_mesa_exe}"
paraview_add_test("mesa-swr" "${pvpython_exe}"
${mesa_swr_arg}
pvpython
--
"${CMAKE_CURRENT_LIST_DIR}/python/CheckOpenGLVersion.py"
"mesa" "swr")
# Mesa exits with failure.
......
Markdown is supported
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