Commit e7b565db authored by Ben Boeckel's avatar Ben Boeckel
Browse files

catalyst: port

Also refactor bundling ParaView on unix to share code with catalyst.
parent f4691e94
Pipeline #23602 passed with stage
# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"ParaView Catalyst ${CATALYST_EDITION} for in-situ visualization")
set(CPACK_PACKAGE_NAME "ParaView-Catalyst-${CATALYST_EDITION}")
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
set(CPACK_PACKAGE_VERSION_MAJOR ${pv_version_major})
set(CPACK_PACKAGE_VERSION_MINOR ${pv_version_minor})
if (pv_version_suffix)
set(CPACK_PACKAGE_VERSION_PATCH ${pv_version_patch}-${pv_version_suffix})
else()
set(CPACK_PACKAGE_VERSION_PATCH ${pv_version_patch})
endif()
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${PACKAGE_SUFFIX}")
# set the license file.
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/../paraview.license.txt")
include(CPack)
set (pdf_pv_version "4.3")
# download an install manual pdf.
install(CODE "
# create the doc directory.
file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/doc\")
# download the manual pdf.
file(DOWNLOAD \"http://www.paraview.org/files/v${pdf_pv_version}/ParaViewCatalystUsersGuide_v2.pdf\"
\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/doc/ParaViewCatalystUsersGuide_v2.pdf\"
SHOW_PROGRESS)
")
install (DIRECTORY "${install_location}/include/paraview-${pv_version}"
DESTINATION include
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
install (DIRECTORY "${install_location}/lib/cmake/paraview-${pv_version}"
DESTINATION lib/cmake
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# install python
if (python_ENABLED AND NOT USE_SYSTEM_python)
install(DIRECTORY "${install_location}/lib/python2.7"
DESTINATION "lib/paraview-${pv_version}/lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# install pyconfig.h
install (DIRECTORY "${install_location}/include/python2.7"
DESTINATION "lib/paraview-${pv_version}/include"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild
PATTERN "pyconfig.h")
endif()
# install library dependencies for various executables.
# the dependencies are searched only under the <install_location> and hence
# system libraries are not packaged.
set (reference_executable pvserver)
if (CATALYST_PYTHON)
set (reference_executable pvbatch)
endif()
install(CODE
"execute_process(COMMAND
${CMAKE_COMMAND}
-Dexecutable:PATH=${install_location}/lib/paraview-${pv_version}/${reference_executable}
-Ddependencies_root:PATH=${install_location}
-Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib/paraview-${pv_version}
-Dpv_version:STRING=${pv_version}
-P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
COMPONENT superbuild)
# install executables
set (executables pvserver pvdataserver pvrenderserver paraview-config)
if (CATALYST_PYTHON)
set (executables ${executables} pvbatch pvpython)
endif()
foreach(executable IN LISTS executables)
install(PROGRAMS "${install_location}/bin/${executable}"
DESTINATION "bin"
COMPONENT superbuild)
endforeach()
if (mpi_ENABLED AND NOT USE_SYSTEM_mpi)
install(PROGRAMS "${install_location}/bin/mpiexec.hydra"
DESTINATION "lib/paraview-${pv_version}"
COMPONENT superbuild
RENAME "mpiexec")
foreach (hydra_exe hydra_nameserver hydra_persist hydra_pmi_proxy)
install(PROGRAMS "${install_location}/bin/${hydra_exe}"
DESTINATION "lib/paraview-${pv_version}"
COMPONENT superbuild)
endforeach()
endif()
add_test(NAME GenerateParaViewCatalystPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ -V
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewCatalystPackage PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
LABELS "PARAVIEW"
TIMEOUT 3600) # increase timeout to 60 mins.
include(paraview-version)
set(paraview_doc_dir "share/paraview-${paraview_version}/doc")
set(paraview_data_dir "share/paraview-${paraview_version}/data")
include(paraview.bundle.common)
# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"ParaView Catalyst ${PARAVIEW_CATALYST_EDITION} for in-situ visualization")
set(CPACK_PACKAGE_NAME "ParaView-Catalyst-${PARAVIEW_CATALYST_EDITION}")
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${PACKAGE_SUFFIX}")
install(
DIRECTORY "${superbuild_install_location}/include/paraview-${paraview_version}"
DESTINATION "include"
USE_SOURCE_PERMISSIONS
COMPONENT "catalyst")
install(
DIRECTORY "${superbuild_install_location}/lib/cmake/paraview-${paraview_version}"
DESTINATION "lib/cmake"
USE_SOURCE_PERMISSIONS
COMPONENT "catalyst")
list(APPEND paraview_executables
paraview-config)
set(paraview_component "catalyst")
include(paraview.bundle.unix)
set(CATALYST_EDITION "Essentials"
set(PARVIEW_CATALYST_EDITION "Essentials"
CACHE STRING "The catalyst edition to build")
set_property(CACHE CATALYST_EDITION
set_property(CACHE PARVIEW_CATALYST_EDITION
PROPERTY
STRINGS Essentials Extras Rendering-Base)
option(CATALYST_PYTHON "Enable Python support in catalyst" ON)
option(PARVIEW_CATALYST_PYTHON "Enable Python support in catalyst" ON)
set(catalyst_editions Base)
if (CATALYST_PYTHON)
if (PARAVIEW_CATALYST_PYTHON)
list(APPEND catalyst_editions
Enable-Python)
endif ()
if (CATALYST_EDITION STREQUAL Essentials)
if (PARAVIEW_CATALYST_EDITION STREQUAL Essentials)
list(APPEND catalyst_editions
Essentials)
elseif (CATALYST_EDITION STREQUAL Extras)
elseif (PARAVIEW_CATALYST_EDITION STREQUAL Extras)
list(APPEND catalyst_editions
Essentials
Extras)
elseif (CATALYST_EDITION STREQUAL Rendering-Base)
elseif (PARAVIEW_CATALYST_EDITION STREQUAL Rendering-Base)
list(APPEND catalyst_editions
Essentials
Extras
Rendering-Base)
if (CATALYST_PYTHON)
if (PARAVIEW_CATALYST_PYTHON)
list(APPEND catalyst_editions
Rendering-Base-Python)
endif ()
else ()
message(FATAL_ERROR "Unknown catalyst edition set: ${CATALYST_EDITION}")
elseif (catalyst_enabled)
message(FATAL_ERROR "Unknown catalyst edition set: ${PARAVIEW_CATALYST_EDITION}")
endif ()
set(catalyst_edition_args)
......@@ -45,7 +45,7 @@ set(catalyst_cmake_args
-DCMAKE_CXX_FLAGS:STRING=${project_cxx_flags}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${project_ld_flags})
add_external_project(catalyst
superbuild_add_project(catalyst
DEPENDS mpi python
CONFIGURE_COMMAND
${pv_python_executable} <SOURCE_DIR>/Catalyst/catalyze.py
......@@ -61,4 +61,4 @@ add_external_project(catalyst
${CMAKE_COMMAND}
--build <BINARY_DIR>
--target install
-- -j${PV_MAKE_NCPUS})
-- -j${SUPERBUILD_PROJECT_PARALLELISM})
......@@ -78,6 +78,7 @@ get_property(paraview_revision GLOBAL
PROPERTY paraview_revision)
superbuild_set_external_source(catalyst
${paraview_revision})
unset(paraview_revision)
add_revision(vrpn
GIT_REPOSITORY "https://github.com/vrpn/vrpn.git"
......
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