vtk-m2/vtkm/testing/CMakeLists.txt
Kenneth Moreland ebbebd7369 Add atomic free functions
Previously, all atomic functions were stored in classes named
`AtomicInterfaceControl` and `AtomicInterfaceExecution`, which required
you to know at compile time which device was using the methods. That in
turn means that anything using an atomic needed to be templated on the
device it is running on.

That can be a big hassle (and is problematic for some code structure).
Instead, these methods are moved to free functions in the `vtkm`
namespace. These functions operate like those in `Math.h`. Using
compiler directives, an appropriate version of the function is compiled
for the current device the compiler is using.
2020-08-20 13:40:43 -06:00

67 lines
1.8 KiB
CMake

##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##============================================================================
set(headers
Testing.h
VecTraitsTests.h
)
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
UnitTestVecTraits.cxx
UnitTestVecVariable.cxx
)
# Unit tests that have device-specific code to be tested
set(unit_tests_device
UnitTestAlgorithms.cxx
UnitTestAtomic.cxx
UnitTestGeometry.cxx
UnitTestMath.cxx
)
#suppress gcc note:
#variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
if (VTKM_COMPILER_IS_GNU)
set_source_files_properties(UnitTestBounds.cxx PROPERTIES COMPILE_OPTIONS "-fno-var-tracking-assignments")
endif()
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(NAME UnitTests_vtkm_testing_device SOURCES ${unit_tests_device} ALL_BACKENDS)