Only add the rules to run openmp tests serially when testing is enabled

This commit is contained in:
Robert Maynard 2018-08-08 15:46:32 -04:00
parent a3fe97709c
commit c332dbd0a1

@ -34,13 +34,15 @@ set(unit_tests
)
vtkm_unit_tests(OpenMP SOURCES ${unit_tests})
#We need to have all OpenMP tests run serially as they
#will uses all the system cores, and we will cause a N*N thread
#explosion which causes the tests to run slower than when run
#serially
foreach (test ${unit_tests})
get_filename_component(tname ${test} NAME_WE)
set_tests_properties(${tname} PROPERTIES
RUN_SERIAL True
)
endforeach()
if (VTKm_ENABLE_TESTING)
#We need to have all OpenMP tests run serially as they
#will uses all the system cores, and we will cause a N*N thread
#explosion which causes the tests to run slower than when run
#serially
foreach (test ${unit_tests})
get_filename_component(tname ${test} NAME_WE)
set_tests_properties(${tname} PROPERTIES
RUN_SERIAL True
)
endforeach()
endif()