mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-20 02:55:47 +00:00
Merge topic 'template-sources-with-config'
0d2309ab Add template sources to built library Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !1132
This commit is contained in:
commit
dcc8b8ae63
@ -195,16 +195,6 @@ function(vtkm_install_headers dir_prefix)
|
|||||||
)
|
)
|
||||||
endfunction(vtkm_install_headers)
|
endfunction(vtkm_install_headers)
|
||||||
|
|
||||||
function(vtkm_install_template_sources)
|
|
||||||
vtkm_get_kit_name(name dir_prefix)
|
|
||||||
set(hfiles ${ARGN})
|
|
||||||
vtkm_install_headers("${dir_prefix}" ${hfiles})
|
|
||||||
# CMake does not add installed files as project files, and template sources
|
|
||||||
# are not declared as source files anywhere, add a fake target here to let
|
|
||||||
# an IDE know that these sources exist.
|
|
||||||
add_custom_target(${name}_template_srcs SOURCES ${hfiles})
|
|
||||||
endfunction(vtkm_install_template_sources)
|
|
||||||
|
|
||||||
# Declare a list of headers that require thrust to be enabled
|
# Declare a list of headers that require thrust to be enabled
|
||||||
# for them to header tested. In cases of thrust version 1.5 or less
|
# for them to header tested. In cases of thrust version 1.5 or less
|
||||||
# we have to make sure openMP is enabled, otherwise we are okay
|
# we have to make sure openMP is enabled, otherwise we are okay
|
||||||
@ -233,7 +223,7 @@ endfunction(vtkm_requires_thrust_to_test)
|
|||||||
function(vtkm_declare_headers)
|
function(vtkm_declare_headers)
|
||||||
set(options CUDA)
|
set(options CUDA)
|
||||||
set(oneValueArgs TESTABLE)
|
set(oneValueArgs TESTABLE)
|
||||||
set(multiValueArgs)
|
set(multiValueArgs EXCLUDE_FROM_TESTING)
|
||||||
cmake_parse_arguments(VTKm_DH "${options}"
|
cmake_parse_arguments(VTKm_DH "${options}"
|
||||||
"${oneValueArgs}" "${multiValueArgs}"
|
"${oneValueArgs}" "${multiValueArgs}"
|
||||||
${ARGN}
|
${ARGN}
|
||||||
@ -247,11 +237,15 @@ function(vtkm_declare_headers)
|
|||||||
set(VTKm_DH_TESTABLE ON)
|
set(VTKm_DH_TESTABLE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(hfiles ${VTKm_DH_UNPARSED_ARGUMENTS})
|
set(hfiles ${VTKm_DH_UNPARSED_ARGUMENTS} ${VTKm_DH_EXCLUDE_FROM_TESTING})
|
||||||
vtkm_get_kit_name(name dir_prefix)
|
vtkm_get_kit_name(name dir_prefix)
|
||||||
|
|
||||||
#only do header testing if enable testing is turned on
|
#only do header testing if enable testing is turned on
|
||||||
if (VTKm_ENABLE_TESTING AND VTKm_DH_TESTABLE)
|
if (VTKm_ENABLE_TESTING AND VTKm_DH_TESTABLE)
|
||||||
|
set_source_files_properties(${VTKm_DH_EXCLUDE_FROM_TESTING}
|
||||||
|
PROPERTIES VTKm_CANT_BE_HEADER_TESTED TRUE
|
||||||
|
)
|
||||||
|
|
||||||
vtkm_add_header_build_test(
|
vtkm_add_header_build_test(
|
||||||
"${name}" "${dir_prefix}" "${VTKm_DH_CUDA}" ${hfiles})
|
"${name}" "${dir_prefix}" "${VTKm_DH_CUDA}" ${hfiles})
|
||||||
endif()
|
endif()
|
||||||
|
@ -102,9 +102,9 @@ set(header_template_sources
|
|||||||
VertexClustering.hxx
|
VertexClustering.hxx
|
||||||
)
|
)
|
||||||
|
|
||||||
vtkm_declare_headers(${headers})
|
vtkm_declare_headers(${headers}
|
||||||
|
EXCLUDE_FROM_TESTING ${header_template_sources}
|
||||||
vtkm_install_template_sources(${header_template_sources})
|
)
|
||||||
|
|
||||||
add_subdirectory(internal)
|
add_subdirectory(internal)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user