2019-04-15 23:24:21 +00:00
|
|
|
##============================================================================
|
2018-08-07 06:06:45 +00:00
|
|
|
## 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.
|
2019-04-15 23:24:21 +00:00
|
|
|
##============================================================================
|
2020-04-10 16:04:04 +00:00
|
|
|
cmake_minimum_required(VERSION 3.12...3.15 FATAL_ERROR)
|
2018-08-07 06:06:45 +00:00
|
|
|
|
|
|
|
#Find the VTK-m package
|
|
|
|
find_package(VTKm REQUIRED QUIET)
|
|
|
|
|
2021-02-15 19:38:21 +00:00
|
|
|
if ((TARGET vtkm::cuda) OR (TARGET vtkm::kokkos_cuda))
|
|
|
|
# CUDA architecture has a limited amount of memory available for constants. The CUDA
|
|
|
|
# compiler uses this space to hold constants for some optimizations. However, for large
|
|
|
|
# kernels, the number of constants needed might be larger than the constant space
|
|
|
|
# available. For these conditions, you have to disable this form of optimization with
|
|
|
|
# the -Xptxas --disable-optimizer-constants flags.
|
|
|
|
# TODO: Find a more elegant way to do this. Either figure out a way around this problem
|
|
|
|
# or add more general flags to vtkm_library/vtkm_unit_tests for sources with "large" kernels.
|
|
|
|
set_source_files_properties(lagrangian.cxx PROPERTIES
|
|
|
|
COMPILE_OPTIONS "-Xptxas;--disable-optimizer-constants"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-04-09 13:52:53 +00:00
|
|
|
add_executable(Lagrangian lagrangian.cxx ABCfield.h)
|
|
|
|
target_link_libraries(Lagrangian PRIVATE vtkm_filter)
|
2019-07-08 21:10:50 +00:00
|
|
|
vtkm_add_target_information(Lagrangian
|
2019-09-09 16:31:01 +00:00
|
|
|
DROP_UNUSED_SYMBOLS MODIFY_CUDA_FLAGS
|
2019-08-23 15:11:39 +00:00
|
|
|
DEVICE_SOURCES lagrangian.cxx)
|