mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Merge branch 'improve-cmake-module' into 'master'
Improve CMake module Some improvements to VTKmConfig.cmake and the device configuration scripts to better support CMake projects using VTK-m. See merge request !271
This commit is contained in:
commit
b5803a5f05
48
CMake/UseVTKmBase.cmake
Normal file
48
CMake/UseVTKmBase.cmake
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
##============================================================================
|
||||||
|
## Copyright (c) Kitware, Inc.
|
||||||
|
## All rights reserved.
|
||||||
|
## See LICENSE.txt for details.
|
||||||
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
||||||
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
## PURPOSE. See the above copyright notice for more information.
|
||||||
|
##
|
||||||
|
## Copyright 2015 Sandia Corporation.
|
||||||
|
## Copyright 2015 UT-Battelle, LLC.
|
||||||
|
## Copyright 2015 Los Alamos National Security.
|
||||||
|
##
|
||||||
|
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||||
|
## the U.S. Government retains certain rights in this software.
|
||||||
|
##
|
||||||
|
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||||
|
## Laboratory (LANL), the U.S. Government retains certain rights in
|
||||||
|
## this software.
|
||||||
|
##============================================================================
|
||||||
|
|
||||||
|
# This is the base configuration for using the VTK-m library. All other
|
||||||
|
# device configurations rely on this.
|
||||||
|
|
||||||
|
if (VTKm_Base_initialize_complete)
|
||||||
|
return()
|
||||||
|
endif (VTKm_Base_initialize_complete)
|
||||||
|
|
||||||
|
# Find the Boost library.
|
||||||
|
if(NOT Boost_FOUND)
|
||||||
|
find_package(BoostHeaders ${VTKm_REQUIRED_BOOST_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT Boost_FOUND)
|
||||||
|
message(STATUS "Boost not found")
|
||||||
|
set(VTKm_Base_FOUND)
|
||||||
|
else()
|
||||||
|
set(VTKm_Base_FOUND TRUE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Set up all these dependent packages (if they were all found).
|
||||||
|
if (VTKm_Base_FOUND)
|
||||||
|
set(VTKm_INCLUDE_DIRS
|
||||||
|
${VTKm_INCLUDE_DIRS}
|
||||||
|
${Boost_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(VTKm_Base_initialize_complete TRUE)
|
||||||
|
endif (VTKm_Base_FOUND)
|
78
CMake/UseVTKmCUDA.cmake
Normal file
78
CMake/UseVTKmCUDA.cmake
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
##============================================================================
|
||||||
|
## Copyright (c) Kitware, Inc.
|
||||||
|
## All rights reserved.
|
||||||
|
## See LICENSE.txt for details.
|
||||||
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
||||||
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
## PURPOSE. See the above copyright notice for more information.
|
||||||
|
##
|
||||||
|
## Copyright 2014 Sandia Corporation.
|
||||||
|
## Copyright 2014 UT-Battelle, LLC.
|
||||||
|
## Copyright 2014 Los Alamos National Security.
|
||||||
|
##
|
||||||
|
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||||
|
## the U.S. Government retains certain rights in this software.
|
||||||
|
##
|
||||||
|
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||||
|
## Laboratory (LANL), the U.S. Government retains certain rights in
|
||||||
|
## this software.
|
||||||
|
##============================================================================
|
||||||
|
|
||||||
|
if (VTKm_CUDA_initialize_complete)
|
||||||
|
return()
|
||||||
|
endif (VTKm_CUDA_initialize_complete)
|
||||||
|
|
||||||
|
vtkm_configure_device(Base)
|
||||||
|
|
||||||
|
if (VTKm_Base_FOUND)
|
||||||
|
|
||||||
|
set(VTKm_CUDA_FOUND ${VTKm_ENABLE_CUDA})
|
||||||
|
if (NOT VTKm_CUDA_FOUND)
|
||||||
|
message(STATUS "This build of VTK-m does not include CUDA.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Find CUDA library.
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if (VTKm_CUDA_FOUND)
|
||||||
|
find_package(CUDA)
|
||||||
|
mark_as_advanced(CUDA_BUILD_CUBIN
|
||||||
|
CUDA_BUILD_EMULATION
|
||||||
|
CUDA_HOST_COMPILER
|
||||||
|
CUDA_SDK_ROOT_DIR
|
||||||
|
CUDA_SEPARABLE_COMPILATION
|
||||||
|
CUDA_TOOLKIT_ROOT_DIR
|
||||||
|
CUDA_VERBOSE_BUILD
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NOT CUDA_FOUND)
|
||||||
|
message(STATUS "CUDA not found")
|
||||||
|
set(VTKm_CUDA_FOUND)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Find Thrust library.
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if (VTKm_CUDA_FOUND)
|
||||||
|
find_package(Thrust)
|
||||||
|
|
||||||
|
if (NOT THRUST_FOUND)
|
||||||
|
message(STATUS "Thrust not found")
|
||||||
|
set(VTKm_CUDA_FOUND)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
endif () # VTKm_Base_FOUND
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Set up all these dependent packages (if they were all found).
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
if (VTKm_CUDA_FOUND)
|
||||||
|
set(VTKm_INCLUDE_DIRS
|
||||||
|
${VTKm_INCLUDE_DIRS}
|
||||||
|
${THRUST_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(VTKm_CUDA_initialize_complete TRUE)
|
||||||
|
endif (VTKm_CUDA_FOUND)
|
@ -1,84 +0,0 @@
|
|||||||
##============================================================================
|
|
||||||
## Copyright (c) Kitware, Inc.
|
|
||||||
## All rights reserved.
|
|
||||||
## See LICENSE.txt for details.
|
|
||||||
## This software is distributed WITHOUT ANY WARRANTY; without even
|
|
||||||
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
## PURPOSE. See the above copyright notice for more information.
|
|
||||||
##
|
|
||||||
## Copyright 2014 Sandia Corporation.
|
|
||||||
## Copyright 2014 UT-Battelle, LLC.
|
|
||||||
## Copyright 2014 Los Alamos National Security.
|
|
||||||
##
|
|
||||||
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
||||||
## the U.S. Government retains certain rights in this software.
|
|
||||||
##
|
|
||||||
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
|
||||||
## Laboratory (LANL), the U.S. Government retains certain rights in
|
|
||||||
## this software.
|
|
||||||
##============================================================================
|
|
||||||
|
|
||||||
if (VTKm_Cuda_initialize_complete)
|
|
||||||
return()
|
|
||||||
endif (VTKm_Cuda_initialize_complete)
|
|
||||||
|
|
||||||
set(VTKm_Cuda_FOUND ${VTKm_ENABLE_CUDA})
|
|
||||||
if (NOT VTKm_Cuda_FOUND)
|
|
||||||
message(STATUS "This build of VTKm does not include Cuda.")
|
|
||||||
endif (NOT VTKm_Cuda_FOUND)
|
|
||||||
|
|
||||||
# Find the Boost library.
|
|
||||||
if (VTKm_Cuda_FOUND)
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
find_package(BoostHeaders ${VTKm_REQUIRED_BOOST_VERSION})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT Boost_FOUND)
|
|
||||||
message(STATUS "Boost not found")
|
|
||||||
set(VTKm_Cuda_FOUND)
|
|
||||||
endif (NOT Boost_FOUND)
|
|
||||||
endif (VTKm_Cuda_FOUND)
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Find CUDA library.
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
if (VTKm_Cuda_FOUND)
|
|
||||||
find_package(CUDA)
|
|
||||||
mark_as_advanced(CUDA_BUILD_CUBIN
|
|
||||||
CUDA_BUILD_EMULATION
|
|
||||||
CUDA_HOST_COMPILER
|
|
||||||
CUDA_SDK_ROOT_DIR
|
|
||||||
CUDA_SEPARABLE_COMPILATION
|
|
||||||
CUDA_TOOLKIT_ROOT_DIR
|
|
||||||
CUDA_VERBOSE_BUILD
|
|
||||||
)
|
|
||||||
|
|
||||||
if (NOT CUDA_FOUND)
|
|
||||||
message(STATUS "CUDA not found")
|
|
||||||
set(VTKm_Cuda_FOUND)
|
|
||||||
endif (NOT CUDA_FOUND)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Find Thrust library.
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
if (VTKm_Cuda_FOUND)
|
|
||||||
find_package(Thrust)
|
|
||||||
|
|
||||||
if (NOT THRUST_FOUND)
|
|
||||||
message(STATUS "Thrust not found")
|
|
||||||
set(VTKm_Cuda_FOUND)
|
|
||||||
endif (NOT THRUST_FOUND)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Set up all these dependent packages (if they were all found).
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
if (VTKm_Cuda_FOUND)
|
|
||||||
cuda_include_directories(
|
|
||||||
${Boost_INCLUDE_DIRS}
|
|
||||||
${THRUST_INCLUDE_DIRS}
|
|
||||||
${VTKm_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
set(VTKm_Cuda_initialize_complete TRUE)
|
|
||||||
endif (VTKm_Cuda_FOUND)
|
|
@ -22,26 +22,15 @@ if (VTKm_Serial_initialize_complete)
|
|||||||
return()
|
return()
|
||||||
endif (VTKm_Serial_initialize_complete)
|
endif (VTKm_Serial_initialize_complete)
|
||||||
|
|
||||||
# Find the Boost library.
|
vtkm_configure_device(Base)
|
||||||
if (NOT VTKm_Serial_FOUND)
|
|
||||||
if(NOT Boost_FOUND)
|
|
||||||
find_package(BoostHeaders ${VTKm_REQUIRED_BOOST_VERSION})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT Boost_FOUND)
|
if (VTKm_Base_FOUND)
|
||||||
message(STATUS "Boost not found")
|
# Serial only relies on base configuration
|
||||||
set(VTKm_Serial_FOUND FALSE)
|
set(VTKm_Serial_FOUND TRUE)
|
||||||
else(NOT Boost_FOUND)
|
else () # !VTKm_Base_FOUND
|
||||||
set(VTKm_Serial_FOUND TRUE)
|
set(VTKm_Serial_FOUND)
|
||||||
endif (NOT Boost_FOUND)
|
endif ()
|
||||||
endif (NOT VTKm_Serial_FOUND)
|
|
||||||
|
|
||||||
# Set up all these dependent packages (if they were all found).
|
|
||||||
if (VTKm_Serial_FOUND)
|
if (VTKm_Serial_FOUND)
|
||||||
include_directories(
|
|
||||||
${Boost_INCLUDE_DIRS}
|
|
||||||
${VTKm_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(VTKm_Serial_initialize_complete TRUE)
|
set(VTKm_Serial_initialize_complete TRUE)
|
||||||
endif (VTKm_Serial_FOUND)
|
endif ()
|
||||||
|
@ -22,36 +22,37 @@ if (VTKm_TBB_initialize_complete)
|
|||||||
return()
|
return()
|
||||||
endif (VTKm_TBB_initialize_complete)
|
endif (VTKm_TBB_initialize_complete)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
vtkm_configure_device(Base)
|
||||||
# Find TBB.
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
if (NOT VTKm_TBB_FOUND)
|
|
||||||
find_package(TBB REQUIRED)
|
|
||||||
set (VTKm_TBB_FOUND ${TBB_FOUND})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
if (VTKm_Base_FOUND)
|
||||||
# Find the Boost library.
|
|
||||||
#-----------------------------------------------------------------------------
|
set(VTKm_TBB_FOUND ${VTKm_ENABLE_TBB})
|
||||||
if (VTKm_TBB_FOUND)
|
if (NOT VTKm_TBB_FOUND)
|
||||||
if(NOT Boost_FOUND)
|
message(STATUS "This build of VTK-m does not include TBB.")
|
||||||
find_package(BoostHeaders ${VTKm_REQUIRED_BOOST_VERSION})
|
endif ()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Find TBB.
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if (VTKm_TBB_FOUND)
|
||||||
|
find_package(TBB)
|
||||||
|
if (NOT TBB_FOUND)
|
||||||
|
message(STATUS "TBB not found")
|
||||||
|
set(VTKm_TBB_FOUND)
|
||||||
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT Boost_FOUND)
|
endif ()
|
||||||
message(STATUS "Boost not found")
|
|
||||||
set(VTKm_TBB_FOUND FALSE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Set up all these dependent packages (if they were all found).
|
# Set up all these dependent packages (if they were all found).
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
if (VTKm_TBB_FOUND)
|
if (VTKm_TBB_FOUND)
|
||||||
include_directories(
|
set(VTKm_INCLUDE_DIRS
|
||||||
${Boost_INCLUDE_DIRS}
|
|
||||||
${VTKm_INCLUDE_DIRS}
|
${VTKm_INCLUDE_DIRS}
|
||||||
${TBB_INCLUDE_DIRS}
|
${TBB_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
set(VTKm_LIBRARIES ${TBB_LIBRARIES})
|
||||||
|
|
||||||
set(VTKm_TBB_initialize_complete TRUE)
|
set(VTKm_TBB_initialize_complete TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
## this software.
|
## this software.
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
|
||||||
|
# When this file is run by CMake (usually through the find_package command),
|
||||||
|
# The following variables will be defined:
|
||||||
|
#
|
||||||
|
# VTKm_INCLUDE_DIRS - Directories containing VTK-m and dependent headers
|
||||||
|
# VTKm_LIBRARIES - The libraries required when using VTK-m
|
||||||
|
|
||||||
# This file should be installed in the include directory.
|
# This file should be installed in the include directory.
|
||||||
# Find the root directory.
|
# Find the root directory.
|
||||||
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||||
@ -35,6 +41,27 @@ set(VTKm_REQUIRED_BOOST_VERSION "@VTKm_REQUIRED_BOOST_VERSION@")
|
|||||||
|
|
||||||
set(VTKm_CMAKE_MODULE_PATH "@VTKm_CMAKE_MODULE_PATH_CONFIG@")
|
set(VTKm_CMAKE_MODULE_PATH "@VTKm_CMAKE_MODULE_PATH_CONFIG@")
|
||||||
|
|
||||||
|
set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
|
||||||
|
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
|
||||||
|
|
||||||
# VTKm requires some CMake Find modules not included with CMake, so
|
# VTKm requires some CMake Find modules not included with CMake, so
|
||||||
# include the CMake modules distributed with VTKm.
|
# include the CMake modules distributed with VTKm.
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
include(VTKmMacros)
|
||||||
|
|
||||||
|
if(VTKm_FIND_REQUIRED)
|
||||||
|
set(vtkm_is_required REQUIRED)
|
||||||
|
else()
|
||||||
|
set(vtkm_is_required)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
vtkm_configure_device(Serial ${vtkm_is_required})
|
||||||
|
if(VTKm_ENABLE_CUDA)
|
||||||
|
vtkm_configure_device(CUDA)
|
||||||
|
endif()
|
||||||
|
if(VTKm_ENABLE_TBB)
|
||||||
|
# If configured with TBB, the VTK-m header files might choose TBB as the
|
||||||
|
# default device. In that case, the TBB device is required.
|
||||||
|
vtkm_configure_device(TBB ${vtkm_is_required})
|
||||||
|
endif()
|
||||||
|
@ -223,7 +223,7 @@ function(vtkm_unit_tests)
|
|||||||
)
|
)
|
||||||
|
|
||||||
#set up what we possibly need to link too.
|
#set up what we possibly need to link too.
|
||||||
list(APPEND VTKm_UT_LIBRARIES ${TBB_LIBRARIES})
|
list(APPEND VTKm_UT_LIBRARIES ${VTKm_LIBRARIES})
|
||||||
#set up storage for the include dirs
|
#set up storage for the include dirs
|
||||||
set(VTKm_UT_INCLUDE_DIRS )
|
set(VTKm_UT_INCLUDE_DIRS )
|
||||||
|
|
||||||
@ -374,9 +374,7 @@ function(vtkm_worklet_unit_tests device_adapter)
|
|||||||
set(CUDA_NVCC_FLAGS ${old_nvcc_flags} )
|
set(CUDA_NVCC_FLAGS ${old_nvcc_flags} )
|
||||||
else()
|
else()
|
||||||
add_executable(${test_prog} ${unit_test_drivers} ${unit_test_srcs})
|
add_executable(${test_prog} ${unit_test_drivers} ${unit_test_srcs})
|
||||||
if("${device_adapter}" STREQUAL "VTKM_DEVICE_ADAPTER_TBB")
|
target_link_libraries(${test_prog} ${VTKm_LIBRARIES})
|
||||||
target_link_libraries(${test_prog} ${TBB_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#add a test for each worklet test file. We will inject the device
|
#add a test for each worklet test file. We will inject the device
|
||||||
@ -421,7 +419,7 @@ function(vtkm_save_benchmarks)
|
|||||||
#create the benchmarks driver when we are called, since
|
#create the benchmarks driver when we are called, since
|
||||||
#the driver expects the files to be in the same
|
#the driver expects the files to be in the same
|
||||||
#directory as the test driver
|
#directory as the test driver
|
||||||
#TODO: This is probably ok to use for benchmarks as well
|
#TODO: This is probably ok to use for benchmarks as well
|
||||||
create_test_sourcelist(bench_sources BenchmarkDriver.cxx ${ARGN})
|
create_test_sourcelist(bench_sources BenchmarkDriver.cxx ${ARGN})
|
||||||
|
|
||||||
#store the absolute path for the driver and all the test
|
#store the absolute path for the driver and all the test
|
||||||
@ -501,9 +499,7 @@ function(vtkm_benchmarks device_adapter)
|
|||||||
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
|
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
|
||||||
else()
|
else()
|
||||||
add_executable(${benchmark_prog} ${benchmark_drivers} ${benchmark_srcs})
|
add_executable(${benchmark_prog} ${benchmark_drivers} ${benchmark_srcs})
|
||||||
if("${device_adapter}" STREQUAL "VTKM_DEVICE_ADAPTER_TBB")
|
target_link_libraries(${benchmark_prog} ${VTKm_LIBRARIES})
|
||||||
target_link_libraries(${benchmark_prog} ${TBB_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
@ -553,7 +549,11 @@ macro(vtkm_configure_device device)
|
|||||||
set(VTKm_ENABLE_${device_uppercase} ON)
|
set(VTKm_ENABLE_${device_uppercase} ON)
|
||||||
include("UseVTKm${device}")
|
include("UseVTKm${device}")
|
||||||
if(NOT VTKm_${device}_FOUND)
|
if(NOT VTKm_${device}_FOUND)
|
||||||
message(SEND_ERROR "Could not configure for using VTKm with ${device}")
|
if ("${ARGV1}" STREQUAL "REQUIRED")
|
||||||
endif(NOT VTKm_${device}_FOUND)
|
message(SEND_ERROR "Could not configure for using VTKm with ${device}")
|
||||||
|
else()
|
||||||
|
message(STATUS "Could not configure for using VTKm with ${device}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endmacro(vtkm_configure_device)
|
endmacro(vtkm_configure_device)
|
||||||
|
|
||||||
|
@ -112,12 +112,14 @@ endif()
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Set up devices selected.
|
# Set up devices selected.
|
||||||
vtkm_configure_device(Serial)
|
vtkm_configure_device(Serial)
|
||||||
if (VTKm_ENABLE_CUDA)
|
|
||||||
vtkm_configure_device(Cuda)
|
|
||||||
endif (VTKm_ENABLE_CUDA)
|
|
||||||
if (VTKm_ENABLE_TBB)
|
if (VTKm_ENABLE_TBB)
|
||||||
vtkm_configure_device(TBB)
|
vtkm_configure_device(TBB REQUIRED)
|
||||||
endif (VTKm_ENABLE_TBB)
|
endif (VTKm_ENABLE_TBB)
|
||||||
|
if (VTKm_ENABLE_CUDA)
|
||||||
|
vtkm_configure_device(CUDA REQUIRED)
|
||||||
|
cuda_include_directories(${VTKm_INCLUDE_DIRS})
|
||||||
|
endif (VTKm_ENABLE_CUDA)
|
||||||
|
include_directories(${VTKm_INCLUDE_DIRS})
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ endif()
|
|||||||
|
|
||||||
if(VTKm_ENABLE_TBB)
|
if(VTKm_ENABLE_TBB)
|
||||||
add_executable(Clipping_TBB Clipping.cxx)
|
add_executable(Clipping_TBB Clipping.cxx)
|
||||||
target_include_directories(Clipping_TBB PRIVATE ${TBB_INCLUDE_DIRS})
|
target_include_directories(Clipping_TBB PRIVATE ${VTKm_INCLUDE_DIRS})
|
||||||
target_link_libraries(Clipping_TBB ${TBB_LIBRARIES})
|
target_link_libraries(Clipping_TBB ${VTKm_LIBRARIES})
|
||||||
set_property(
|
set_property(
|
||||||
TARGET Clipping_TBB
|
TARGET Clipping_TBB
|
||||||
APPEND
|
APPEND
|
||||||
|
@ -24,18 +24,18 @@ if(OPENGL_FOUND AND GLUT_FOUND)
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
add_executable(HelloWorld_SERIAL HelloWorld.cxx)
|
add_executable(HelloWorld_SERIAL HelloWorld.cxx)
|
||||||
target_include_directories(HelloWorld_SERIAL PRIVATE ${OPENGL_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
|
target_include_directories(HelloWorld_SERIAL PRIVATE ${OPENGL_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
|
||||||
target_link_libraries(HelloWorld_SERIAL ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(HelloWorld_SERIAL ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
if(VTKm_Cuda_FOUND)
|
if(VTKm_Cuda_FOUND)
|
||||||
vtkm_disable_troublesome_thrust_warnings()
|
vtkm_disable_troublesome_thrust_warnings()
|
||||||
cuda_add_executable(HelloWorld_CUDA HelloWorld.cu)
|
cuda_add_executable(HelloWorld_CUDA HelloWorld.cu)
|
||||||
target_link_libraries(HelloWorld_CUDA ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(HelloWorld_CUDA ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VTKm_TBB_FOUND)
|
if(VTKm_TBB_FOUND)
|
||||||
add_executable(HelloWorld_TBB HelloWorld.cxx)
|
add_executable(HelloWorld_TBB HelloWorld.cxx)
|
||||||
target_include_directories(HelloWorld_TBB PRIVATE ${OPENGL_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
|
target_include_directories(HelloWorld_TBB PRIVATE ${OPENGL_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
|
||||||
target_link_libraries(HelloWorld_TBB ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(HelloWorld_TBB ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -23,18 +23,18 @@
|
|||||||
if(OPENGL_FOUND AND GLUT_FOUND)
|
if(OPENGL_FOUND AND GLUT_FOUND)
|
||||||
add_executable(IsosurfaceUniformGrid_SERIAL IsosurfaceUniformGrid.cxx)
|
add_executable(IsosurfaceUniformGrid_SERIAL IsosurfaceUniformGrid.cxx)
|
||||||
target_include_directories(IsosurfaceUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
target_include_directories(IsosurfaceUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(IsosurfaceUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(IsosurfaceUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
if(VTKm_Cuda_FOUND)
|
if(VTKm_Cuda_FOUND)
|
||||||
vtkm_disable_troublesome_thrust_warnings()
|
vtkm_disable_troublesome_thrust_warnings()
|
||||||
cuda_add_executable(IsosurfaceUniformGrid_CUDA IsosurfaceUniformGrid.cu)
|
cuda_add_executable(IsosurfaceUniformGrid_CUDA IsosurfaceUniformGrid.cu)
|
||||||
target_link_libraries(IsosurfaceUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(IsosurfaceUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VTKm_ENABLE_TBB)
|
if(VTKm_ENABLE_TBB)
|
||||||
add_executable(IsosurfaceUniformGrid_TBB IsosurfaceUniformGridTBB.cxx)
|
add_executable(IsosurfaceUniformGrid_TBB IsosurfaceUniformGridTBB.cxx)
|
||||||
target_include_directories(IsosurfaceUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS})
|
target_include_directories(IsosurfaceUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(IsosurfaceUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(IsosurfaceUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -27,5 +27,5 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VTKm_TBB_FOUND)
|
if(VTKm_TBB_FOUND)
|
||||||
target_link_libraries(MultiBackend ${TBB_LIBRARIES})
|
target_link_libraries(MultiBackend ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
@ -23,50 +23,50 @@
|
|||||||
if(OPENGL_FOUND AND GLUT_FOUND)
|
if(OPENGL_FOUND AND GLUT_FOUND)
|
||||||
add_executable(TetrahedralizeExplicitGrid_SERIAL TetrahedralizeExplicitGrid.cxx)
|
add_executable(TetrahedralizeExplicitGrid_SERIAL TetrahedralizeExplicitGrid.cxx)
|
||||||
target_include_directories(TetrahedralizeExplicitGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
target_include_directories(TetrahedralizeExplicitGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TetrahedralizeExplicitGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TetrahedralizeExplicitGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TriangulateExplicitGrid_SERIAL TriangulateExplicitGrid.cxx)
|
add_executable(TriangulateExplicitGrid_SERIAL TriangulateExplicitGrid.cxx)
|
||||||
target_include_directories(TriangulateExplicitGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
target_include_directories(TriangulateExplicitGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TriangulateExplicitGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TriangulateExplicitGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TetrahedralizeUniformGrid_SERIAL TetrahedralizeUniformGrid.cxx)
|
add_executable(TetrahedralizeUniformGrid_SERIAL TetrahedralizeUniformGrid.cxx)
|
||||||
target_include_directories(TetrahedralizeUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
target_include_directories(TetrahedralizeUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TetrahedralizeUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TetrahedralizeUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TriangulateUniformGrid_SERIAL TriangulateUniformGrid.cxx)
|
add_executable(TriangulateUniformGrid_SERIAL TriangulateUniformGrid.cxx)
|
||||||
target_include_directories(TriangulateUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
target_include_directories(TriangulateUniformGrid_SERIAL PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TriangulateUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TriangulateUniformGrid_SERIAL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
if(VTKm_Cuda_FOUND)
|
if(VTKm_Cuda_FOUND)
|
||||||
cuda_add_executable(TetrahedralizeExplicitGrid_CUDA TetrahedralizeExplicitGrid.cu)
|
cuda_add_executable(TetrahedralizeExplicitGrid_CUDA TetrahedralizeExplicitGrid.cu)
|
||||||
target_link_libraries(TetrahedralizeExplicitGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TetrahedralizeExplicitGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
cuda_add_executable(TriangulateExplicitGrid_CUDA TriangulateExplicitGrid.cu)
|
cuda_add_executable(TriangulateExplicitGrid_CUDA TriangulateExplicitGrid.cu)
|
||||||
target_link_libraries(TriangulateExplicitGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TriangulateExplicitGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
cuda_add_executable(TetrahedralizeUniformGrid_CUDA TetrahedralizeUniformGrid.cu)
|
cuda_add_executable(TetrahedralizeUniformGrid_CUDA TetrahedralizeUniformGrid.cu)
|
||||||
target_link_libraries(TetrahedralizeUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TetrahedralizeUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
cuda_add_executable(TriangulateUniformGrid_CUDA TriangulateUniformGrid.cu)
|
cuda_add_executable(TriangulateUniformGrid_CUDA TriangulateUniformGrid.cu)
|
||||||
target_link_libraries(TriangulateUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
target_link_libraries(TriangulateUniformGrid_CUDA ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VTKm_ENABLE_TBB)
|
if(VTKm_ENABLE_TBB)
|
||||||
add_executable(TetrahedralizeExplicitGrid_TBB TetrahedralizeExplicitGridTBB.cxx)
|
add_executable(TetrahedralizeExplicitGrid_TBB TetrahedralizeExplicitGridTBB.cxx)
|
||||||
target_include_directories(TetrahedralizeExplicitGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS})
|
target_include_directories(TetrahedralizeExplicitGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TetrahedralizeExplicitGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(TetrahedralizeExplicitGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TriangulateExplicitGrid_TBB TriangulateExplicitGridTBB.cxx)
|
add_executable(TriangulateExplicitGrid_TBB TriangulateExplicitGridTBB.cxx)
|
||||||
target_include_directories(TriangulateExplicitGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS})
|
target_include_directories(TriangulateExplicitGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TriangulateExplicitGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(TriangulateExplicitGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TetrahedralizeUniformGrid_TBB TetrahedralizeUniformGridTBB.cxx)
|
add_executable(TetrahedralizeUniformGrid_TBB TetrahedralizeUniformGridTBB.cxx)
|
||||||
target_include_directories(TetrahedralizeUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS})
|
target_include_directories(TetrahedralizeUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TetrahedralizeUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(TetrahedralizeUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
|
|
||||||
add_executable(TriangulateUniformGrid_TBB TriangulateUniformGridTBB.cxx)
|
add_executable(TriangulateUniformGrid_TBB TriangulateUniformGridTBB.cxx)
|
||||||
target_include_directories(TriangulateUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS})
|
target_include_directories(TriangulateUniformGrid_TBB PRIVATE ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
target_link_libraries(TriangulateUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(TriangulateUniformGrid_TBB ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${VTKm_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user