vtk-m/vtkm/cont/CMakeLists.txt

325 lines
8.5 KiB
CMake
Raw Normal View History

##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
2019-04-15 23:24:21 +00:00
##
## 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.
##============================================================================
set(headers
Algorithm.h
ArrayCopy.h
ArrayExtractComponent.h
ArrayGetValues.h
ArrayHandle.h
ArrayHandleBasic.h
ArrayHandleBitField.h
ArrayHandleCartesianProduct.h
ArrayHandleCast.h
ArrayHandleCompositeVector.h
ArrayHandleConcatenate.h
2015-05-13 20:24:51 +00:00
ArrayHandleConstant.h
ArrayHandleCounting.h
2019-09-06 22:24:27 +00:00
ArrayHandleDecorator.h
ArrayHandleDiscard.h
ArrayHandleExtractComponent.h
ArrayHandleGroupVec.h
ArrayHandleGroupVecVariable.h
2015-02-13 06:24:43 +00:00
ArrayHandleImplicit.h
ArrayHandleIndex.h
2019-07-15 04:51:28 +00:00
ArrayHandleMultiplexer.h
ArrayHandleOffsetsToNumComponents.h
ArrayHandlePermutation.h
ArrayHandleRecombineVec.h
ArrayHandleReverse.h
2020-06-17 21:48:09 +00:00
ArrayHandleRandomStandardNormal.h
ArrayHandleRandomUniformBits.h
ArrayHandleRandomUniformReal.h
ArrayHandleSOA.h
2020-09-09 20:17:59 +00:00
ArrayHandleStride.h
ArrayHandleSwizzle.h
2015-04-13 20:43:18 +00:00
ArrayHandleTransform.h
ArrayHandleUniformPointCoordinates.h
ArrayHandleView.h
ArrayHandleXGCCoordinates.h
ArrayHandleZip.h
ArrayPortal.h
ArrayPortalToIterators.h
ArrayRangeCompute.h
ArrayRangeComputeTemplate.h
AssignerPartitionedDataSet.h
AtomicArray.h
BitField.h
BoundsCompute.h
BoundsGlobalCompute.h
CastAndCall.h
CellLocatorBoundingIntervalHierarchy.h
CellLocatorChooser.h
CellLocatorGeneral.h
CellLocatorRectilinearGrid.h
CellLocatorTwoLevel.h
CellLocatorUniformBins.h
CellLocatorUniformGrid.h
CellSet.h
CellSetExplicit.h
CellSetExtrude.h
2019-12-05 21:38:41 +00:00
CellSetList.h
CellSetListTag.h
CellSetPermutation.h
CellSetSingleType.h
CellSetStructured.h
ColorTable.h
ColorTableMap.h
ColorTableSamples.h
ConvertNumComponentsToOffsets.h
CoordinateSystem.h
DataSet.h
DataSetBuilderCurvilinear.h
DataSetBuilderExplicit.h
DataSetBuilderRectilinear.h
DataSetBuilderUniform.h
DataSetFieldAdd.h
DeviceAdapter.h
DeviceAdapterAlgorithm.h
2019-12-05 21:38:41 +00:00
DeviceAdapterList.h
DeviceAdapterListTag.h
2019-04-03 20:28:31 +00:00
DeviceAdapterTag.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
ErrorFilterExecution.h
ErrorInternal.h
ExecutionAndControlObjectBase.h
ExecutionObjectBase.h
Field.h
2018-04-05 01:13:44 +00:00
FieldRangeCompute.h
FieldRangeGlobalCompute.h
2017-10-23 13:38:33 +00:00
ImplicitFunctionHandle.h
Initialize.h
Invoker.h
Logging.h
ParticleArrayCopy.h
PartitionedDataSet.h
PointLocatorUniformGrid.h
PointLocatorSparseGrid.h
2015-12-23 19:54:41 +00:00
RuntimeDeviceInformation.h
RuntimeDeviceTracker.h
2018-06-08 15:56:40 +00:00
Serialization.h
Storage.h
StorageImplicit.h # Deprecated, rolled into ArrayHandleImplicit.h
2019-12-05 21:38:41 +00:00
StorageList.h
StorageListTag.h
Timer.h
2020-01-15 04:47:11 +00:00
Token.h
TryExecute.h
SerializableTypeString.h
2020-08-05 12:42:33 +00:00
UncertainArrayHandle.h
2020-08-05 03:16:29 +00:00
UnknownArrayHandle.h
VariantArrayHandle.h
)
set(template_sources
ArrayRangeCompute.hxx # Deprecated, replaced with ArrayRangeComputeTemplate.h
CellSetExplicit.hxx
ParticleArrayCopy.hxx
VirtualObjectHandle.hxx
)
set(sources
ArrayHandle.cxx
ArrayHandleBasic.cxx
ArrayHandleSOA.cxx
2020-09-09 20:17:59 +00:00
ArrayHandleStride.cxx
ArrayHandleUniformPointCoordinates.cxx
BitField.cxx
ColorTablePresets.cxx
DeviceAdapterTag.cxx
EnvironmentTracker.cxx
ErrorBadDevice.cxx
ErrorBadType.cxx
internal/Buffer.cxx
internal/DeviceAdapterMemoryManager.cxx
internal/DeviceAdapterMemoryManagerShared.cxx
2021-05-26 19:43:36 +00:00
internal/RuntimeDeviceConfiguration.cxx
internal/RuntimeDeviceConfigurationOptions.cxx
internal/RuntimeDeviceOption.cxx
Initialize.cxx
Logging.cxx
RuntimeDeviceTracker.cxx
Storage.cxx
2020-01-15 04:47:11 +00:00
Token.cxx
TryExecute.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
ArrayCopy.cxx
ArrayGetValues.cxx
ArrayRangeCompute.cxx
AssignerPartitionedDataSet.cxx
BoundsCompute.cxx
BoundsGlobalCompute.cxx
CellLocatorBoundingIntervalHierarchy.cxx
CellLocatorGeneral.cxx
CellLocatorRectilinearGrid.cxx
CellLocatorTwoLevel.cxx
CellLocatorUniformGrid.cxx
CellSet.cxx
2017-08-14 14:19:34 +00:00
CellSetExplicit.cxx
CellSetExtrude.cxx
CellSetStructured.cxx
ColorTable.cxx
ConvertNumComponentsToOffsets.cxx
CoordinateSystem.cxx
DataSet.cxx
DataSetBuilderCurvilinear.cxx
DataSetBuilderExplicit.cxx
DataSetBuilderRectilinear.cxx
DataSetBuilderUniform.cxx
Field.cxx
FieldRangeCompute.cxx
FieldRangeGlobalCompute.cxx
PartitionedDataSet.cxx
PointLocatorSparseGrid.cxx
RuntimeDeviceInformation.cxx
Timer.cxx
2020-08-05 03:16:29 +00:00
UnknownArrayHandle.cxx
)
if (NOT VTKm_NO_DEPRECATED_VIRTUAL)
set(headers ${headers}
ArrayHandleVirtual.h
ArrayHandleVirtualCoordinates.h
CellLocator.h
PointLocator.h
StorageVirtual.h
VirtualObjectHandle.h
)
set(template_sources ${template_sources}
ArrayHandleVirtual.hxx
StorageVirtual.hxx
)
set(device_sources ${device_sources}
ArrayHandleVirtual.cxx
CellLocator.cxx
internal/TransferInfo.cxx
internal/VirtualObjectTransfer.cxx
PointLocator.cxx
StorageVirtual.cxx
)
endif()
#-----------------------------------------------------------------------------
# Set up default types, which can be custom configured by other build systems.
vtkm_get_kit_name(kit_name kit_dir)
# Some custom types included with VTK-m
2020-12-10 18:46:47 +00:00
vtkm_option(VTKm_USE_DEFAULT_TYPES_FOR_VTK
"Compile VTK-m algorithms for use with types from VTK."
OFF
)
if (VTKm_USE_DEFAULT_TYPES_FOR_VTK)
set(VTKm_DEFAULT_TYPES_HEADER "internal/DefaultTypesVTK.h.in")
vtkm_option(VTKm_ADD_XGC_TO_DEFAULT_TYPES_VTK "Add XGC types to default VTK types." OFF)
mark_as_advanced(VTKm_ADD_XGC_TO_DEFAULT_TYPES_VTK)
if (VTKm_ADD_XGC_TO_DEFAULT_TYPES_VTK)
set(VTKM_ADD_XGC_DEFAULT_TYPES TRUE)
endif()
endif()
2020-12-10 18:46:47 +00:00
vtkm_option(VTKm_USE_DEFAULT_TYPES_FOR_ASCENT
"Compile VTK-m algorithms for use with types from Ascent."
OFF
)
if (VTKm_USE_DEFAULT_TYPES_FOR_ASCENT)
set(VTKm_DEFAULT_TYPES_HEADER "internal/DefaultTypesAscent.h.in")
if (VTKm_USE_64BIT_IDS)
message(SEND_ERROR
"When VTKm_USE_DEFAULT_TYPES_FOR_ASCENT is ON, VTKm_USE_64BIT_IDS must be set to OFF"
)
endif()
if (NOT VTKm_USE_DOUBLE_PRECISION)
message(SEND_ERROR
"When VTKm_USE_DEFAULT_TYPES_FOR_ASCENT is ON, VTKm_USE_DOUBLE_PRECISION must be set to ON"
)
endif()
endif()
mark_as_advanced(
VTKm_USE_DEFAULT_TYPES_FOR_VTK
VTKm_USE_DEFAULT_TYPES_FOR_ASCENT
)
if (VTKm_DEFAULT_TYPES_HEADER)
set(VTK_M_HAS_DEFAULT_TYPES_HEADER TRUE)
get_filename_component(VTKm_DEFAULT_TYPES_HEADER_FILENAME ${VTKm_DEFAULT_TYPES_HEADER} NAME_WE)
set(VTKm_DEFAULT_TYPES_HEADER_FILENAME "${VTKm_DEFAULT_TYPES_HEADER_FILENAME}.h")
configure_file(${VTKm_DEFAULT_TYPES_HEADER}
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
@ONLY
)
vtkm_install_headers(vtkm/cont/internal
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DefaultTypes.h.in
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
@ONLY
)
vtkm_install_headers(vtkm/cont
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
)
#-----------------------------------------------------------------------------
vtkm_library( NAME vtkm_cont
SOURCES ${sources}
TEMPLATE_SOURCES ${template_sources}
HEADERS ${headers}
DEVICE_SOURCES ${device_sources}
)
2018-08-16 20:34:44 +00:00
add_subdirectory(internal)
add_subdirectory(arg)
add_subdirectory(serial)
add_subdirectory(tbb)
add_subdirectory(openmp)
add_subdirectory(cuda)
2020-06-16 12:54:01 +00:00
add_subdirectory(kokkos)
set(backends )
if(TARGET vtkm::tbb)
list(APPEND backends vtkm::tbb)
endif()
if(TARGET vtkm::cuda)
list(APPEND backends vtkm::cuda)
endif()
if(TARGET vtkm::openmp)
list(APPEND backends vtkm::openmp)
endif()
2020-06-16 12:54:01 +00:00
if(TARGET vtkm::kokkos)
list(APPEND backends vtkm::kokkos)
endif()
target_link_libraries(vtkm_cont PUBLIC vtkm_compiler_flags ${backends})
target_link_libraries(vtkm_cont PUBLIC Threads::Threads)
target_link_libraries(vtkm_cont PUBLIC vtkm_optionparser vtkm_diy vtkm_lcl)
if(TARGET vtkm_loguru)
target_link_libraries(vtkm_cont PRIVATE vtkm_loguru)
endif()
2017-11-28 21:04:15 +00:00
#-----------------------------------------------------------------------------
2021-09-22 19:51:36 +00:00
if(VTKm_ENABLE_TESTING_LIBRARY)
add_subdirectory(testing)
2021-09-22 19:51:36 +00:00
endif()