Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Todd Kordenbrock
VTK-m
Commits
0e4bcf75
Commit
0e4bcf75
authored
Jun 19, 2018
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VTK-m supports openmp and cuda devices in same translation unit
parent
0544ee6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
CMake/VTKmDeviceAdapters.cmake
CMake/VTKmDeviceAdapters.cmake
+9
-8
No files found.
CMake/VTKmDeviceAdapters.cmake
View file @
0e4bcf75
...
...
@@ -84,22 +84,23 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
endif
()
endif
()
if
(
VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp
)
find_package
(
OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET
)
if
(
CMAKE_VERSION VERSION_LESS 3.10
)
add_library
(
vtkm::openmp SHARED IMPORTED GLOBAL
)
else
()
add_library
(
vtkm::openmp UNKNOWN IMPORTED GLOBAL
)
endif
()
add_library
(
vtkm::openmp INTERFACE IMPORTED GLOBAL
)
if
(
OpenMP_CXX_FLAGS
)
set_target_properties
(
vtkm::openmp PROPERTIES
INTERFACE_COMPILE_OPTIONS
"$<$<COMPILE_LANGUAGE:CXX>:
${
OpenMP_CXX_FLAGS
}
>"
)
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:
${
OpenMP_CXX_FLAGS
}
>
)
if
(
VTKm_ENABLE_CUDA
)
string
(
REPLACE
";"
","
openmp_cuda_flags
"-Xcompiler=
${
OpenMP_CXX_FLAGS
}
"
)
set_target_properties
(
vtkm::openmp PROPERTIES
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:
${
openmp_cuda_flags
}
>
)
endif
()
endif
()
if
(
OpenMP_CXX_LIBRARIES
)
set_target_properties
(
vtkm::openmp PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
"CXX"
INTERFACE_LINK_LIBRARIES
"
${
OpenMP_CXX_LIBRARIES
}
"
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment