Commit 97cdc3bc authored by Robert Maynard's avatar Robert Maynard

VTK-m used from VTK build directory is now valid

Previously all the CMake variables would not be created
parent 826a02ce
......@@ -17,7 +17,7 @@
#ensure we link against our dependencies
include(module.cmake)
vtk_module_dep_includes(vtkm)
vtk_module_dep_includes(vtkVTKm)
list(APPEND CMAKE_MODULE_PATH "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtk-m/CMake")
if(VTKm_ENABLE_TBB)
......@@ -231,7 +231,7 @@ else()
set_property(TARGET vtkAcceleratorsVTKm PROPERTY JOB_POOL_COMPILE vtkm_pool)
endif()
target_link_libraries(vtkAcceleratorsVTKm PRIVATE ${VTKm_LIBRARIES})
target_link_libraries(vtkAcceleratorsVTKm PRIVATE vtkm_cont ${VTKm_LIBRARIES})
target_include_directories(vtkAcceleratorsVTKm PRIVATE ${VTKm_INCLUDE_DIRS})
if (MSVC)
......
......@@ -7,7 +7,7 @@ vtk_module(vtkAcceleratorsVTKm
vtkFiltersGeneral
vtkFiltersGeometry
vtkImagingCore
vtkm
vtkVTKm
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
......
......@@ -82,8 +82,11 @@ endif()
# Setup VTK-m if it was enabled
set(VTK_HAS_VTKM @VTK_HAS_VTKM@)
if(VTK_HAS_VTKM AND __vtk_install_tree)
if(VTK_HAS_VTKM)
set(VTKM_CMAKE_DIR "${VTK_CMAKE_DIR}")
if(NOT __vtk_install_tree)
set(VTKM_CMAKE_DIR "@VTKm_BINARY_DIR@/@VTK_INSTALL_PACKAGE_DIR@/vtkm")
endif()
get_filename_component(VTKM_CMAKE_DIR "${VTKM_CMAKE_DIR}" PATH)
find_package(VTKm
PATHS "${CMAKE_CURRENT_LIST_DIR}"
......
......@@ -42,18 +42,16 @@ set(VTKm_INSTALL_CONFIG_DIR "${VTK_INSTALL_PACKAGE_DIR}/vtkm")
set(VTKm_CUSTOM_LIBRARY_SUFFIX "${lib_suffix}")
set(VTKm_NO_ASSERT "ON") #helps improve performance in debug mode
set(vtkm_LIBRARIES vtkm vtkm_cont)
# These need to be explicitly set as the wrapping code doesn't properly handle
# grabbing include directories from dependent interface libraries
set(vtkm_INCLUDE_DIRS
set(vtkVTKm
${CMAKE_CURRENT_BINARY_DIR}/vtk-m/include
${CMAKE_CURRENT_SOURCE_DIR}/vtk-m
)
add_library(vtkVTKm INTERFACE)
vtk_module_export_info()
add_subdirectory(vtk-m)
vtk_target_export(vtkm)
vtk_target_export(vtkm_cont)
set_target_properties(vtkm PROPERTIES INTERFACE_LINK_LIBRARIES vtkm_cont)
set_target_properties(vtkVTKm PROPERTIES INTERFACE_LINK_LIBRARIES vtkm_cont)
vtk_target_export(vtkVTKm)
vtk_module(vtkm EXCLUDE_FROM_WRAPPING)
vtk_module(vtkVTKm EXCLUDE_FROM_WRAPPING)
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