Commit 429ad970 authored by James Kress's avatar James Kress

Merge remote-tracking branch 'upstream/master'

parents 1cdd59cf 4aa479b0
......@@ -435,7 +435,7 @@ if(OPENGL_FOUND)
if(OPENGL_gl_LIBRARY MATCHES "/([^/]+)\\.framework$")
set(_gl_fw "${OPENGL_gl_LIBRARY}/${CMAKE_MATCH_1}")
if(EXISTS "${_gl_fw}.tbd")
string(APPEND _gl_fw ".tbd")
set(_gl_fw "${_gl_fw}.tbd")
endif()
set_target_properties(OpenGL::GL PROPERTIES
IMPORTED_LOCATION "${_gl_fw}")
......@@ -490,7 +490,7 @@ if(OPENGL_FOUND)
if(OPENGL_glu_LIBRARY MATCHES "/([^/]+)\\.framework$")
set(_glu_fw "${OPENGL_glu_LIBRARY}/${CMAKE_MATCH_1}")
if(EXISTS "${_glu_fw}.tbd")
string(APPEND _glu_fw ".tbd")
set(_glu_fw "${_glu_fw}.tbd")
endif()
set_target_properties(OpenGL::GLU PROPERTIES
IMPORTED_LOCATION "${_glu_fw}")
......
This diff is collapsed.
......@@ -190,7 +190,8 @@ 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
string(REGEX REPLACE ";" "," cuda_flags "${flags}")
target_compile_options(vtkm_vectorization_flags
INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="${flags}">
INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cuda_flags}>
)
endif()
......@@ -41,6 +41,7 @@ set(EXCEPTIONS
)
set(DIRECTORY_EXCEPTIONS
${VTKm_SOURCE_DIR}/vtkm/thirdparty/taotuple/vtkmtaotuple
${VTKm_SOURCE_DIR}/vtkm/thirdparty/diy/vtkmdiy
)
......
......@@ -44,9 +44,23 @@ endif()
#-----------------------------------------------------------------------------
# vtkm_compiler_flags is used by all the vtkm targets
# vtkm_compiler_flags is used by all the vtkm targets and consumers of VTK-m
# The flags on vtkm_compiler_flags are needed when using/building vtk-m
add_library(vtkm_compiler_flags INTERFACE)
# When building libraries/tests that are part of the VTK-m repository
# inherit the properties from vtkm_developer_flags and vtkm_vectorization_flags.
# The flags are intended only for VTK-m itself and are not needed by consumers.
# We will export vtkm_vectorization_flags in general so consumer can enable
# vectorization if they so desire
if (VTKm_ENABLE_DEVELOPER_FLAGS)
target_link_libraries(vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_developer_flags>)
endif()
target_link_libraries(vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_vectorization_flags>)
# setup that we need C++11 support
if(CMAKE_VERSION VERSION_LESS 3.8)
target_compile_features(vtkm_compiler_flags INTERFACE cxx_nullptr)
......@@ -56,14 +70,9 @@ endif()
# Enable large object support so we can have 2^32 addressable sections
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CMAKE_VERSION VERSION_LESS 3.11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/bigobj\"")
else()
target_compile_options(vtkm_compiler_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:/bigobj>>)
if(TARGET vtkm::cuda)
target_compile_options(vtkm_compiler_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="/bigobj">>)
endif()
target_compile_options(vtkm_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
if(TARGET vtkm::cuda)
target_compile_options(vtkm_compiler_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="/bigobj">)
endif()
endif()
......@@ -74,29 +83,22 @@ target_include_directories(vtkm_compiler_flags INTERFACE
$<INSTALL_INTERFACE:${VTKm_INSTALL_INCLUDE_DIR}>
)
# Additional warnings just for Clang 3.5+, and AppleClang 7+ we specify
# for all build types, since these failures to vectorize are not limited
# to developer builds
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4)
target_compile_options(vtkm_compiler_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>>)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.99)
target_compile_options(vtkm_compiler_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>>)
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 vtkm_vectorization_flags>)
#-----------------------------------------------------------------------------
# vtkm_developer_flags is used ONLY BY libraries that are built as part of this
# repository
add_library(vtkm_developer_flags INTERFACE)
target_link_libraries(vtkm_developer_flags INTERFACE vtkm_compiler_flags)
# Additional warnings just for Clang 3.5+, and AppleClang 7+
# about failures to vectorize.
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4)
target_compile_options(vtkm_developer_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>>)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.99)
target_compile_options(vtkm_developer_flags INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>>)
endif()
if(VTKM_COMPILER_IS_MSVC)
target_compile_definitions(vtkm_developer_flags INTERFACE "_SCL_SECURE_NO_WARNINGS"
"_CRT_SECURE_NO_WARNINGS")
......@@ -124,12 +126,23 @@ elseif(VTKM_COMPILER_IS_ICC)
elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
set(cxx_flags -Wall -Wno-long-long -Wcast-align -Wconversion -Wchar-subscripts -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -fno-common)
set(cuda_flags "-Xcudafe=\"--display_error_number\"")
target_compile_options(vtkm_compiler_flags
set(cuda_flags -Xcudafe=--display_error_number -Xcompiler=-Wall,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-local-typedefs,-Wno-unused-function,-Wno-long-long,-Wcast-align,-Wconversion,-Wchar-subscripts,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-Wunused-parameter,-fno-common)
#GCC 5, 6 don't properly handle strict-overflow suppression through pragma's.
#Instead of suppressing around the location of the strict-overflow you
#have to suppress around the entry point, or in vtk-m case the worklet
#invocation site. This is incredibly tedious and has been fixed in gcc 7
#
if(VTKM_COMPILER_IS_GNU AND
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.99) AND
(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.99) )
list(APPEND cxx_flags -Wno-strict-overflow)
endif()
target_compile_options(vtkm_developer_flags
INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags}>>
)
if(TARGET vtkm::cuda)
target_compile_options(vtkm_compiler_flags
target_compile_options(vtkm_developer_flags
INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CUDA>:${cuda_flags}>>
)
endif()
......
......@@ -19,17 +19,38 @@
##============================================================================
# When this file is run by CMake through the find_package command, the
# following variables will be defined:
# following targets will exist:
# vtkm_cont Target that contains most of VTK-m
#
# vtkm Target that should be used to link to VTK-m
# vtkm_rendering Target that contains all the rendering code
#
# vtkm_rendering Target that contains all the rendering code
# vtkm::tbb Target that contains tbb related link information
# implicitly linked to by `vtkm_cont` if tbb is enabled
#
# vtkm::tbb Target that contains tbb related link information
# implicitly linked to by `vtkm` if tbb is enabled
# vtkm::openmp Target that contains openmp related link information
# implicitly linked to by `vtkm_cont` if openmp is enabled
#
# vtkm::cuda Target that contains cuda related link information
# implicitly linked to by `vtkm_cont` if cuda is enabled
#
# The following local variables will also be defined:
#
# VTKm_VERSION Holds the version string of "Major.Minor"
# VTKm_VERSION_FULL Holds the version string of "Major.Minor.Patch.GitSha1"
# VTKm_VERSION_MAJOR Holds just the major version number
# VTKm_VERSION_MINOR Holds just the minor version number
# VTKm_VERSION_PATCH Holds just the patch version number
#
# VTKm_BUILD_SHARED_LIBS Will be enabled if VTK-m was built shared/dynamic
# VTKm_ENABLE_CUDA Will be enabled if VTK-m was built with CUDA support
# VTKm_ENABLE_TBB Will be enabled if VTK-m was built with TBB support
# VTKm_ENABLE_OPENMP Will be enabled if VTK-m was built with OpenMP support
# VTKm_ENABLE_MPI Will be enabled if VTK-m was built with MPI support
# VTKm_ENABLE_RENDERING Will be enabled if VTK-m was built with rendering support
# VTKm_ENABLE_GL_CONTEXT Will be enabled if VTK-m rendering was built with a GL context
# VTKm_ENABLE_OSMESA_CONTEXT Will be enabled if VTK-m rendering was built with a osmesa context
# VTKm_ENABLE_EGL_CONTEXT Will be enabled if VTK-m rendering was built with a EGL context
#
# vtkm::cuda Target that contains cuda related link information
# implicitly linked to by `vtkm` if cuda is enabled
#
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
......@@ -46,6 +67,7 @@ set(VTKm_VERSION "@VTKm_VERSION@")
set(VTKm_BUILD_SHARED_LIBS "@VTKm_BUILD_SHARED_LIBS@")
set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
set(VTKm_ENABLE_OPENMP "@VTKm_ENABLE_OPENMP@")
set(VTKm_ENABLE_RENDERING "@VTKm_ENABLE_RENDERING@")
set(VTKm_ENABLE_GL_CONTEXT "@VTKm_ENABLE_GL_CONTEXT@")
set(VTKm_ENABLE_OSMESA_CONTEXT "@VTKm_ENABLE_OSMESA_CONTEXT@")
......@@ -59,10 +81,8 @@ endif()
if(VTKm_PACKAGE_IN_BUILD)
set_and_check(VTKm_CMAKE_MODULE_PATH "@VTKm_SOURCE_DIR@/CMake")
set_and_check(VTKm_INCLUDE_DIRS ${VTKm_INCLUDE_DIRS} "@VTKm_SOURCE_DIR@")
else()
set_and_check(VTKm_CMAKE_MODULE_PATH "@PACKAGE_VTKm_INSTALL_CMAKE_MODULE_DIR@")
set_and_check(VTKm_INCLUDE_DIRS "@PACKAGE_VTKm_INSTALL_INCLUDE_DIR@")
endif()
# Load the library exports, but only if not compiling VTK-m itself
......@@ -77,7 +97,4 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
# This includes a host of functions used by VTK-m CMake.
include(VTKmWrappers)
if(VTKm_ENABLE_RENDERING)
include(VTKmRenderingContexts)
endif()
include(VTKmRenderingContexts)
......@@ -41,21 +41,27 @@ function(determine_version source_dir git_command var_prefix)
# information. Just return here to avoid the warning message at the end of
# this function.
return ()
elseif (NOT VTKm_GIT_DESCRIBE)
if(EXISTS ${git_command} AND EXISTS ${source_dir}/.git)
execute_process(
COMMAND ${git_command} describe
WORKING_DIRECTORY ${source_dir}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
elseif (NOT VTKm_GIT_DESCRIBE AND
EXISTS ${git_command} AND
EXISTS ${source_dir}/.git)
execute_process(
COMMAND ${git_command} describe
WORKING_DIRECTORY ${source_dir}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if (NOT result EQUAL 0)
# git describe failed (bad return code).
set(output "")
endif()
else()
set(result 0)
set(output ${VTKm_GIT_DESCRIBE})
else ()
# note, output may be set to empty if VTKm_GIT_DESCRIBE is not defined.
set(output "${VTKm_GIT_DESCRIBE}")
endif()
unset(tmp_VERSION)
extract_version_components("${output}" tmp)
if(DEFINED tmp_VERSION)
if (NOT "${tmp_VERSION}" STREQUAL "${${var_prefix}_VERSION}")
......@@ -74,14 +80,16 @@ endfunction()
# Extracts components from a version string. See determine_version() for usage.
function(extract_version_components version_string var_prefix)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)"
string(REGEX MATCH "^v?(([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*))$"
version_matches "${version_string}")
if(CMAKE_MATCH_0)
set(full ${CMAKE_MATCH_0})
set(major ${CMAKE_MATCH_1})
set(minor ${CMAKE_MATCH_2})
set(patch ${CMAKE_MATCH_3})
set(patch_extra ${CMAKE_MATCH_4})
# note, we don't use CMAKE_MATCH_0 for `full` since it may or may not have
# the `v` prefix.
set(full ${CMAKE_MATCH_1})
set(major ${CMAKE_MATCH_2})
set(minor ${CMAKE_MATCH_3})
set(patch ${CMAKE_MATCH_4})
set(patch_extra ${CMAKE_MATCH_5})
set(${var_prefix}_VERSION "${major}.${minor}" PARENT_SCOPE)
set(${var_prefix}_VERSION_MAJOR ${major} PARENT_SCOPE)
......
......@@ -21,7 +21,13 @@
if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
find_package(TBB REQUIRED)
add_library(vtkm::tbb UNKNOWN IMPORTED)
# Workaround a bug in older versions of cmake prevents linking with UNKOWN IMPORTED libraries
# refer to CMake issue #17245
if (CMAKE_VERSION VERSION_LESS 3.10)
add_library(vtkm::tbb SHARED IMPORTED GLOBAL)
else()
add_library(vtkm::tbb UNKNOWN IMPORTED GLOBAL)
endif()
set_target_properties(vtkm::tbb PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIRS}")
......@@ -41,6 +47,19 @@ 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)
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}>")
endif()
if(OpenMP_CXX_LIBRARIES)
set_target_properties(vtkm::openmp PROPERTIES
INTERFACE_LINK_LIBRARIES "${OpenMP_CXX_LIBRARIES}")
endif()
endif()
if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
......@@ -52,14 +71,18 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES "${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}")
endif()
add_library(vtkm::cuda UNKNOWN IMPORTED)
if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
set_target_properties(vtkm::cuda PROPERTIES
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>
)
# Workaround a bug in older versions of cmake prevents linking with UNKOWN IMPORTED libraries
# refer to CMake issue #17245
if (CMAKE_VERSION VERSION_LESS 3.10)
add_library(vtkm::cuda STATIC IMPORTED GLOBAL)
else()
add_library(vtkm::cuda UNKNOWN IMPORTED GLOBAL)
endif()
set_target_properties(vtkm::cuda PROPERTIES
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>
)
# We can't have this location/lib empty, so we provide a location that is
# valid and will have no effect on compilation
if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
......@@ -101,6 +124,8 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
# for all major virtual architectures, guaranteeing that the code will run
# anywhere.
#
# The option 'none' is provided so that when being built as part of another
# project, its own custom flags can be used.
#
# 1 - native
# - Uses system introspection to determine compile flags
......@@ -121,21 +146,19 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
# - Uses: --generate-code=arch=compute_50,code=sm_50
# - Uses: --generate-code=arch=compute_60,code=sm_60
# - Uses: --generate-code=arch=compute_70,code=sm_70
# 8 - none
#
#specify the property
set(VTKm_CUDA_Architecture "native" CACHE STRING "Which GPU Architecture(s) to compile for")
set_property(CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta all)
set_property(CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta all none)
#detect what the propery is set too
if(VTKm_CUDA_Architecture STREQUAL "native")
if(VTKM_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT)
#Use the cached value
# replace any semicolons with an empty space as CMAKE_CUDA_FLAGS is
# a string not a list and this could be cached from when it was a list
string(REPLACE ";" " " run_output "${VTKM_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT}")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${run_output}")
set(arch_flags ${VTKM_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT})
else()
#run execute_process to do auto_detection
......@@ -160,11 +183,7 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
string(FIND "${run_output}" "--generate-code" position)
string(SUBSTRING "${run_output}" ${position} -1 run_output)
# replace any semicolons with an empty space as CMAKE_CUDA_FLAGS is
# a string not a list
string(REPLACE ";" " " run_output "${run_output}")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${run_output}")
set(arch_flags ${run_output})
set(VTKM_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT ${run_output} CACHE INTERNAL
"device type(s) for cuda[native]")
else()
......@@ -176,22 +195,27 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
#since when we are native we can fail, and fall back to "kepler" these have
#to happen after, and separately of the native check
if(VTKm_CUDA_Architecture STREQUAL "fermi")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_20,code=sm_20")
set(arch_flags --generate-code=arch=compute_20,code=sm_20)
elseif(VTKm_CUDA_Architecture STREQUAL "kepler")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_30,code=sm_30")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_35,code=sm_35")
set(arch_flags --generate-code=arch=compute_30,code=sm_30
--generate-code=arch=compute_35,code=sm_35)
elseif(VTKm_CUDA_Architecture STREQUAL "maxwell")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_50,code=sm_50")
set(arch_flags --generate-code=arch=compute_50,code=sm_50)
elseif(VTKm_CUDA_Architecture STREQUAL "pascal")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_60,code=sm_60")
set(arch_flags --generate-code=arch=compute_60,code=sm_60)
elseif(VTKm_CUDA_Architecture STREQUAL "volta")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_70,code=sm_70")
set(arch_flags --generate-code=arch=compute_70,code=sm_70)
elseif(VTKm_CUDA_Architecture STREQUAL "all")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_30,code=sm_30")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_35,code=sm_35")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_50,code=sm_50")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_60,code=sm_60")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --generate-code=arch=compute_70,code=sm_70")
set(arch_flags --generate-code=arch=compute_30,code=sm_30
--generate-code=arch=compute_35,code=sm_35
--generate-code=arch=compute_50,code=sm_50
--generate-code=arch=compute_60,code=sm_60
--generate-code=arch=compute_70,code=sm_70)
endif()
string(REPLACE ";" " " arch_flags "${arch_flags}")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${arch_flags}")
set_target_properties(vtkm::cuda PROPERTIES VTKm_CUDA_Architecture_Flags "${arch_flags}")
endif()
......@@ -84,11 +84,6 @@ function(vtkm_find_gl)
endfunction()
#-----------------------------------------------------------------------------
if(TARGET vtkm_rendering_gl_context)
return()
endif()
add_library(vtkm_rendering_gl_context INTERFACE)