Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VTK-m
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
phcerdan
VTK-m
Commits
89ce1a34
Commit
89ce1a34
authored
Jan 11, 2018
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect the settings of VTKm_Vectorization when building VTK-m
parent
7c882473
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
12 deletions
+24
-12
CMake/VTKmCPUVectorization.cmake
CMake/VTKmCPUVectorization.cmake
+20
-9
CMake/VTKmCompilerFlags.cmake
CMake/VTKmCompilerFlags.cmake
+1
-1
CMake/VTKmWrappers.cmake
CMake/VTKmWrappers.cmake
+1
-0
CMakeLists.txt
CMakeLists.txt
+2
-2
No files found.
CMake/VTKmCPUVectorization.cmake
View file @
89ce1a34
...
...
@@ -74,7 +74,16 @@ if(TARGET vtkm_vectorization_flags)
endif
()
add_library
(
vtkm_vectorization_flags INTERFACE
)
target_link_libraries
(
vtkm_vectorization_flags INTERFACE vtkm_compiler_flags
)
if
(
NOT VTKm_INSTALL_ONLY_LIBRARIES
)
install
(
TARGETS vtkm_vectorization_flags EXPORT
${
VTKm_EXPORT_NAME
}
)
endif
()
# If we are using MSVC stop after the interface so that the interface is
# consistently defined even for compilers such as MSVC that we don't
# have vectorization flag support for yet.
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
)
return
()
endif
()
set
(
vec_levels none native
)
...
...
@@ -173,13 +182,15 @@ elseif(VTKm_Vectorization STREQUAL "avx512-knl")
get_property
(
flags GLOBAL PROPERTY VTKm_KNL_FLAGS
)
endif
()
#guard against adding the flags multiple times, which happens when multiple
#backends include this file
if
(
NOT VTKm_Vectorization_flags_added
)
set
(
VTKm_Vectorization_flags_added true
)
target_compile_options
(
vtkm_vectorization_flags INTERFACE
${
flags
}
)
endif
()
target_compile_options
(
vtkm_vectorization_flags
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:
${
flags
}
>
)
if
(
NOT VTKm_INSTALL_ONLY_LIBRARIES
)
install
(
TARGETS vtkm_vectorization_flags EXPORT
${
VTKm_EXPORT_NAME
}
)
if
(
TARGET vtkm::cuda AND flags AND NOT CMAKE_CUDA_HOST_COMPILER
)
# Also propagate down these optimizations when building host side code
# with cuda. To be safe we only do this when we know the C++ and CUDA
# host compiler are from the same vendor
target_compile_options
(
vtkm_vectorization_flags
INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=
"
${
flags
}
"
>
)
endif
()
CMake/VTKmCompilerFlags.cmake
View file @
89ce1a34
...
...
@@ -81,7 +81,7 @@ endif()
# When building libraries/tests that are part of the VTK-m repository
# inherit the properties from vtkm_developer_flags
target_link_libraries
(
vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_developer_flags>
)
INTERFACE $<BUILD_INTERFACE:vtkm_developer_flags
vtkm_vectorization_flags
>
)
#-----------------------------------------------------------------------------
...
...
CMake/VTKmWrappers.cmake
View file @
89ce1a34
...
...
@@ -21,6 +21,7 @@
include
(
CMakeParseArguments
)
include
(
VTKmDeviceAdapters
)
include
(
VTKmCPUVectorization
)
#-----------------------------------------------------------------------------
# Utility to build a kit name from the current directory.
...
...
CMakeLists.txt
View file @
89ce1a34
...
...
@@ -127,7 +127,6 @@ determine_version(${VTKm_SOURCE_DIR} ${GIT_EXECUTABLE} "VTKm")
# when building VTK-m.
include
(
VTKmCompilerFlags
)
include
(
VTKmWrappers
)
include
(
VTKmCPUVectorization
)
#-----------------------------------------------------------------------------
# When building VTK-m it self we want to explicitly disable compiler extensions
...
...
@@ -267,7 +266,8 @@ if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
install
(
FILES
${
VTKm_SOURCE_DIR
}
/CMake/VTKmWrappers.cmake
${
VTKm_SOURCE_DIR
}
/CMake/VTKmBackends.cmake
${
VTKm_SOURCE_DIR
}
/CMake/VTKmCPUVectorization.cmake
${
VTKm_SOURCE_DIR
}
/CMake/VTKmDeviceAdapters.cmake
${
VTKm_SOURCE_DIR
}
/CMake/VTKmRenderingContexts.cmake
${
VTKm_SOURCE_DIR
}
/CMake/VTKmExportHeaderTemplate.h.in
DESTINATION
${
VTKm_INSTALL_CMAKE_MODULE_DIR
}
...
...
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