Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sudhanshu Sane
VTK-m
Commits
56c73622
Commit
56c73622
authored
Sep 25, 2017
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A thought on what CMake 3.9 would mean to VTK-m.
parent
f366c6fb
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
575 additions
and
3245 deletions
+575
-3245
CMake/FindEGL.cmake
CMake/FindEGL.cmake
+0
-116
CMake/FindGLEW.cmake
CMake/FindGLEW.cmake
+0
-80
CMake/FindGLFW.cmake
CMake/FindGLFW.cmake
+0
-107
CMake/FindPyexpander.cmake
CMake/FindPyexpander.cmake
+0
-42
CMake/FindThrust.cmake
CMake/FindThrust.cmake
+0
-81
CMake/VTKmBackends.cmake
CMake/VTKmBackends.cmake
+61
-0
CMake/VTKmBuildDocumentation.cmake
CMake/VTKmBuildDocumentation.cmake
+0
-56
CMake/VTKmCheckCopyright.cmake
CMake/VTKmCheckCopyright.cmake
+0
-242
CMake/VTKmCheckPyexpander.cmake
CMake/VTKmCheckPyexpander.cmake
+0
-85
CMake/VTKmCheckSourceInBuild.cmake
CMake/VTKmCheckSourceInBuild.cmake
+0
-106
CMake/VTKmCompilerFlags.cmake
CMake/VTKmCompilerFlags.cmake
+119
-0
CMake/VTKmCompilerOptimizations.cmake
CMake/VTKmCompilerOptimizations.cmake
+0
-178
CMake/VTKmConfig.cmake.in
CMake/VTKmConfig.cmake.in
+11
-39
CMake/VTKmConfigureComponents.cmake
CMake/VTKmConfigureComponents.cmake
+0
-418
CMake/VTKmCopyrightStatement.txt
CMake/VTKmCopyrightStatement.txt
+0
-17
CMake/VTKmDetectCUDAVersion.cu
CMake/VTKmDetectCUDAVersion.cu
+0
-60
CMake/VTKmMacros.cmake
CMake/VTKmMacros.cmake
+0
-833
CMake/VTKmSystemInformation.cmake
CMake/VTKmSystemInformation.cmake
+0
-70
CMake/VTKmWrappers.cmake
CMake/VTKmWrappers.cmake
+272
-0
CMake/WrapCUDASource.cu.in
CMake/WrapCUDASource.cu.in
+0
-1
CMake/doxyfile.in
CMake/doxyfile.in
+0
-411
CMakeLists.txt
CMakeLists.txt
+37
-128
examples/CMakeLists.txt
examples/CMakeLists.txt
+15
-15
examples/clipping/CMakeLists.txt
examples/clipping/CMakeLists.txt
+1
-1
examples/contour_tree/CMakeLists.txt
examples/contour_tree/CMakeLists.txt
+1
-1
examples/hello_world/CMakeLists.txt
examples/hello_world/CMakeLists.txt
+1
-1
examples/isosurface/CMakeLists.txt
examples/isosurface/CMakeLists.txt
+1
-1
examples/multi_backend/CMakeLists.txt
examples/multi_backend/CMakeLists.txt
+5
-20
examples/multi_backend/MultiBackend.cu
examples/multi_backend/MultiBackend.cu
+0
-23
examples/unified_memory/CMakeLists.txt
examples/unified_memory/CMakeLists.txt
+1
-1
vtkm/CMakeLists.txt
vtkm/CMakeLists.txt
+5
-5
vtkm/benchmarking/CMakeLists.txt
vtkm/benchmarking/CMakeLists.txt
+3
-8
vtkm/cont/CMakeLists.txt
vtkm/cont/CMakeLists.txt
+14
-23
vtkm/cont/cuda/CMakeLists.txt
vtkm/cont/cuda/CMakeLists.txt
+0
-5
vtkm/cont/cuda/internal/CMakeLists.txt
vtkm/cont/cuda/internal/CMakeLists.txt
+13
-34
vtkm/cont/cuda/testing/CMakeLists.txt
vtkm/cont/cuda/testing/CMakeLists.txt
+1
-1
vtkm/cont/serial/internal/CMakeLists.txt
vtkm/cont/serial/internal/CMakeLists.txt
+4
-9
vtkm/cont/tbb/internal/CMakeLists.txt
vtkm/cont/tbb/internal/CMakeLists.txt
+5
-10
vtkm/exec/cuda/internal/CMakeLists.txt
vtkm/exec/cuda/internal/CMakeLists.txt
+0
-4
vtkm/exec/cuda/internal/testing/CMakeLists.txt
vtkm/exec/cuda/internal/testing/CMakeLists.txt
+1
-1
vtkm/interop/cuda/CMakeLists.txt
vtkm/interop/cuda/CMakeLists.txt
+0
-2
vtkm/interop/cuda/internal/CMakeLists.txt
vtkm/interop/cuda/internal/CMakeLists.txt
+0
-2
vtkm/interop/cuda/testing/CMakeLists.txt
vtkm/interop/cuda/testing/CMakeLists.txt
+1
-3
vtkm/worklet/testing/CMakeLists.txt
vtkm/worklet/testing/CMakeLists.txt
+3
-5
No files found.
CMake/FindEGL.cmake
deleted
100644 → 0
View file @
f366c6fb
##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
# Try to find EGL library and include dir.
# Once done this will define
#
# EGL_FOUND - true if EGL has been found
# EGL_INCLUDE_DIRS - where the EGL/egl.h and KHR/khrplatform.h can be found
# EGL_LIBRARY - link this to use libEGL.so.1
# EGL_opengl_LIBRARY - link with these two libraries instead of the gl library
# EGL_gldispatch_LIBRARY for full OpenGL support through EGL
# EGL_LIBRARIES - all EGL related libraries: EGL, OpenGL, GLdispatch
if
(
NOT EGL_INCLUDE_DIR
)
# If we have a root defined look there first
if
(
EGL_ROOT
)
find_path
(
EGL_INCLUDE_DIR EGL/egl.h PATHS
${
EGL_ROOT
}
/include
NO_DEFAULT_PATH
)
endif
()
if
(
NOT EGL_INCLUDE_DIR
)
find_path
(
EGL_INCLUDE_DIR EGL/egl.h PATHS
/usr/local/include
/usr/include
)
endif
()
endif
()
if
(
NOT EGL_LIBRARY
)
# If we have a root defined look there first
if
(
EGL_ROOT
)
find_library
(
EGL_LIBRARY EGL PATHS
${
EGL_ROOT
}
/lib
NO_DEFAULT_PATH
)
endif
()
if
(
NOT EGL_LIBRARY
)
find_library
(
EGL_LIBRARY EGL PATHS
/usr/local/lib
/usr/lib
)
endif
()
endif
()
if
(
NOT EGL_opengl_LIBRARY
)
# If we have a root defined look there first
if
(
EGL_ROOT
)
find_library
(
EGL_opengl_LIBRARY OpenGL PATHS
${
EGL_ROOT
}
/lib
NO_DEFAULT_PATH
)
endif
()
if
(
NOT EGL_opengl_LIBRARY
)
find_library
(
EGL_opengl_LIBRARY OpenGL PATHS
/usr/local/lib
/usr/lib
)
endif
()
endif
()
if
(
NOT EGL_gldispatch_LIBRARY
)
# If we have a root defined look there first
if
(
EGL_ROOT
)
find_library
(
EGL_gldispatch_LIBRARY GLdispatch PATHS
${
EGL_ROOT
}
/lib
NO_DEFAULT_PATH
)
endif
()
if
(
NOT EGL_gldispatch_LIBRARY
)
find_library
(
EGL_gldispatch_LIBRARY GLdispatch PATHS
/usr/local/lib
/usr/lib
)
endif
()
# For the NVIDIA 358 drivers there isn't a libGLdispath.so. The
# proper one gets installed as libGLdispatch.so.0.
if
(
NOT EGL_gldispatch_LIBRARY
)
find_library
(
EGL_gldispatch_LIBRARY libGLdispatch.so.0 PATHS
/usr/local/lib
/usr/lib
)
endif
()
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
EGL
FOUND_VAR EGL_FOUND
REQUIRED_VARS EGL_LIBRARY EGL_opengl_LIBRARY EGL_gldispatch_LIBRARY EGL_INCLUDE_DIR
)
if
(
EGL_FOUND
)
set
(
EGL_LIBRARIES
${
EGL_LIBRARY
}
${
EGL_opengl_LIBRARY
}
${
EGL_gldispatch_LIBRARY
}
)
set
(
EGL_INCLUDE_DIRS
${
EGL_INCLUDE_DIR
}
)
endif
()
mark_as_advanced
(
EGL_DIR EGL_INCLUDE_DIR EGL_LIBRARY EGL_opengl_LIBRARY EGL_gldispatch_LIBRARY
)
CMake/FindGLEW.cmake
deleted
100644 → 0
View file @
f366c6fb
# - Find the OpenGL Extension Wrangler Library (GLEW)
# This module defines the following variables:
# GLEW_INCLUDE_DIRS - include directories for GLEW
# GLEW_LIBRARIES - libraries to link against GLEW
# GLEW_FOUND - true if GLEW has been found and can be used
#=============================================================================
# Copyright 2012 Benjamin Eikel
#
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ------------------------------------------------------------------------------
#
# The above copyright and license notice applies to distributions of
# CMake in source and binary form. Some source files contain additional
# notices of original copyright by their contributors; see each source
# for details. Third-party software packages supplied with CMake under
# compatible licenses provide their own copyright notices documented in
# corresponding subdirectories.
#
# ------------------------------------------------------------------------------
#
# CMake was initially developed by Kitware with the following sponsorship:
#
# * National Library of Medicine at the National Institutes of Health
# as part of the Insight Segmentation and Registration Toolkit (ITK).
#
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
# Visualization Initiative.
#
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
# National Institutes of Health through the NIH Roadmap for Medical Research,
# Grant U54 EB005149.
#
# * Kitware, Inc.
find_path
(
GLEW_INCLUDE_DIR GL/glew.h
)
find_library
(
GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
GLEW
FOUND_VAR GLEW_FOUND
REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY
)
if
(
GLEW_FOUND
)
set
(
GLEW_INCLUDE_DIRS
${
GLEW_INCLUDE_DIR
}
)
set
(
GLEW_LIBRARIES
${
GLEW_LIBRARY
}
)
endif
()
mark_as_advanced
(
GLEW_INCLUDE_DIR GLEW_LIBRARY
)
CMake/FindGLFW.cmake
deleted
100644 → 0
View file @
f366c6fb
##=============================================================================
##
## 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 2016 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2016 UT-Battelle, LLC.
## Copyright 2016 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##
##=============================================================================
# Try to find EGL library and include dir.
# Once done this will define
#
# GLFW_FOUND
# GLFW_INCLUDE_DIRS
# GLFW_LIBRARIES
#
include
(
FindPackageHandleStandardArgs
)
if
(
WIN32
)
find_path
(
GLFW_INCLUDE_DIR
NAMES
GLFW/glfw3.h
PATHS
${
PROJECT_SOURCE_DIR
}
/shared_external/glfw/include
${
PROJECT_SOURCE_DIR
}
/../shared_external/glfw/include
${
GLFW_LOCATION
}
/include
$ENV{GLFW_LOCATION}/include
$ENV{PROGRAMFILES}/GLFW/include
${
GLFW_LOCATION
}
$ENV{GLFW_LOCATION}
DOC
"The directory where GLFW/glfw3.h resides"
)
if
(
ARCH STREQUAL
"x86"
)
find_library
(
GLFW_LIBRARY
NAMES
glfw3
PATHS
${
GLFW_LOCATION
}
/lib
$ENV{GLFW_LOCATION}/lib
$ENV{PROGRAMFILES}/GLFW/lib
DOC
"The GLFW library"
)
else
()
find_library
(
GLFW_LIBRARY
NAMES
glfw3
PATHS
${
GLFW_LOCATION
}
/lib
$ENV{GLFW_LOCATION}/lib
$ENV{PROGRAMFILES}/GLFW/lib
DOC
"The GLFW library"
)
endif
()
endif
()
if
(
${
CMAKE_HOST_UNIX
}
)
find_path
(
GLFW_INCLUDE_DIR
NAMES
GLFW/glfw3.h
PATHS
${
GLFW_LOCATION
}
/include
$ENV{GLFW_LOCATION}/include
/usr/include
/usr/local/include
/sw/include
/opt/local/include
NO_DEFAULT_PATH
DOC
"The directory where GLFW/glfw3.h resides"
)
find_library
(
GLFW_LIBRARY
NAMES
glfw3 glfw
PATHS
${
GLFW_LOCATION
}
/lib
$ENV{GLFW_LOCATION}/lib
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
/usr/lib/x86_64-linux-gnu
NO_DEFAULT_PATH
DOC
"The GLFW library"
)
endif
()
find_package_handle_standard_args
(
GLFW
FOUND_VAR GLFW_FOUND
REQUIRED_VARS GLFW_INCLUDE_DIR GLFW_LIBRARY
)
if
(
GLFW_FOUND
)
set
(
GLFW_LIBRARIES
${
GLFW_LIBRARY
}
)
set
(
GLFW_INCLUDE_DIRS
${
GLFW_INCLUDE_DIR
}
)
endif
()
mark_as_advanced
(
GLFW_INCLUDE_DIR GLFW_LIBRARY
)
CMake/FindPyexpander.cmake
deleted
100755 → 0
View file @
f366c6fb
##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
#
# - Finds the pyexpander macro tool.
# Use this module by invoking find_package.
#
# This module finds the expander.py command distributed with pyexpander.
# pyexpander can be downloaded from http://pyexpander.sourceforge.net.
# The following variables are defined:
#
# PYEXPANDER_FOUND - True if pyexpander is found
# PYEXPANDER_COMMAND - The pyexpander executable
#
# Note that on some platforms (such as Windows), you cannot execute a python
# script directly. Thus, it could be safer to execute the Python interpreter
# with PYEXPANDER_COMMAND as an argument. See FindPythonInterp.cmake for help
# in finding the Python interpreter.
#
find_program
(
PYEXPANDER_COMMAND expander.py
)
mark_as_advanced
(
PYEXPANDER_COMMAND
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Pyexpander DEFAULT_MSG PYEXPANDER_COMMAND
)
CMake/FindThrust.cmake
deleted
100644 → 0
View file @
f366c6fb
##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
#
# FindThrust
#
# This module finds the Thrust header files and extrats their version. It
# sets the following variables.
#
# THRUST_INCLUDE_DIR - Include directory for thrust header files. (All header
# files will actually be in the thrust subdirectory.)
# THRUST_VERSION - Version of thrust in the form "major.minor.patch".
#
find_path
(
THRUST_INCLUDE_DIR
HINTS
/usr/include/cuda
/usr/local/include
/usr/local/cuda/include
${
CUDA_INCLUDE_DIRS
}
${
CUDA_TOOLKIT_ROOT_DIR
}
${
CUDA_SDK_ROOT_DIR
}
NAMES thrust/version.h
DOC
"Thrust headers"
)
if
(
THRUST_INCLUDE_DIR
)
list
(
REMOVE_DUPLICATES THRUST_INCLUDE_DIR
)
endif
(
THRUST_INCLUDE_DIR
)
# Find thrust version
if
(
THRUST_INCLUDE_DIR
)
file
(
STRINGS
${
THRUST_INCLUDE_DIR
}
/thrust/version.h
version
REGEX
"#define THRUST_VERSION[
\t
]+([0-9x]+)"
)
string
(
REGEX REPLACE
"#define THRUST_VERSION[
\t
]+"
""
version
"
${
version
}
"
)
string
(
REGEX MATCH
"^[0-9]"
major
${
version
}
)
string
(
REGEX REPLACE
"^
${
major
}
00"
""
version
"
${
version
}
"
)
string
(
REGEX MATCH
"^[0-9]"
minor
${
version
}
)
string
(
REGEX REPLACE
"^
${
minor
}
0"
""
version
"
${
version
}
"
)
set
(
THRUST_VERSION
"
${
major
}
.
${
minor
}
.
${
version
}
"
)
set
(
THRUST_MAJOR_VERSION
"
${
major
}
"
)
set
(
THRUST_MINOR_VERSION
"
${
minor
}
"
)
endif
()
# Check for required components
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Thrust
FOUND_VAR Thrust_FOUND
REQUIRED_VARS THRUST_INCLUDE_DIR
VERSION_VAR THRUST_VERSION
)
if
(
Thrust_FOUND
)
set
(
THRUST_INCLUDE_DIRS
${
THRUST_INCLUDE_DIR
}
)
endif
()
mark_as_advanced
(
THRUST_INCLUDE_DIR
)
CMake/
FindMESA
.cmake
→
CMake/
VTKmBackends
.cmake
View file @
56c73622
...
...
@@ -17,50 +17,45 @@
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##============================================================================
# Try to find Mesa off-screen library and include dir.
# Once done this will define
#
# OSMESA_FOUND - true if OSMesa has been found
# OSMESA_INCLUDE_DIR - where the GL/osmesa.h can be found
# OSMESA_LIBRARY - Link this to use OSMesa
if
(
VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb
)
find_package
(
TBB REQUIRED
)
if
(
NOT OSMESA_INCLUDE_DIR
)
add_library
(
vtkm::tbb UNKNOWN IMPORTED
)
# If we have a root defined look there first
if
(
OSMESA_ROOT
)
find_path
(
OSMESA_INCLUDE_DIR GL/osmesa.h PATHS
${
OSMESA_ROOT
}
/include
NO_DEFAULT_PATH
)
endif
()
set_target_properties
(
vtkm::tbb PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
TBB_INCLUDE_DIRS
}
"
)
if
(
NOT OSMESA_INCLUDE_DIR
)
find_path
(
OSMESA_INCLUDE_DIR GL/osmesa.h PATHS
/usr/openwin/share/include
/opt/graphics/OpenGL/include
)
endif
()
endif
()
if
(
TBB_LIBRARY_RELEASE
)
set_property
(
TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE
)
set_target_properties
(
vtkm::tbb PROPERTIES IMPORTED_LOCATION_RELEASE
"
${
TBB_LIBRARY_RELEASE
}
"
)
endif
()
# This may be left blank if OSMesa symbols are included
# in the main Mesa library
if
(
NOT OSMESA_LIBRARY
)
# If we have a root defined look there first
if
(
OSMESA_ROOT
)
find_library
(
OSMESA_LIBRARY OSMesa PATHS
${
OSMESA_ROOT
}
/lib
NO_DEFAULT_PATH
)
endif
()
if
(
TBB_LIBRARY_DEBUG
)
set_property
(
TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG
)
set_target_properties
(
vtkm::tbb PROPERTIES IMPORTED_LOCATION_DEBUG
"
${
TBB_LIBRARY_DEBUG
}
"
)
endif
()
if
(
NOT OSMESA_LIBRARY
)
find_library
(
OSMESA_LIBRARY OSMesa PATHS
/opt/graphics/OpenGL/lib
/usr/openwin/lib
)
endif
()
if
(
NOT TBB_LIBRARY_RELEASE AND NOT TBB_LIBRARY_DEBUG
)
set_property
(
TARGET vtkm::tbb APPEND PROPERTY IMPORTED_LOCATION
"
${
TBB_LIBRARY
}
"
)
endif
()
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
OSMesa DEFAULT_MSG OSMESA_LIBRARY OSMESA_INCLUDE_DIR
)
mark_as_advanced
(
OSMESA_INCLUDE_DIR OSMESA_LIBRARY
)
if
(
VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda
)
enable_language
(
CUDA
)
add_library
(
vtkm::cuda UNKNOWN IMPORTED
)
# We can't have this location/lib empty, so we provide a location that is
# valid and will have no effect on compilation
list
(
GET CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES 0 VTKM_CUDA_LIBRARY
)
set_property
(
TARGET vtkm::cuda APPEND PROPERTY IMPORTED_LOCATION
"
${
VTKM_CUDA_LIBRARY
}
"
)
set_target_properties
(
vtkm::cuda PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
}
"
)
#This is where we would add the -gencode flags so that all cuda code
#way compiled properly
endif
()
CMake/VTKmBuildDocumentation.cmake
deleted
100644 → 0
View file @
f366c6fb
##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
#-----------------------------------------------------------------------------
# Find Doxygen
#-----------------------------------------------------------------------------
find_package
(
Doxygen REQUIRED
)
#-----------------------------------------------------------------------------
# Configure Doxygen
#-----------------------------------------------------------------------------
set
(
VTKm_DOXYGEN_HAVE_DOT
${
DOXYGEN_DOT_FOUND
}
)
set
(
VTKm_DOXYGEN_DOT_PATH
${
DOXYGEN_DOT_PATH
}
)
set
(
VTKm_DOXYFILE
${
CMAKE_CURRENT_BINARY_DIR
}
/docs/doxyfile
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/CMake/doxyfile.in
${
VTKm_DOXYFILE
}
@ONLY
)
#-----------------------------------------------------------------------------
# Run Doxygen
#-----------------------------------------------------------------------------
function
(
vtkm_build_documentation
)
if
(
WIN32
)
set
(
doxygen_redirect NUL
)
else
()
set
(
doxygen_redirect /dev/null
)
endif
()
add_custom_command
(
OUTPUT
${
VTKm_BINARY_DIR
}
/docs/doxygen
COMMAND
${
DOXYGEN_EXECUTABLE
}
${
VTKm_DOXYFILE
}
>
${
doxygen_redirect
}
MAIN_DEPENDENCY
${
CMAKE_CURRENT_SOURCE_DIR
}
/CMake/doxyfile.in
DEPENDS
${
VTKm_DOXYFILE
}
COMMENT
"Generating VTKm Documentation"
)
add_custom_target
(
VTKmDoxygenDocs
ALL
DEPENDS
${
VTKm_BINARY_DIR
}
/docs/doxygen
)
endfunction
(
vtkm_build_documentation
)
CMake/VTKmCheckCopyright.cmake
deleted
100644 → 0
View file @
f366c6fb
##============================================================================
## 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 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## 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.
##============================================================================
## This CMake script checks source files for the appropriate VTKM copyright
## statement, which is stored in VTKm_SOURCE_DIR/CMake/VTKmCopyrightStatement.txt.
## To run this script, execute CMake as follows:
##
## cmake -DVTKm_SOURCE_DIR=<VTKm_SOURCE_DIR> -P <VTKm_SOURCE_DIR>/CMake/VTKMCheckCopyright.cmake
##
cmake_minimum_required
(
VERSION 2.8
)
set
(
FILES_TO_CHECK
*.txt
*.cmake
*.h
*.h.in
*.cxx
*.cu
)
set
(
EXCEPTIONS
LICENSE.txt
README.txt
)
if
(
NOT VTKm_SOURCE_DIR
)
message
(
SEND_ERROR
"VTKm_SOURCE_DIR not defined."
)
endif
(
NOT VTKm_SOURCE_DIR
)
set
(
copyright_file
${
VTKm_SOURCE_DIR
}
/CMake/VTKmCopyrightStatement.txt
)
if
(
NOT EXISTS
${
copyright_file
}
)
message
(
SEND_ERROR
"Cannot find VTKMCopyrightStatement.txt."
)