mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Merge topic 'correct_undefined_behavior_in_TaskTiling'
3c85f7f40 Correct undefined behavior from missing export on ErrorMessageBuffer e298e05bc Test will now fail if programs such as UBSAN output "runtime error" feb66f970 Make VTK-m use consistent symbol visibility for benchmarks b43d61533 Make VTK-m use consistent symbol visibility for tests. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1699
This commit is contained in:
commit
e8f3b1233d
@ -364,6 +364,12 @@ function(vtkm_unit_tests)
|
||||
set_property(TARGET ${test_prog} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${VTKm_LIBRARY_OUTPUT_PATH})
|
||||
set_property(TARGET ${test_prog} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${VTKm_EXECUTABLE_OUTPUT_PATH})
|
||||
|
||||
if(NOT VTKm_USE_DEFAULT_SYMBOL_VISIBILITY)
|
||||
set_property(TARGET ${test_prog} PROPERTY CUDA_VISIBILITY_PRESET "hidden")
|
||||
set_property(TARGET ${test_prog} PROPERTY CXX_VISIBILITY_PRESET "hidden")
|
||||
endif()
|
||||
|
||||
|
||||
#Starting in CMake 3.13, cmake will properly drop duplicate libraries
|
||||
#from the link line so this workaround can be dropped
|
||||
if (CMAKE_VERSION VERSION_LESS 3.13 AND "vtkm_rendering" IN_LIST VTKm_UT_LIBRARIES)
|
||||
@ -417,6 +423,11 @@ function(vtkm_unit_tests)
|
||||
TIMEOUT ${timeout}
|
||||
RUN_SERIAL ${run_serial}
|
||||
)
|
||||
|
||||
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
||||
FAIL_REGULAR_EXPRESSION "runtime error"
|
||||
)
|
||||
|
||||
endforeach (test)
|
||||
endforeach(current_backend)
|
||||
|
||||
|
@ -21,11 +21,16 @@ function(add_benchmark)
|
||||
target_link_libraries(${exe_name} PRIVATE ${VTKm_AB_LIBS})
|
||||
set_target_properties(${exe_name} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${VTKm_EXECUTABLE_OUTPUT_PATH}
|
||||
)
|
||||
CXX_VISIBILITY_PRESET "hidden"
|
||||
)
|
||||
|
||||
set_property(TARGET ${exe_name} PROPERTY "hidden")
|
||||
if (TARGET vtkm::cuda)
|
||||
set_source_files_properties(${VTKm_AB_FILE} PROPERTIES LANGUAGE "CUDA")
|
||||
set_property(TARGET ${exe_name} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
|
||||
set_target_properties(${exe_name} PROPERTIES
|
||||
CUDA_VISIBILITY_PRESET "hidden"
|
||||
CUDA_SEPARABLE_COMPILATION ON
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace exec
|
||||
/// This class contains a public method named RaiseError that can be called in
|
||||
/// the execution environment to signal a problem.
|
||||
///
|
||||
class FunctorBase
|
||||
class VTKM_NEVER_EXPORT FunctorBase
|
||||
{
|
||||
public:
|
||||
VTKM_EXEC_CONT
|
||||
|
@ -30,7 +30,7 @@ namespace internal
|
||||
/// Before scheduling worklets, the global array should be cleared to have no
|
||||
/// error. This can only be reliably done by the device adapter.
|
||||
///
|
||||
class ErrorMessageBuffer
|
||||
class VTKM_NEVER_EXPORT ErrorMessageBuffer
|
||||
{
|
||||
public:
|
||||
VTKM_EXEC_CONT ErrorMessageBuffer()
|
||||
|
@ -61,7 +61,7 @@ namespace internal
|
||||
/// operator() const is added to implement an algorithm in VTK-m. Different
|
||||
/// worklets have different calling semantics.
|
||||
///
|
||||
class WorkletBase : public vtkm::exec::FunctorBase
|
||||
class VTKM_NEVER_EXPORT WorkletBase : public vtkm::exec::FunctorBase
|
||||
{
|
||||
public:
|
||||
using _1 = vtkm::placeholders::Arg<1>;
|
||||
|
Loading…
Reference in New Issue
Block a user