2021-08-31 01:03:01 +08:00
|
|
|
diff --git a/Accelerators/Vtkm/Core/CMakeLists.txt b/Accelerators/Vtkm/Core/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
index 397dca9f6..bc9c62ac5 100644
|
2021-08-31 01:03:01 +08:00
|
|
|
--- a/Accelerators/Vtkm/Core/CMakeLists.txt
|
|
|
|
+++ b/Accelerators/Vtkm/Core/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -16,8 +16,7 @@
|
2021-08-31 01:03:01 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
set(VTKm_NO_DEPRECATED_VIRTUAL ON)
|
|
|
|
|
|
|
|
-list(INSERT CMAKE_MODULE_PATH 0
|
2021-08-31 01:03:01 +08:00
|
|
|
- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake")
|
|
|
|
+find_package(VTKm CONFIG REQUIRED)
|
|
|
|
|
|
|
|
set(private_headers
|
2023-01-20 09:55:56 +08:00
|
|
|
vtkmFilterPolicy.h
|
|
|
|
@@ -65,9 +64,6 @@ vtkm_add_target_information(${vtkm_accel_target}
|
|
|
|
EXTENDS_VTKM
|
2021-08-31 01:03:01 +08:00
|
|
|
MODIFY_CUDA_FLAGS
|
|
|
|
DEVICE_SOURCES ${sources})
|
|
|
|
-vtk_module_set_property(VTK::AcceleratorsVTKmCore
|
|
|
|
- PROPERTY JOB_POOL_COMPILE
|
|
|
|
- VALUE vtkm_pool)
|
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
if (TARGET vtkm::kokkos_hip)
|
|
|
|
list(TRANSFORM nowrap_classes APPEND ".cxx" OUTPUT_VARIABLE hip_impl)
|
2021-08-31 01:03:01 +08:00
|
|
|
diff --git a/Accelerators/Vtkm/DataModel/CMakeLists.txt b/Accelerators/Vtkm/DataModel/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
index 9d5dfe100..7fea257b7 100644
|
2021-08-31 01:03:01 +08:00
|
|
|
--- a/Accelerators/Vtkm/DataModel/CMakeLists.txt
|
|
|
|
+++ b/Accelerators/Vtkm/DataModel/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -16,8 +16,7 @@
|
2020-05-12 04:39:50 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
set(VTKm_NO_DEPRECATED_VIRTUAL ON)
|
|
|
|
|
|
|
|
-list(INSERT CMAKE_MODULE_PATH 0
|
2020-05-12 04:39:50 +08:00
|
|
|
- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake")
|
|
|
|
+find_package(VTKm CONFIG REQUIRED)
|
|
|
|
|
|
|
|
set(sources
|
|
|
|
vtkmlib/ArrayConvertersReal.cxx
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -72,10 +71,6 @@ vtkm_add_target_information(${vtkm_accel_target}
|
2020-05-12 04:39:50 +08:00
|
|
|
MODIFY_CUDA_FLAGS
|
|
|
|
DEVICE_SOURCES ${sources})
|
|
|
|
|
2021-08-31 01:03:01 +08:00
|
|
|
-vtk_module_set_property(VTK::AcceleratorsVTKmDataModel
|
2020-05-12 04:39:50 +08:00
|
|
|
- PROPERTY JOB_POOL_COMPILE
|
|
|
|
- VALUE vtkm_pool)
|
2023-01-20 09:55:56 +08:00
|
|
|
-
|
2021-08-31 01:03:01 +08:00
|
|
|
if (TARGET vtkm::cuda)
|
2023-01-20 09:55:56 +08:00
|
|
|
set(cuda_impl ${nowrap_classes} vtkmDataSet.cxx)
|
|
|
|
set_source_files_properties(${cuda_impl} PROPERTIES
|
2021-08-31 01:03:01 +08:00
|
|
|
diff --git a/Accelerators/Vtkm/Filters/CMakeLists.txt b/Accelerators/Vtkm/Filters/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
index 0f51c436d..567b49197 100644
|
2021-08-31 01:03:01 +08:00
|
|
|
--- a/Accelerators/Vtkm/Filters/CMakeLists.txt
|
|
|
|
+++ b/Accelerators/Vtkm/Filters/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -16,8 +16,7 @@
|
|
|
|
|
|
|
|
set(VTKm_NO_DEPRECATED_VIRTUAL ON)
|
2021-08-31 01:03:01 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
-list(INSERT CMAKE_MODULE_PATH 0
|
2021-08-31 01:03:01 +08:00
|
|
|
- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake")
|
2020-05-12 04:39:50 +08:00
|
|
|
+find_package(VTKm CONFIG REQUIRED)
|
2021-08-31 01:03:01 +08:00
|
|
|
|
2023-01-20 09:55:56 +08:00
|
|
|
set(classes
|
2021-08-31 01:03:01 +08:00
|
|
|
vtkmAverageToCells
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -118,9 +117,6 @@ vtkm_add_target_information(${vtkm_accel_target}
|
2021-08-31 01:03:01 +08:00
|
|
|
MODIFY_CUDA_FLAGS
|
|
|
|
DEVICE_SOURCES ${sources})
|
2020-05-12 04:39:50 +08:00
|
|
|
|
2021-08-31 01:03:01 +08:00
|
|
|
-vtk_module_set_property(VTK::AcceleratorsVTKmFilters
|
|
|
|
- PROPERTY JOB_POOL_COMPILE
|
|
|
|
- VALUE vtkm_pool)
|
|
|
|
vtk_module_link(VTK::AcceleratorsVTKmFilters
|
|
|
|
PRIVATE
|
|
|
|
vtkm_worklet
|
|
|
|
diff --git a/CMake/vtk-config.cmake.in b/CMake/vtk-config.cmake.in
|
2023-01-20 09:55:56 +08:00
|
|
|
index a8c40085a..764298f0e 100644
|
2021-08-31 01:03:01 +08:00
|
|
|
--- a/CMake/vtk-config.cmake.in
|
|
|
|
+++ b/CMake/vtk-config.cmake.in
|
2023-01-20 09:55:56 +08:00
|
|
|
@@ -126,9 +126,7 @@ set("${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS" "@vtk_all_components@")
|
2021-08-31 01:03:01 +08:00
|
|
|
unset("${CMAKE_FIND_PACKAGE_NAME}_FOUND")
|
|
|
|
set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm" "@vtk_has_vtkm@")
|
|
|
|
if (${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm)
|
|
|
|
- find_package(VTKm
|
|
|
|
- PATHS "${CMAKE_CURRENT_LIST_DIR}/vtkm"
|
|
|
|
- NO_DEFAULT_PATH)
|
|
|
|
+ find_package(VTKm CONFIG REQUIRED)
|
|
|
|
if (NOT VTKm_FOUND)
|
|
|
|
set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0)
|
|
|
|
endif ()
|
2020-05-12 04:39:50 +08:00
|
|
|
diff --git a/ThirdParty/vtkm/CMakeLists.txt b/ThirdParty/vtkm/CMakeLists.txt
|
2023-01-20 09:55:56 +08:00
|
|
|
index 8cfbf92b0..ad78cc8f5 100644
|
2020-05-12 04:39:50 +08:00
|
|
|
--- a/ThirdParty/vtkm/CMakeLists.txt
|
|
|
|
+++ b/ThirdParty/vtkm/CMakeLists.txt
|
2021-08-31 01:03:01 +08:00
|
|
|
@@ -1,6 +1,41 @@
|
2020-05-12 04:39:50 +08:00
|
|
|
-vtk_module_third_party_internal(
|
|
|
|
- LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt"
|
2023-01-20 09:55:56 +08:00
|
|
|
- VERSION "1.7.1"
|
2020-05-12 04:39:50 +08:00
|
|
|
- SUBDIRECTORY vtkvtkm
|
|
|
|
- STANDARD_INCLUDE_DIRS
|
|
|
|
- INTERFACE)
|
|
|
|
+#vtk_module_third_party_internal(
|
|
|
|
+# LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt"
|
|
|
|
+# VERSION "master"
|
|
|
|
+# SUBDIRECTORY vtkvtkm
|
|
|
|
+# STANDARD_INCLUDE_DIRS
|
|
|
|
+# INTERFACE)
|
|
|
|
+
|
|
|
|
+message(STATUS "VTK_MODULE_USE_EXTERNAL_VTK_vtkm: ${VTK_MODULE_USE_EXTERNAL_VTK_vtkm}")
|
|
|
|
+if(TRUE)
|
|
|
|
+ message(STATUS "Searching for external VTKm")
|
|
|
|
+ find_package(VTKm CONFIG REQUIRED)
|
|
|
|
+ if(TARGET vtkm_compiler_flags)
|
|
|
|
+ get_target_property(VTKm_INCLUDE_DIRS vtkm_compiler_flags INTERFACE_INCLUDE_DIRECTORIES)
|
|
|
|
+ message(STATUS "INCLUDE: ${VTKm_INCLUDE_DIRS}")
|
|
|
|
+ get_target_property(VTKm_DIY_INCLUDE_DIRS vtkm_diy INTERFACE_INCLUDE_DIRECTORIES)
|
|
|
|
+ get_target_property(VTKm_OPTION_INCLUDE_DIRS vtkm_optionparser INTERFACE_INCLUDE_DIRECTORIES)
|
|
|
|
+ if(MSVC)
|
|
|
|
+ set(VTKm_DEFINITIONS /bigobj)
|
|
|
|
+ endif()
|
|
|
|
+ else()
|
|
|
|
+ message(FATAL_ERROR "VTKM target missing")
|
|
|
|
+ endif()
|
|
|
|
+ if(VTKM_FOUND)
|
|
|
|
+ message(STATUS "Found VTKm")
|
|
|
|
+ endif()
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
+vtk_module_third_party(
|
|
|
|
+ INTERNAL
|
|
|
|
+ HEADER_ONLY
|
|
|
|
+ LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt"
|
|
|
|
+ VERSION "master"
|
|
|
|
+ SUBDIRECTORY vtkvtkm
|
|
|
|
+ STANDARD_INCLUDE_DIRS
|
|
|
|
+ INTERFACE
|
|
|
|
+ EXTERNAL
|
|
|
|
+ PACKAGE VTKm
|
|
|
|
+ TARGETS vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple
|
|
|
|
+ #LIBRARIES vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple
|
2021-08-31 01:03:01 +08:00
|
|
|
+ INCLUDE_DIRS VTKm_INCLUDE_DIRS VTKm_DIY_INCLUDE_DIRS VTKm_OPTION_INCLUDE_DIRS
|
|
|
|
+)
|
2020-05-12 04:39:50 +08:00
|
|
|
diff --git a/ThirdParty/vtkm/vtk.module b/ThirdParty/vtkm/vtk.module
|
|
|
|
index a8e4dad0f..c7bbbf0e8 100644
|
|
|
|
--- a/ThirdParty/vtkm/vtk.module
|
|
|
|
+++ b/ThirdParty/vtkm/vtk.module
|
|
|
|
@@ -3,5 +3,7 @@ NAME
|
|
|
|
PRIVATE_DEPENDS
|
|
|
|
# While not needed to satisfy symbols, this is necessary to guarantee that
|
|
|
|
# VTK_SMP_IMPLEMENTATION_TYPE is available when configuring vtk-m.
|
|
|
|
- VTK::CommonCore
|
|
|
|
+ # VTK::CommonCore
|
|
|
|
+LIBRARY_NAME
|
|
|
|
+ VTKm
|
|
|
|
THIRD_PARTY
|