testing/Testing.h when VTKm_ENABLE_TESTING_LIBRARY

This commit is contained in:
Vicente Adolfo Bolea Sanchez 2021-10-01 13:17:13 -04:00
parent a607679cb1
commit 557124f6fc
2 changed files with 49 additions and 47 deletions

@ -89,9 +89,9 @@ endif()
add_subdirectory(thirdparty/optionparser)
add_subdirectory(thirdparty/lcl)
if (VTKm_ENABLE_TESTING)
if(VTKm_ENABLE_TESTING_LIBRARY)
add_subdirectory(testing)
endif ()
endif()
add_subdirectory(internal)
#-----------------------------------------------------------------------------

@ -15,53 +15,55 @@ set(headers
VTKM_declare_headers(${headers})
set(unit_tests
UnitTestBinaryPredicates.cxx
UnitTestBinaryOperators.cxx
UnitTestBounds.cxx
UnitTestCellShape.cxx
UnitTestDeprecated.cxx
UnitTestExceptions.cxx
UnitTestHash.cxx
UnitTestList.cxx
UnitTestListTag.cxx
UnitTestMatrix.cxx
UnitTestNewtonsMethod.cxx
UnitTestNoAssert.cxx
UnitTestPair.cxx
UnitTestRange.cxx
UnitTestTesting.cxx
UnitTestTransform3D.cxx
UnitTestTuple.cxx
UnitTestTypeList.cxx
UnitTestTypeListTag.cxx
UnitTestTypes.cxx
UnitTestTypeTraits.cxx
UnitTestUnaryPredicates.cxx
UnitTestVecAxisAlignedPointCoordinates.cxx
UnitTestVecFromPortal.cxx
UnitTestVecFromPortalPermute.cxx
UnitTestVectorAnalysis.cxx
UnitTestVecFlat.cxx
UnitTestVecTraits.cxx
UnitTestVecVariable.cxx
)
if(VTKm_ENABLE_TESTING)
set(unit_tests
UnitTestBinaryPredicates.cxx
UnitTestBinaryOperators.cxx
UnitTestBounds.cxx
UnitTestCellShape.cxx
UnitTestDeprecated.cxx
UnitTestExceptions.cxx
UnitTestHash.cxx
UnitTestList.cxx
UnitTestListTag.cxx
UnitTestMatrix.cxx
UnitTestNewtonsMethod.cxx
UnitTestNoAssert.cxx
UnitTestPair.cxx
UnitTestRange.cxx
UnitTestTesting.cxx
UnitTestTransform3D.cxx
UnitTestTuple.cxx
UnitTestTypeList.cxx
UnitTestTypeListTag.cxx
UnitTestTypes.cxx
UnitTestTypeTraits.cxx
UnitTestUnaryPredicates.cxx
UnitTestVecAxisAlignedPointCoordinates.cxx
UnitTestVecFromPortal.cxx
UnitTestVecFromPortalPermute.cxx
UnitTestVectorAnalysis.cxx
UnitTestVecFlat.cxx
UnitTestVecTraits.cxx
UnitTestVecVariable.cxx
)
# Unit tests that have device-specific code to be tested
set(unit_tests_device
UnitTestAlgorithms.cxx
UnitTestAtomic.cxx
UnitTestGeometry.cxx
UnitTestLowerBound.cxx
UnitTestMath.cxx
UnitTestUpperBound.cxx
)
# Unit tests that have device-specific code to be tested
set(unit_tests_device
UnitTestAlgorithms.cxx
UnitTestAtomic.cxx
UnitTestGeometry.cxx
UnitTestLowerBound.cxx
UnitTestMath.cxx
UnitTestUpperBound.cxx
)
#variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
set_source_files_properties(UnitTestBounds.cxx PROPERTIES
COMPILE_OPTIONS "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:GNU>>:-fno-var-tracking-assignments>")
#variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
set_source_files_properties(UnitTestBounds.cxx PROPERTIES
COMPILE_OPTIONS "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:GNU>>:-fno-var-tracking-assignments>")
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(NAME UnitTests_vtkm_testing_device SOURCES ${unit_tests_device} ALL_BACKENDS)
vtkm_unit_tests(NAME UnitTests_vtkm_testing_device SOURCES ${unit_tests_device} ALL_BACKENDS)
endif()