VTKm gets incompletely installed by 'make install'
I have successfully built ParaView 5.8.0 and the master branch of ParaView (8ba01d39) on CentOS 7, enabled option PARAVIEW_INSTALL_DEVELOPMENT_FILES
, left option PARAVIEW_USE_VTKM
default enabled and ran a make install
. Moved the installation from the directory specified via CMAKE_INSTALL_PREFIX to an identical server where the build directory is not avaible.
When running cmake
on an arbitrarily simple VTK code that I intend to compile and link against this Paraview/VTK installation, cmake errors out with
CMake Error at /path/to/latest/paraview/lib64/cmake/paraview-5.8/vtk/vtkm/VTKmConfig.cmake:69 (message):
File or directory
/path/to/latest/paraview/lib64/cmake/paraview-5.8/vtk/vtkm/cmake
referenced by variable VTKm_CMAKE_MODULE_PATH does not exist !
Call Stack (most recent call first):
/path/to/latest/paraview/lib64/cmake/paraview-5.8/vtk/vtkm/VTKmConfig.cmake:111 (set_and_check)
/path/to/latest/paraview/lib64/cmake/paraview-5.8/vtk/vtk-config.cmake:115 (find_package)
CMakeLists.txt:5 (FIND_PACKAGE)
Reason behind is the logic in VTKmConfig.cmake
:
# This is true when the package is still in the build directory (not installed)
if(CMAKE_CURRENT_LIST_DIR STREQUAL "/tmp/2020-Feb-21-PV-build-osmesa/lib64/cmake/paraview-5.8/vtk/vtkm")
set(VTKm_PACKAGE_IN_BUILD TRUE)
endif()
if(VTKm_PACKAGE_IN_BUILD)
set_and_check(VTKm_CMAKE_MODULE_PATH "/tmp/2020-Feb-21-PV-src/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake")
else()
set_and_check(VTKm_CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/lib64/cmake/paraview-5.8/vtk/vtkm/cmake")
endif()
# Load the library exports, but only if not compiling VTK-m itself
set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/lib64/cmake/paraview-5.8/vtk/vtkm")
set(VTKM_FROM_INSTALL_DIR FALSE)
if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "/tmp/2020-Feb-21-PV-build-osmesa/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m")
set(VTKM_FROM_INSTALL_DIR TRUE)
include(${VTKm_CONFIG_DIR}/VTKmTargets.cmake)
endif()
Given that the build directory /tmp/2020-Feb-21-PV-build-osmesa
does not exist on the machine where I try to compile my sample VTK project, it tries to use ${PACKAGE_PREFIX_DIR}/lib64/cmake/paraview-5.8/vtk/vtkm/cmake
, but - as it seems - this directory did not get created by the make install
step.