vtk-m/vtkm/internal/CMakeLists.txt
Kenneth Moreland ed4d0d50c3 Add VTKM_DEPRECATED macro
The `VTKM_DEPRECATED` macro allows us to remove (and usually replace)
features from VTK-m in minor releases while still following the conventions
of semantic versioning. The idea is that when we want to remove or replace
a feature, we first mark the old feature as deprecated. The old feature
will continue to work, but compilers that support it will start to issue a
warning that the use is deprecated and should stop being used. The
deprecated features should remain viable until at least the next major
version. At the next major version, deprecated features from the previous
version may be removed.
2019-11-06 09:58:53 -07:00

90 lines
2.7 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.
##============================================================================
#-----------------------------------------------------------------------------
# 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_OPENMP ${VTKm_ENABLE_OPENMP})
set(VTKM_ENABLE_MPI ${VTKm_ENABLE_MPI})
if(VTKM_ENABLE_CUDA)
string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" VTKM_CUDA_VERSION_MAJOR ${CMAKE_CUDA_COMPILER_VERSION})
string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" VTKM_CUDA_VERSION_MINOR ${CMAKE_CUDA_COMPILER_VERSION})
endif()
set(VTKM_ENABLE_LOGGING ${VTKm_ENABLE_LOGGING})
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)
include(WriteCompilerDetectionHeader)
write_compiler_detection_header(
FILE ${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/CompilerFeatures.h
PREFIX VTK_M
COMPILERS ${CMAKE_CXX_COMPILER_ID} GNU Clang AppleClang MSVC SunPro Intel
FEATURES cxx_attribute_deprecated
ALLOW_UNKNOWN_COMPILERS
)
vtkm_install_headers(vtkm/internal
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Configure.h
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/CompilerFeatures.h
)
unset(VTKM_ENABLE_MPI)
unset(VTKM_ENABLE_TBB)
unset(VTKM_ENABLE_CUDA)
unset(VTKM_USE_64BIT_IDS)
unset(VTKM_USE_DOUBLE_PRECISION)
unset(VTKM_NO_ASSERT)
set(headers
ArrayPortalHelpers.h
ArrayPortalUniformPointCoordinates.h
ArrayPortalValueReference.h
ArrayPortalVirtual.h
Assume.h
brigand.hpp
ConfigureFor32.h
ConfigureFor64.h
ConnectivityStructuredInternals.h
ExportMacros.h
FunctionInterface.h
FunctionInterfaceDetailPost.h
FunctionInterfaceDetailPre.h
IndexTag.h
IndicesExtrude.h
Invocation.h
ListTagDetail.h
Unreachable.h
Variant.h
VariantDetail.h
Windows.h
)
vtkm_declare_headers(${headers})
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPre.h)
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPost.h)
vtkm_pyexpander_generated_file(VariantDetail.h)
add_subdirectory(testing)