mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 21:33:55 +00:00
Update VTK-m to export to Configure.h if we have opengl interop enabled.
At the same time I rearranged the CMakeLists.txt so that the configuration for Configure.h is later so that it catches all CMake Variables.
This commit is contained in:
parent
1906e273d2
commit
23b435d031
@ -141,23 +141,6 @@ check_type_size(int VTKm_SIZE_INT BUILTIN_TYPES_ONLY)
|
|||||||
check_type_size(long VTKm_SIZE_LONG 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)
|
check_type_size("long long" VTKm_SIZE_LONG_LONG BUILTIN_TYPES_ONLY)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Build the configure file.
|
|
||||||
# need to set VTKM_USE_DOUBLE_PRECISION, and VTKM_USE_64BIT_IDS as that
|
|
||||||
# is the spelling we use for our defines.
|
|
||||||
set(VTKM_USE_DOUBLE_PRECISION ${VTKm_USE_DOUBLE_PRECISION})
|
|
||||||
set(VTKM_USE_64BIT_IDS ${VTKm_USE_64BIT_IDS})
|
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkm/internal/Configure.h.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/vtkm/internal/Configure.h
|
|
||||||
@ONLY)
|
|
||||||
vtkm_install_headers(
|
|
||||||
vtkm/internal ${CMAKE_CURRENT_BINARY_DIR}/vtkm/internal/Configure.h)
|
|
||||||
|
|
||||||
unset(VTKM_USE_DOUBLE_PRECISION)
|
|
||||||
unset(VTKM_USE_64BIT_IDS)
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Find OpenGL and GLEW, if both are found we can enable
|
# Find OpenGL and GLEW, if both are found we can enable
|
||||||
# the OpenGL Interop support. We use
|
# the OpenGL Interop support. We use
|
||||||
@ -182,6 +165,9 @@ CMAKE_DEPENDENT_OPTION(VTKm_ENABLE_OPENGL_TESTS
|
|||||||
"Enable OpenGL Interop Render Window Tests"
|
"Enable OpenGL Interop Render Window Tests"
|
||||||
ON "VTKm_ENABLE_OPENGL_INTEROP;GLUT_FOUND" OFF)
|
ON "VTKm_ENABLE_OPENGL_INTEROP;GLUT_FOUND" OFF)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Find Pyexpander in case somebody wants to update the auto generated
|
||||||
|
# faux variadic template code
|
||||||
find_package(Pyexpander)
|
find_package(Pyexpander)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@ -201,6 +187,25 @@ if(VTKm_BUILD_EXAMPLES)
|
|||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif(VTKm_BUILD_EXAMPLES)
|
endif(VTKm_BUILD_EXAMPLES)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Build the configure file.
|
||||||
|
# need to set numerous VTKm cmake properties to the naming convention
|
||||||
|
# that we exepect for our C++ defines.
|
||||||
|
|
||||||
|
set(VTKM_USE_DOUBLE_PRECISION ${VTKm_USE_DOUBLE_PRECISION})
|
||||||
|
set(VTKM_USE_64BIT_IDS ${VTKm_USE_64BIT_IDS})
|
||||||
|
set(VTKM_ENABLE_OPENGL_INTEROP ${VTKm_ENABLE_OPENGL_INTEROP})
|
||||||
|
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkm/internal/Configure.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/vtkm/internal/Configure.h
|
||||||
|
@ONLY)
|
||||||
|
vtkm_install_headers(
|
||||||
|
vtkm/internal ${CMAKE_CURRENT_BINARY_DIR}/vtkm/internal/Configure.h)
|
||||||
|
|
||||||
|
unset(VTKM_ENABLE_OPENGL_INTEROP)
|
||||||
|
unset(VTKM_USE_64BIT_IDS)
|
||||||
|
unset(VTKM_USE_DOUBLE_PRECISION)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Configuration for build directory.
|
# Configuration for build directory.
|
||||||
set(VTKm_INCLUDE_DIRS_CONFIG "${VTKm_SOURCE_DIR};${VTKm_BINARY_DIR}")
|
set(VTKm_INCLUDE_DIRS_CONFIG "${VTKm_SOURCE_DIR};${VTKm_BINARY_DIR}")
|
||||||
|
@ -132,8 +132,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Mark if we are building with interop enabled
|
//Mark if we are building with interop enabled
|
||||||
#ifndef VTKm_ENABLE_OPENGL_INTEROP
|
#ifndef VTKM_ENABLE_OPENGL_INTEROP
|
||||||
#cmakedefine VTKm_ENABLE_OPENGL_INTEROP
|
#cmakedefine VTKM_ENABLE_OPENGL_INTEROP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Determine whether we will use variadic templates (a new feature in C++11).
|
// Determine whether we will use variadic templates (a new feature in C++11).
|
||||||
|
Loading…
Reference in New Issue
Block a user