vtk-m/vtkm/cont/CMakeLists.txt

168 lines
4.3 KiB
CMake
Raw Normal View History

##============================================================================
## 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.
##============================================================================
set(headers
Algorithm.h
ArrayCopy.h
ArrayHandle.h
2015-09-01 21:42:45 +00:00
ArrayHandleCast.h
ArrayHandleCartesianProduct.h
ArrayHandleCompositeVector.h
2015-05-13 20:24:51 +00:00
ArrayHandleConstant.h
ArrayHandleCounting.h
ArrayHandleExtractComponent.h
ArrayHandleDiscard.h
ArrayHandleGroupVec.h
ArrayHandleGroupVecVariable.h
2015-02-13 06:24:43 +00:00
ArrayHandleImplicit.h
ArrayHandleIndex.h
ArrayHandlePermutation.h
ArrayHandleReverse.h
ArrayHandleStreaming.h
ArrayHandleSwizzle.h
2015-04-13 20:43:18 +00:00
ArrayHandleTransform.h
ArrayHandleUniformPointCoordinates.h
2017-12-12 15:15:20 +00:00
ArrayHandleVirtualCoordinates.h
ArrayHandleZip.h
ArrayPortal.h
ArrayPortalToIterators.h
ArrayHandleConcatenate.h
ArrayRangeCompute.h
ArrayRangeCompute.hxx
AssignerMultiBlock.h
CellLocatorTwoLevelUniformGrid.h
CellSet.h
CellSetExplicit.h
CellSetListTag.h
CellSetSingleType.h
CellSetStructured.h
CellSetPermutation.h
CoordinateSystem.h
DataSet.h
DataSetBuilderExplicit.h
DataSetBuilderRectilinear.h
DataSetBuilderUniform.h
DataSetFieldAdd.h
DecomposerMultiBlock.h
DeviceAdapter.h
DeviceAdapterAlgorithm.h
DeviceAdapterListTag.h
DynamicArrayHandle.h
DynamicCellSet.h
EnvironmentTracker.h
Error.h
ErrorBadAllocation.h
2017-12-22 15:01:09 +00:00
ErrorBadDevice.h
ErrorBadType.h
ErrorBadValue.h
ErrorExecution.h
ErrorInternal.h
Field.h
2017-10-23 13:38:33 +00:00
ImplicitFunctionHandle.h
2017-05-11 19:20:01 +00:00
MultiBlock.h
PointLocatorUniformGrid.h
2015-12-23 19:54:41 +00:00
RuntimeDeviceInformation.h
RuntimeDeviceTracker.h
Storage.h
StorageBasic.h
StorageImplicit.h
StorageListTag.h
Timer.h
TryExecute.h
2017-10-23 13:38:33 +00:00
VirtualObjectHandle.h
)
set(header_impls
ArrayHandle.hxx
CellSetExplicit.hxx
CellSetStructured.hxx
StorageBasic.hxx
)
set(sources
ArrayHandle.cxx
AssignerMultiBlock.cxx
CellSet.cxx
CellSetExplicit.cxx
CellSetStructured.cxx
CoordinateSystem.cxx
DataSet.cxx
DynamicArrayHandle.cxx
EnvironmentTracker.cxx
Field.cxx
internal/SimplePolymorphicContainer.cxx
2017-07-20 19:11:12 +00:00
MultiBlock.cxx
internal/ArrayManagerExecutionShareWithControl.cxx
StorageBasic.cxx
)
# This list of sources has code that uses devices and so might need to be
# compiled with a device-specific compiler (like CUDA).
set(device_sources
ArrayRangeCompute.cxx
2017-08-14 14:19:34 +00:00
CellSetExplicit.cxx
RuntimeDeviceTracker.cxx
TryExecute.cxx
)
vtkm_declare_headers(${headers})
#-----------------------------------------------------------------------------
add_subdirectory(internal)
add_subdirectory(arg)
add_subdirectory(serial)
set(sources ${sources} $<TARGET_OBJECTS:vtkm_cont_serial>)
add_subdirectory(tbb)
if (VTKm_ENABLE_TBB)
set(sources ${sources} $<TARGET_OBJECTS:vtkm_cont_tbb>)
endif()
add_subdirectory(cuda)
if (VTKm_ENABLE_CUDA)
get_property(vtkm_cont_cuda_object_files GLOBAL
PROPERTY vtkm_cont_cuda_object_files )
# mark the file as generated, this needs to be done in this directory
# for 'reasons'.
set_source_files_properties(${vtkm_cont_cuda_object_files}
PROPERTIES GENERATED TRUE)
set(sources ${sources} ${vtkm_cont_cuda_object_files})
endif()
vtkm_library(
SOURCES ${sources}
WRAP_FOR_CUDA ${device_sources}
HEADERS ${header_impls})
target_include_directories(vtkm_cont PRIVATE ${VTKm_BACKEND_INCLUDE_DIRS})
if(VTKm_ENABLE_CUDA)
add_dependencies(vtkm_cont vtkm_cont_cuda)
endif()
2017-11-28 21:04:15 +00:00
if(VTKm_ENABLE_MPI)
# This will become a required dependency eventually.
target_link_libraries(vtkm_cont PUBLIC diy)
2017-11-28 21:04:15 +00:00
endif()
#-----------------------------------------------------------------------------
add_subdirectory(testing)