2014-02-10 18:56:40 +00:00
|
|
|
##============================================================================
|
|
|
|
## 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.
|
|
|
|
##
|
2017-09-20 21:33:44 +00:00
|
|
|
## Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2014-02-10 18:56:40 +00:00
|
|
|
## Copyright 2014 UT-Battelle, LLC.
|
2015-05-21 12:09:22 +00:00
|
|
|
## Copyright 2014 Los Alamos National Security.
|
2014-02-10 18:56:40 +00:00
|
|
|
##
|
2017-09-20 21:33:44 +00:00
|
|
|
## Under the terms of Contract DE-NA0003525 with NTESS,
|
2014-02-10 18:56:40 +00:00
|
|
|
## 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.
|
|
|
|
##============================================================================
|
|
|
|
|
2016-06-29 19:19:42 +00:00
|
|
|
# When this file is run by CMake through the find_package command, the
|
|
|
|
# following variables will be defined:
|
2015-11-12 21:25:34 +00:00
|
|
|
#
|
2017-09-25 12:47:47 +00:00
|
|
|
# vtkm Target that should be used to link to VTK-m
|
2016-06-29 19:19:42 +00:00
|
|
|
#
|
2017-09-25 12:47:47 +00:00
|
|
|
# vtkm::tbb Target that contains tbb related link information
|
|
|
|
# implicitly linked to by `vtkm` if tbb is enabled
|
2016-06-29 19:19:42 +00:00
|
|
|
#
|
2017-09-25 12:47:47 +00:00
|
|
|
# vtkm::cuda Target that contains cuda related link information
|
|
|
|
# implicitly linked to by `vtkm` if cuda is enabled
|
2016-06-29 19:19:42 +00:00
|
|
|
#
|
2015-11-12 21:25:34 +00:00
|
|
|
|
2017-09-25 12:47:47 +00:00
|
|
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
2016-11-30 19:10:30 +00:00
|
|
|
|
2016-06-16 22:25:41 +00:00
|
|
|
@PACKAGE_INIT@
|
2014-02-10 18:56:40 +00:00
|
|
|
|
|
|
|
# The VTKm version number
|
2017-01-26 17:02:04 +00:00
|
|
|
set(VTKm_VERSION_MAJOR "@VTKm_VERSION_MAJOR@")
|
|
|
|
set(VTKm_VERSION_MINOR "@VTKm_VERSION_MINOR@")
|
|
|
|
set(VTKm_VERSION_PATCH "@VTKm_VERSION_PATCH@")
|
|
|
|
set(VTKm_VERSION_FULL "@VTKm_VERSION_FULL@")
|
2016-06-16 21:38:23 +00:00
|
|
|
set(VTKm_VERSION "@VTKm_VERSION@")
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2016-06-16 22:25:41 +00:00
|
|
|
# This is true when the package is still in the build directory (not installed)
|
|
|
|
if(CMAKE_CURRENT_LIST_DIR STREQUAL "@VTKm_BINARY_DIR@/@VTKm_INSTALL_CONFIG_DIR@")
|
2016-06-23 18:28:50 +00:00
|
|
|
set(VTKm_PACKAGE_IN_BUILD TRUE)
|
2016-06-16 22:25:41 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VTKm_PACKAGE_IN_BUILD)
|
2016-06-23 17:34:23 +00:00
|
|
|
set_and_check(VTKm_CMAKE_MODULE_PATH "@VTKm_SOURCE_DIR@/CMake")
|
2017-10-03 15:28:15 +00:00
|
|
|
set_and_check(VTKm_INCLUDE_DIRS ${VTKm_INCLUDE_DIRS} "@VTKm_SOURCE_DIR@")
|
|
|
|
else()
|
|
|
|
set_and_check(VTKm_CMAKE_MODULE_PATH "@PACKAGE_VTKm_INSTALL_CMAKE_MODULE_DIR@")
|
|
|
|
set_and_check(VTKm_INCLUDE_DIRS "@PACKAGE_VTKm_INSTALL_INCLUDE_DIR@")
|
2016-06-16 22:25:41 +00:00
|
|
|
endif()
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2017-09-25 12:47:47 +00:00
|
|
|
|
2016-09-06 18:59:44 +00:00
|
|
|
set(VTKm_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
|
2015-11-12 21:25:34 +00:00
|
|
|
set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
|
|
|
|
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
|
|
|
|
|
2016-09-06 20:53:11 +00:00
|
|
|
# Load the library exports, but only if not compiling VTK-m itself
|
|
|
|
set_and_check(VTKm_CONFIG_DIR "@PACKAGE_VTKm_INSTALL_CONFIG_DIR@")
|
2017-09-25 12:47:47 +00:00
|
|
|
if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "@VTKm_BINARY_DIR@")
|
2016-09-06 20:53:11 +00:00
|
|
|
include(${VTKm_CONFIG_DIR}/VTKmTargets.cmake)
|
|
|
|
|
2016-07-28 14:46:59 +00:00
|
|
|
endif()
|
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
# 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})
|
2015-11-12 21:25:34 +00:00
|
|
|
|
2017-09-25 12:47:47 +00:00
|
|
|
# This includes a host of functions used by VTK-m CMake.
|
|
|
|
include(VTKmWrappers)
|
2016-06-16 23:39:51 +00:00
|
|
|
|
2017-09-25 12:47:47 +00:00
|
|
|
check_required_components(vtkm)
|