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-09-09 16:04:53 +00:00
|
|
|
#We require CMake 3.3 for Modern CMake which as features such as:
|
|
|
|
# - Better custom command support
|
|
|
|
# - Better acting if() argument expansion
|
|
|
|
# - Support for usage requirements
|
|
|
|
# -
|
|
|
|
cmake_minimum_required(VERSION 3.3)
|
2015-10-21 14:16:32 +00:00
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
project (VTKm)
|
|
|
|
|
2017-09-29 17:07:10 +00:00
|
|
|
# Update module path
|
|
|
|
set(VTKm_CMAKE_MODULE_PATH ${VTKm_SOURCE_DIR}/CMake)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
|
|
|
|
|
|
|
|
# Determine VTK-m version
|
|
|
|
include(Utilities/Git/Git.cmake)
|
|
|
|
include(VTKmDetermineVersion)
|
|
|
|
|
|
|
|
# Load hardcoded version in case this is not a Git repository
|
|
|
|
file(STRINGS version.txt version_txt)
|
|
|
|
extract_version_components("${version_txt}" "VTKm")
|
|
|
|
# Get the version from git if we can
|
|
|
|
determine_version(${VTKm_SOURCE_DIR} ${GIT_EXECUTABLE} "VTKm")
|
|
|
|
|
2017-08-17 19:47:17 +00:00
|
|
|
if (NOT DEFINED VTKm_INSTALL_INCLUDE_DIR)
|
2017-09-29 17:07:10 +00:00
|
|
|
set(VTKm_INSTALL_INCLUDE_DIR "include/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}")
|
2017-08-17 19:47:17 +00:00
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VTKm_INSTALL_CONFIG_DIR)
|
2017-10-02 16:32:01 +00:00
|
|
|
set(VTKm_INSTALL_CONFIG_DIR "lib/cmake/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}")
|
2017-08-17 19:47:17 +00:00
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VTKm_INSTALL_LIB_DIR)
|
|
|
|
set(VTKm_INSTALL_LIB_DIR "lib")
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VTKm_INSTALL_BIN_DIR)
|
|
|
|
set(VTKm_INSTALL_BIN_DIR "bin")
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VTKm_INSTALL_CMAKE_MODULE_DIR)
|
2017-09-29 17:07:10 +00:00
|
|
|
set(VTKm_INSTALL_CMAKE_MODULE_DIR "share/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}/cmake")
|
2017-08-17 19:47:17 +00:00
|
|
|
endif()
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2017-09-29 17:07:10 +00:00
|
|
|
set(VTKm_BINARY_INCLUDE_DIR "${VTKm_BINARY_DIR}/include/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}")
|
2016-09-06 20:53:11 +00:00
|
|
|
|
2017-09-29 17:07:10 +00:00
|
|
|
set(VTKm_EXPORT_NAME "VTKmTargets")
|
2016-06-16 23:39:51 +00:00
|
|
|
|
2017-08-10 13:55:50 +00:00
|
|
|
# Setup default build types
|
|
|
|
include(VTKmBuildType)
|
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
# include some vtkm-specific cmake code.
|
2016-06-16 23:39:51 +00:00
|
|
|
include(VTKmMacros)
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2016-09-29 18:06:07 +00:00
|
|
|
# Create an "interface" target library. This is not a real library but rather
|
|
|
|
# holds CMake configuration that is required for CXX targets that use VTK-m
|
|
|
|
# headers. In particular, it makes sure the appropriate C++11 version is being
|
|
|
|
# used. (The cxx_constexpr and cxx_auto_type features happen to force C++11.
|
|
|
|
# Directly asking for C++11 with this interface is not supported in CMake 3.3.)
|
|
|
|
# This is also exported so that dependent CMake projects can load the same
|
|
|
|
# configuration.
|
|
|
|
add_library(vtkm INTERFACE)
|
2016-10-03 16:28:44 +00:00
|
|
|
target_compile_features(vtkm INTERFACE cxx_auto_type)
|
2017-01-25 14:42:25 +00:00
|
|
|
target_include_directories(vtkm INTERFACE
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
2017-09-29 17:07:10 +00:00
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}>
|
2017-01-25 14:42:25 +00:00
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
)
|
2016-09-29 18:06:07 +00:00
|
|
|
install(TARGETS vtkm EXPORT ${VTKm_EXPORT_NAME})
|
|
|
|
|
2016-06-16 23:39:51 +00:00
|
|
|
# Load the base VTK-m configuration, which is required for some of the later
|
|
|
|
# config.
|
|
|
|
vtkm_configure_component_Base()
|
|
|
|
if(NOT VTKm_Base_FOUND)
|
2016-10-21 12:37:30 +00:00
|
|
|
message(SEND_ERROR "Could not load base VTK-m component.")
|
2015-08-17 14:07:17 +00:00
|
|
|
endif()
|
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2016-09-29 18:06:07 +00:00
|
|
|
# When using C++11 suport make sure you use the standard C++ extensions rather
|
|
|
|
# than compiler-specific versions of the extensions (to preserve portability).
|
|
|
|
set(CMAKE_CXX_EXTENSIONS False)
|
2014-02-10 18:56:40 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add supplemental compiler warnings, and GCC visibility support.
|
2015-10-21 14:28:49 +00:00
|
|
|
# include export header modules so that we can easily control symbol exporting
|
|
|
|
# VTK-m is setup by default not to export symbols unless explicitly stated.
|
|
|
|
# We prefer to only export symbols of a small set of user facing classes,
|
|
|
|
# rather than exporting all symbols. In practice we will try to not export
|
|
|
|
# symbols for any third party library
|
|
|
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
|
|
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
|
|
|
include(GenerateExportHeader)
|
2014-02-10 18:56:40 +00:00
|
|
|
include(CMake/VTKmCompilerExtras.cmake)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Configurable Options
|
2015-01-20 14:08:19 +00:00
|
|
|
option(VTKm_ENABLE_CUDA "Enable Cuda support" OFF)
|
2015-05-29 14:38:28 +00:00
|
|
|
option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
|
2016-09-15 15:27:48 +00:00
|
|
|
option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
|
2014-02-10 18:56:40 +00:00
|
|
|
option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
|
2015-07-06 21:44:29 +00:00
|
|
|
option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
|
2016-09-09 20:50:31 +00:00
|
|
|
option(VTKm_ENABLE_OSMESA "Enable creating the OSMesa canvas" OFF)
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2017-05-23 13:38:13 +00:00
|
|
|
option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
|
|
|
|
option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)
|
2015-07-17 19:35:59 +00:00
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
option(VTKm_USE_DOUBLE_PRECISION
|
|
|
|
"Use double precision for floating point calculations"
|
|
|
|
OFF
|
|
|
|
)
|
2015-06-03 14:37:23 +00:00
|
|
|
option(VTKm_USE_64BIT_IDS "Use 64-bit indices." ON)
|
2014-02-10 18:56:40 +00:00
|
|
|
|
2017-08-28 12:53:09 +00:00
|
|
|
option(VTKm_NO_ASSERT "Disable assertions in debugging builds." OFF)
|
|
|
|
mark_as_advanced(VTKm_NO_ASSERT)
|
|
|
|
|
2016-09-06 18:59:44 +00:00
|
|
|
option(BUILD_SHARED_LIBS "Build VTK-m with shared libraries" ON)
|
|
|
|
set(VTKm_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
if (VTKm_ENABLE_TESTING)
|
|
|
|
enable_testing()
|
|
|
|
include(CTest)
|
2016-03-17 17:14:30 +00:00
|
|
|
configure_file(${VTKm_SOURCE_DIR}/CTestCustom.cmake.in
|
|
|
|
${VTKm_BINARY_DIR}/CTestCustom.cmake @ONLY)
|
2014-02-10 18:56:40 +00:00
|
|
|
endif()
|
|
|
|
|
2014-11-26 17:19:46 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Set up devices selected.
|
2016-06-16 23:39:51 +00:00
|
|
|
vtkm_configure_component_Serial()
|
|
|
|
if(NOT VTKm_Serial_FOUND)
|
|
|
|
message(SEND_ERROR "Could not load serial VTK-m component.")
|
|
|
|
endif()
|
2015-05-29 14:38:28 +00:00
|
|
|
if (VTKm_ENABLE_TBB)
|
2016-06-16 23:39:51 +00:00
|
|
|
vtkm_configure_component_TBB()
|
|
|
|
if(NOT VTKm_TBB_FOUND)
|
|
|
|
message(SEND_ERROR "Could not load TBB configuration. If TBB is not available, turn off VTKm_ENABLE_TBB.")
|
|
|
|
endif()
|
2015-05-29 14:38:28 +00:00
|
|
|
endif (VTKm_ENABLE_TBB)
|
2015-11-12 21:25:34 +00:00
|
|
|
if (VTKm_ENABLE_CUDA)
|
2016-06-16 23:39:51 +00:00
|
|
|
vtkm_configure_component_CUDA()
|
|
|
|
if(NOT VTKm_CUDA_FOUND)
|
2016-09-01 12:55:12 +00:00
|
|
|
message(SEND_ERROR "Could not load CUDA configuration. If CUDA is not available, turn off VTKm_ENABLE_CUDA.")
|
2016-06-16 23:39:51 +00:00
|
|
|
endif()
|
2015-11-12 21:25:34 +00:00
|
|
|
endif (VTKm_ENABLE_CUDA)
|
2014-11-26 17:19:46 +00:00
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
## Set the directory where the binaries will be stored
|
2017-08-17 16:02:50 +00:00
|
|
|
set( VTKm_EXECUTABLE_OUTPUT_PATH
|
2014-02-10 18:56:40 +00:00
|
|
|
${PROJECT_BINARY_DIR}/bin
|
|
|
|
CACHE PATH
|
|
|
|
"Directory where all executable will be stored"
|
|
|
|
)
|
|
|
|
|
|
|
|
## Set the directory where the libraries will be stored
|
2017-08-17 16:02:50 +00:00
|
|
|
set( VTKm_LIBRARY_OUTPUT_PATH
|
2016-08-25 23:54:32 +00:00
|
|
|
${PROJECT_BINARY_DIR}/lib
|
2014-02-10 18:56:40 +00:00
|
|
|
CACHE PATH
|
|
|
|
"Directory where all the libraries will be stored"
|
|
|
|
)
|
|
|
|
mark_as_advanced(
|
2017-08-17 16:02:50 +00:00
|
|
|
VTKm_EXECUTABLE_OUTPUT_PATH
|
|
|
|
VTKm_LIBRARY_OUTPUT_PATH)
|
2014-02-10 18:56:40 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2016-06-02 16:04:08 +00:00
|
|
|
# Add "meta" tests that check the state of the repository
|
|
|
|
# SystemInformation prints out information about the current configuration
|
|
|
|
# CopyrightStatement checks that the copyright statement is in all source files
|
|
|
|
# SourceInBuild checks that all source files are listed in the build
|
2014-02-10 18:56:40 +00:00
|
|
|
if (VTKm_ENABLE_TESTING)
|
2016-06-02 16:04:08 +00:00
|
|
|
add_test(NAME SystemInformation
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DVTKm_SOURCE_DIR=${VTKm_SOURCE_DIR}" "-DVTKm_BINARY_DIR=${VTKm_BINARY_DIR}" -P "${VTKm_SOURCE_DIR}/CMake/VTKmSystemInformation.cmake"
|
|
|
|
)
|
2014-02-10 18:56:40 +00:00
|
|
|
add_test(NAME CopyrightStatement
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DVTKm_SOURCE_DIR=${VTKm_SOURCE_DIR}" -P "${VTKm_SOURCE_DIR}/CMake/VTKmCheckCopyright.cmake"
|
|
|
|
)
|
2016-06-02 16:04:08 +00:00
|
|
|
add_test(NAME SourceInBuild
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DVTKm_SOURCE_DIR=${VTKm_SOURCE_DIR}" -P "${VTKm_SOURCE_DIR}/CMake/VTKmCheckSourceInBuild.cmake"
|
2014-09-10 19:36:16 +00:00
|
|
|
)
|
2014-02-10 18:56:40 +00:00
|
|
|
endif (VTKm_ENABLE_TESTING)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Check basic type sizes.
|
|
|
|
include(CheckTypeSize)
|
|
|
|
|
|
|
|
check_type_size(float VTKm_SIZE_FLOAT BUILTIN_TYPES_ONLY)
|
|
|
|
check_type_size(double VTKm_SIZE_DOUBLE BUILTIN_TYPES_ONLY)
|
2014-10-07 16:59:34 +00:00
|
|
|
check_type_size(char VTKm_SIZE_CHAR BUILTIN_TYPES_ONLY)
|
|
|
|
check_type_size(short VTKm_SIZE_SHORT BUILTIN_TYPES_ONLY)
|
2014-02-10 18:56:40 +00:00
|
|
|
check_type_size(int VTKm_SIZE_INT BUILTIN_TYPES_ONLY)
|
|
|
|
check_type_size(long VTKm_SIZE_LONG BUILTIN_TYPES_ONLY)
|
|
|
|
check_type_size("long long" VTKm_SIZE_LONG_LONG BUILTIN_TYPES_ONLY)
|
|
|
|
|
2016-06-16 16:36:20 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Find the Python interpreter, which we will use during the build process
|
|
|
|
find_package(PythonInterp)
|
|
|
|
|
2015-09-04 15:41:39 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Find Pyexpander in case somebody wants to update the auto generated
|
|
|
|
# faux variadic template code
|
2015-05-27 04:32:10 +00:00
|
|
|
find_package(Pyexpander)
|
2014-06-27 00:26:45 +00:00
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Add subdirectories
|
|
|
|
add_subdirectory(vtkm)
|
|
|
|
|
2015-07-17 19:35:59 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Build documentation
|
2017-05-23 13:38:13 +00:00
|
|
|
if (VTKm_ENABLE_DOCUMENTATION)
|
2015-07-17 19:35:59 +00:00
|
|
|
include(CMake/VTKmBuildDocumentation.cmake)
|
|
|
|
vtkm_build_documentation()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2016-06-16 21:38:23 +00:00
|
|
|
# Ready files for find_package
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
2016-06-29 19:19:42 +00:00
|
|
|
string(REPLACE ";" " " VTKm_AVAILABLE_COMPONENTS_LIST
|
|
|
|
"${VTKm_AVAILABLE_COMPONENTS}"
|
|
|
|
)
|
|
|
|
|
2016-08-23 20:07:38 +00:00
|
|
|
set(VTKm_LOAD_COMPONENTS_COMMANDS "# Clear out old FOUND flags")
|
|
|
|
foreach(component ${VTKm_AVAILABLE_COMPONENTS})
|
|
|
|
set(VTKm_LOAD_COMPONENTS_COMMANDS "${VTKm_LOAD_COMPONENTS_COMMANDS}
|
|
|
|
set(VTKm_${component}_FOUND)"
|
|
|
|
)
|
|
|
|
endforeach(component)
|
|
|
|
|
|
|
|
set(VTKm_LOAD_COMPONENTS_COMMANDS "${VTKm_LOAD_COMPONENTS_COMMANDS}
|
|
|
|
|
|
|
|
# Load each component selected in find_package
|
2016-06-23 19:11:43 +00:00
|
|
|
foreach(comp \${VTKm_FIND_COMPONENTS})")
|
|
|
|
|
2016-06-16 23:39:51 +00:00
|
|
|
foreach(component ${VTKm_AVAILABLE_COMPONENTS})
|
|
|
|
set(VTKm_LOAD_COMPONENTS_COMMANDS "${VTKm_LOAD_COMPONENTS_COMMANDS}
|
2016-06-23 19:11:43 +00:00
|
|
|
if(\"${component}\" STREQUAL \${comp})
|
|
|
|
vtkm_configure_component_${component}()
|
2016-07-28 14:46:59 +00:00
|
|
|
if(VTKm_${component}_FOUND AND NOT VTKm_CONFIGURE_QUIET)
|
2016-06-30 21:25:26 +00:00
|
|
|
message(STATUS \"Successfully loaded VTK-m component ${component}\")
|
|
|
|
else()
|
2016-07-28 14:46:59 +00:00
|
|
|
if(VTKm_FIND_REQUIRED_${component} AND NOT VTKm_CONFIGURE_QUIET)
|
2016-06-30 21:25:26 +00:00
|
|
|
message(\"Could not load REQUIRED VTK-m component ${component}\")
|
2016-07-28 14:46:59 +00:00
|
|
|
elseif(NOT VTKm_CONFIGURE_QUIET)
|
2016-06-30 21:25:26 +00:00
|
|
|
message(STATUS \"Could not load optional VTK-m component ${component}\")
|
|
|
|
endif()
|
|
|
|
endif()
|
2016-06-23 19:11:43 +00:00
|
|
|
continue()
|
2016-06-30 21:25:26 +00:00
|
|
|
endif()"
|
|
|
|
)
|
2016-06-23 19:11:43 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
set(VTKm_LOAD_COMPONENTS_COMMANDS "${VTKm_LOAD_COMPONENTS_COMMANDS}
|
2016-07-28 14:46:59 +00:00
|
|
|
if(NOT VTKm_CONFIGURE_QUIET)
|
|
|
|
message(WARNING \"No such VTK-m component: \${comp}\")
|
|
|
|
endif()
|
2016-06-23 19:11:43 +00:00
|
|
|
endforeach()" )
|
2016-06-16 23:39:51 +00:00
|
|
|
|
2016-06-16 22:25:41 +00:00
|
|
|
configure_package_config_file(
|
2014-05-22 21:20:41 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmConfig.cmake.in
|
2016-06-16 22:25:41 +00:00
|
|
|
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
|
|
|
|
INSTALL_DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
|
2016-09-06 20:53:11 +00:00
|
|
|
PATH_VARS
|
|
|
|
VTKm_INSTALL_INCLUDE_DIR
|
|
|
|
VTKm_INSTALL_CONFIG_DIR
|
|
|
|
VTKm_INSTALL_LIB_DIR
|
|
|
|
VTKm_INSTALL_BIN_DIR
|
|
|
|
VTKm_INSTALL_CMAKE_MODULE_DIR
|
2014-05-22 21:20:41 +00:00
|
|
|
)
|
|
|
|
|
2016-06-16 21:38:23 +00:00
|
|
|
write_basic_package_version_file(
|
2016-06-16 22:25:41 +00:00
|
|
|
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
|
2016-06-16 21:38:23 +00:00
|
|
|
VERSION ${VTKm_VERSION}
|
|
|
|
COMPATIBILITY ExactVersion )
|
2016-06-16 22:25:41 +00:00
|
|
|
install(
|
2016-07-25 14:31:08 +00:00
|
|
|
FILES
|
|
|
|
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
|
|
|
|
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
|
2014-05-22 21:20:41 +00:00
|
|
|
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
|
|
|
|
)
|
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
# Install the readme and license files.
|
|
|
|
install(FILES ${VTKm_SOURCE_DIR}/README.md
|
|
|
|
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
|
|
|
|
RENAME VTKmREADME.md
|
|
|
|
)
|
|
|
|
install(FILES ${VTKm_SOURCE_DIR}/LICENSE.txt
|
|
|
|
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
|
|
|
|
RENAME VTKmLICENSE.txt
|
|
|
|
)
|
|
|
|
|
|
|
|
# Install helper configure files.
|
|
|
|
install(
|
|
|
|
FILES
|
2016-10-03 21:31:05 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindEGL.cmake
|
2015-08-11 21:48:30 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindGLEW.cmake
|
2016-10-03 21:31:05 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindGLFW.cmake
|
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindMESA.cmake
|
2015-08-11 21:48:30 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindTBB.cmake
|
|
|
|
${VTKm_SOURCE_DIR}/CMake/FindThrust.cmake
|
2014-02-10 18:56:40 +00:00
|
|
|
DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}
|
|
|
|
)
|
|
|
|
|
2015-11-23 17:44:05 +00:00
|
|
|
# Install support files.
|
|
|
|
install(
|
|
|
|
FILES
|
2016-02-22 18:15:30 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmMacros.cmake
|
2016-06-16 23:39:51 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmConfigureComponents.cmake
|
2015-11-23 17:44:05 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmCompilerOptimizations.cmake
|
2016-10-03 21:25:22 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmDetectCUDAVersion.cu
|
2016-12-09 19:04:32 +00:00
|
|
|
${VTKm_SOURCE_DIR}/CMake/VTKmExportHeaderTemplate.h.in
|
2015-11-23 17:44:05 +00:00
|
|
|
DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}
|
|
|
|
)
|
|
|
|
|
2016-09-06 20:53:11 +00:00
|
|
|
# Create and install exports for external projects
|
2016-09-29 18:06:07 +00:00
|
|
|
export(EXPORT ${VTKm_EXPORT_NAME}
|
|
|
|
FILE ${CMAKE_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmTargets.cmake
|
|
|
|
)
|
|
|
|
install(EXPORT ${VTKm_EXPORT_NAME}
|
2017-10-02 16:32:01 +00:00
|
|
|
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
|
2016-09-29 18:06:07 +00:00
|
|
|
FILE VTKmTargets.cmake
|
|
|
|
)
|
2014-11-26 17:19:46 +00:00
|
|
|
|
2014-02-10 18:56:40 +00:00
|
|
|
# Enable CPack packaging
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE ${VTKm_SOURCE_DIR}/README.md)
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The VTKm Toolkit")
|
|
|
|
set(CPACK_PACKAGE_NAME "VTKm")
|
2017-01-26 17:02:04 +00:00
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VTKm_VERSION_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${VTKm_VERSION_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${VTKm_VERSION_PATCH})
|
2014-02-10 18:56:40 +00:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "VTKm-${VTKm_VERSION}")
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
|
|
|
|
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
|
|
|
|
include(CPack)
|
2016-08-23 22:04:58 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Build examples
|
2017-05-23 13:38:13 +00:00
|
|
|
if(VTKm_ENABLE_EXAMPLES)
|
2016-08-23 22:04:58 +00:00
|
|
|
add_subdirectory(examples)
|
2017-05-23 13:38:13 +00:00
|
|
|
endif(VTKm_ENABLE_EXAMPLES)
|