vtk-m/CMake/VTKmConfig.cmake.in
Kenneth Moreland c0f49d6112 Update vtkm_configure_device macro
* Support a REQUIRED flag that only gives an error if that flag is given.

* Move common configuration required for all devices (such as boost) to a
special device named Base.

* Make CUDA always capitalized to be consistent with the other CMake
variables.

* Rather than call include_directories, set a variable named
VTKm_INCLUDE_DIRS. This is consistent with how most CMake packages work.

* Make a CMake variable named VTKm_LIBRARIES containing all the
libraries the configured devices need.

* Automatically configure supported devices when loading the VTK-m
package in CMake.
2015-11-12 14:26:00 -07:00

60 lines
2.1 KiB
CMake

##============================================================================
## 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 Sandia Corporation.
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
## 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.
##============================================================================
# When this file is run by CMake (usually through the find_package command),
# The following variables will be defined:
#
# VTKm_INCLUDE_DIRS - Directories containing VTK-m and dependent headers
# VTKm_LIBRARIES - The libraries required when using VTK-m
# This file should be installed in the include directory.
# Find the root directory.
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_install_dir "${_dir}/.." ABSOLUTE)
# The VTKm include file directories.
set(VTKm_INCLUDE_DIRS "@VTKm_INCLUDE_DIRS_CONFIG@")
# The VTKm version number
set(VTKm_MAJOR_VERSION "@VTKm_MAJOR_VERSION@")
set(VTKm_MINOR_VERSION "@VTKm_MINOR_VERSION@")
set(VTKm_PATCH_VERSION "@VTKm_PATCH_VERSION@")
set(VTKm_REQUIRED_BOOST_VERSION "@VTKm_REQUIRED_BOOST_VERSION@")
set(VTKm_CMAKE_MODULE_PATH "@VTKm_CMAKE_MODULE_PATH_CONFIG@")
set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
# VTKm requires some CMake Find modules not included with CMake, so
# include the CMake modules distributed with VTKm.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
include(VTKmMacros)
vtkm_configure_device(Serial)
if(VTKm_ENABLE_CUDA)
vtkm_configure_device(CUDA)
endif()
if(VTKm_ENABLE_TBB)
vtkm_configure_device(TBB)
endif()