vtk-m/vtkm/internal/CMakeLists.txt
Robert Maynard 505e7aa1ec VTK-m now has defines for the CUDA version even when not using nvcc.
This is needed so so that the CUDA and C++ compiler generate the same code
when scanning a shared header but generating different translation units
2018-02-26 16:38:26 -05:00

79 lines
2.4 KiB
CMake
Executable File

##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
#-----------------------------------------------------------------------------
# Build the configure file.
# need to set numerous VTKm cmake properties to the naming convention
# that we expect for our C++ defines.
set(VTKM_NO_ASSERT ${VTKm_NO_ASSERT})
set(VTKM_USE_DOUBLE_PRECISION ${VTKm_USE_DOUBLE_PRECISION})
set(VTKM_USE_64BIT_IDS ${VTKm_USE_64BIT_IDS})
set(VTKM_ENABLE_CUDA ${VTKm_ENABLE_CUDA})
set(VTKM_ENABLE_TBB ${VTKm_ENABLE_TBB})
set(VTKM_ENABLE_MPI ${VTKm_ENABLE_MPI})
if(VTKM_ENABLE_CUDA)
set(VTKM_CUDA_VERSION_MAJOR ${CUDA_VERSION_MAJOR})
set(VTKM_CUDA_VERSION_MINOR ${CUDA_VERSION_MINOR})
endif()
vtkm_get_kit_name(kit_name kit_dir)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Configure.h.in
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Configure.h
@ONLY)
vtkm_install_headers(
vtkm/internal ${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Configure.h)
unset(VTKM_ENABLE_TBB)
unset(VTKM_ENABLE_CUDA)
unset(VTKM_USE_64BIT_IDS)
unset(VTKM_USE_DOUBLE_PRECISION)
set(headers
ArrayPortalUniformPointCoordinates.h
ArrayPortalValueReference.h
Assume.h
brigand.hpp
ConfigureFor32.h
ConfigureFor64.h
ConnectivityStructuredInternals.h
ExportMacros.h
FunctionInterface.h
FunctionInterfaceDetailPost.h
FunctionInterfaceDetailPre.h
IndexTag.h
Invocation.h
ListTagDetail.h
Unreachable.h
Windows.h
)
vtkm_declare_headers(${headers})
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPre.h)
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPost.h)
add_subdirectory(testing)