2023-04-27 12:06:12 +08:00
|
|
|
diff --git a/CMake/VTKmDeviceAdapters.cmake b/CMake/VTKmDeviceAdapters.cmake
|
|
|
|
index e9ac039..c745604 100644
|
|
|
|
--- a/CMake/VTKmDeviceAdapters.cmake
|
|
|
|
+++ b/CMake/VTKmDeviceAdapters.cmake
|
|
|
|
@@ -59,20 +59,14 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
|
|
|
|
find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET)
|
|
|
|
|
2024-04-29 21:01:01 +08:00
|
|
|
add_library(vtkm_openmp INTERFACE)
|
|
|
|
set_target_properties(vtkm_openmp PROPERTIES EXPORT_NAME openmp)
|
|
|
|
+ target_link_libraries(vtkm_openmp INTERFACE OpenMP::OpenMP_CXX)
|
2023-04-27 12:06:12 +08:00
|
|
|
if(OpenMP_CXX_FLAGS)
|
2024-04-29 21:01:01 +08:00
|
|
|
- set_property(TARGET vtkm_openmp
|
2023-04-27 12:06:12 +08:00
|
|
|
- APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>)
|
|
|
|
-
|
|
|
|
if(VTKm_ENABLE_CUDA)
|
|
|
|
string(REPLACE ";" "," openmp_cuda_flags "-Xcompiler=${OpenMP_CXX_FLAGS}")
|
2024-04-29 21:01:01 +08:00
|
|
|
set_property(TARGET vtkm_openmp
|
2023-04-27 12:06:12 +08:00
|
|
|
APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:${openmp_cuda_flags}>)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
- if(OpenMP_CXX_LIBRARIES)
|
2024-04-29 21:01:01 +08:00
|
|
|
- set_target_properties(vtkm_openmp PROPERTIES
|
2023-04-27 12:06:12 +08:00
|
|
|
- INTERFACE_LINK_LIBRARIES "${OpenMP_CXX_LIBRARIES}")
|
|
|
|
- endif()
|
2024-04-29 21:01:01 +08:00
|
|
|
install(TARGETS vtkm_openmp EXPORT ${VTKm_EXPORT_NAME})
|
2023-04-27 12:06:12 +08:00
|
|
|
endif()
|