mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-21 03:25:48 +00:00
Merge branch 'msvc-include-directories' into 'master'
Fix config issues with headers and libraries There were a couple of places where the configure scripts did not add either includes to VTKm_INCLUDE_DIRS or libraries to VTKm_LIBRARIES. The biggest offender was when the examples used find_package to load the VTK-m configuration it needed. find_package cleared out the includes and libraries, but it did not clear out the VTKm_<COMPONENT>_FOUND variables. Normally, these variables would not be set before find_package is called, but in this case the examples were called after some partial configuration. I got around this issue by clearing out all the *_FOUND variables in VTKmConfig.cmake. See merge request !515
This commit is contained in:
commit
6c09bbb64a
@ -52,6 +52,9 @@ if(VTKm_PACKAGE_IN_BUILD)
|
|||||||
set(VTKm_INCLUDE_DIRS ${VTKm_INCLUDE_DIRS} "@VTKm_SOURCE_DIR@")
|
set(VTKm_INCLUDE_DIRS ${VTKm_INCLUDE_DIRS} "@VTKm_SOURCE_DIR@")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Clear out the libraries. We will add more when loading components.
|
||||||
|
set(VTKm_LIBRARIES)
|
||||||
|
|
||||||
set(VTKm_REQUIRED_BOOST_VERSION "@VTKm_REQUIRED_BOOST_VERSION@")
|
set(VTKm_REQUIRED_BOOST_VERSION "@VTKm_REQUIRED_BOOST_VERSION@")
|
||||||
|
|
||||||
if(NOT VTKm_PACKAGE_IN_BUILD)
|
if(NOT VTKm_PACKAGE_IN_BUILD)
|
||||||
|
@ -229,12 +229,6 @@ if (VTKm_BUILD_DOCUMENTATION)
|
|||||||
vtkm_build_documentation()
|
vtkm_build_documentation()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Build examples
|
|
||||||
if(VTKm_BUILD_EXAMPLES)
|
|
||||||
add_subdirectory(examples)
|
|
||||||
endif(VTKm_BUILD_EXAMPLES)
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Ready files for find_package
|
# Ready files for find_package
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
@ -243,7 +237,16 @@ string(REPLACE ";" " " VTKm_AVAILABLE_COMPONENTS_LIST
|
|||||||
"${VTKm_AVAILABLE_COMPONENTS}"
|
"${VTKm_AVAILABLE_COMPONENTS}"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(VTKm_LOAD_COMPONENTS_COMMANDS "
|
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
|
||||||
foreach(comp \${VTKm_FIND_COMPONENTS})")
|
foreach(comp \${VTKm_FIND_COMPONENTS})")
|
||||||
|
|
||||||
foreach(component ${VTKm_AVAILABLE_COMPONENTS})
|
foreach(component ${VTKm_AVAILABLE_COMPONENTS})
|
||||||
@ -331,3 +334,9 @@ set(CPACK_PACKAGE_FILE_NAME "VTKm-${VTKm_VERSION}")
|
|||||||
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
|
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
|
||||||
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
|
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Build examples
|
||||||
|
if(VTKm_BUILD_EXAMPLES)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
endif(VTKm_BUILD_EXAMPLES)
|
||||||
|
@ -20,11 +20,10 @@
|
|||||||
##
|
##
|
||||||
##=============================================================================
|
##=============================================================================
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
vtkm_configure_component_Serial()
|
OPTIONAL_COMPONENTS Serial Cuda TBB
|
||||||
vtkm_configure_component_CUDA()
|
)
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
add_executable(Clipping_SERIAL Clipping.cxx)
|
add_executable(Clipping_SERIAL Clipping.cxx)
|
||||||
target_include_directories(Clipping_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
|
target_include_directories(Clipping_SERIAL PRIVATE ${VTKm_INCLUDE_DIRS})
|
||||||
|
@ -21,15 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm QUIET REQUIRED
|
||||||
|
COMPONENTS Base
|
||||||
#configure the backend components
|
OPTIONAL_COMPONENTS Serial Cuda TBB OSMesa
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
#configure the OSMesa component
|
|
||||||
vtkm_configure_component_OSMESA()
|
|
||||||
|
|
||||||
if(VTKm_OSMesa_FOUND)
|
if(VTKm_OSMesa_FOUND)
|
||||||
|
|
||||||
|
@ -21,16 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
#configure the backend components
|
OPTIONAL_COMPONENTS Serial Cuda TBB OpenGL Interop
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
#configure the rendering / interop components
|
|
||||||
vtkm_configure_component_OpenGL()
|
|
||||||
vtkm_configure_component_Interop()
|
|
||||||
|
|
||||||
find_package(GLUT)
|
find_package(GLUT)
|
||||||
|
|
||||||
|
@ -21,12 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
vtkm_configure_component_OpenGL()
|
OPTIONAL_COMPONENTS Serial Cuda TBB OpenGL
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
find_package(GLUT)
|
find_package(GLUT)
|
||||||
|
|
||||||
|
@ -21,12 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
#configure the backend components
|
OPTIONAL_COMPONENTS Serial Cuda TBB
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
if(VTKm_CUDA_FOUND)
|
if(VTKm_CUDA_FOUND)
|
||||||
# Cuda compiles do not respect target_include_directories
|
# Cuda compiles do not respect target_include_directories
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
vtkm_configure_component_OpenGL()
|
OPTIONAL_COMPONENTS Serial OpenGL
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
|
|
||||||
find_package(GLUT)
|
find_package(GLUT)
|
||||||
|
|
||||||
|
@ -21,12 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
vtkm_configure_component_OpenGL()
|
OPTIONAL_COMPONENTS Serial Cuda TBB OpenGL
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
find_package(GLUT)
|
find_package(GLUT)
|
||||||
|
|
||||||
|
@ -21,12 +21,10 @@
|
|||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
#Find the VTK-m package
|
#Find the VTK-m package
|
||||||
find_package(VTKm QUIET REQUIRED COMPONENTS Base)
|
find_package(VTKm REQUIRED QUIET
|
||||||
|
COMPONENTS Base
|
||||||
vtkm_configure_component_OpenGL()
|
OPTIONAL_COMPONENTS Serial Cuda TBB OpenGL
|
||||||
vtkm_configure_component_Serial()
|
)
|
||||||
vtkm_configure_component_CUDA()
|
|
||||||
vtkm_configure_component_TBB()
|
|
||||||
|
|
||||||
|
|
||||||
find_package(GLUT)
|
find_package(GLUT)
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
## this software.
|
## this software.
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
set(headers
|
set(headers
|
||||||
Assert.h
|
Assert.h
|
||||||
BinaryPredicates.h
|
BinaryPredicates.h
|
||||||
|
@ -29,7 +29,10 @@ set(unit_tests
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Need glut for these tests
|
# Need glut for these tests
|
||||||
if(GLUT_FOUND)
|
if(VTKm_ENABLE_OPENGL_TESTS)
|
||||||
|
list(APPEND VTKm_INCLUDE_DIRS ${GLUT_INCLUDE_DIR} )
|
||||||
|
list(APPEND VTKm_LIBRARIES ${GLUT_LIBRARIES} )
|
||||||
|
|
||||||
vtkm_declare_headers(${headers})
|
vtkm_declare_headers(${headers})
|
||||||
|
|
||||||
vtkm_unit_tests(SOURCES ${unit_tests})
|
vtkm_unit_tests(SOURCES ${unit_tests})
|
||||||
|
Loading…
Reference in New Issue
Block a user