diff --git a/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx b/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx index 530ba467b7e..ac25ff69f75 100644 --- a/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx @@ -83,10 +83,13 @@ itkMultiThreaderExceptionsTest(int, char *[]) using OutputImageType = itk::Image; - const std::set threadersToTest = { ThreaderEnum::Platform, ThreaderEnum::Pool }; + const std::set threadersToTest = { + ThreaderEnum::Platform, + ThreaderEnum::Pool, #ifdef ITK_USE_TBB - threadersToTest.insert(ThreaderEnum::TBB); + ThreaderEnum::TBB, #endif // ITK_USE_TBB + }; for (auto thType : threadersToTest) { itk::MultiThreaderBase::SetGlobalDefaultThreader(thType); diff --git a/Modules/Core/Common/test/itkMultiThreaderTypeFromEnvironmentTest.cxx b/Modules/Core/Common/test/itkMultiThreaderTypeFromEnvironmentTest.cxx index cdcbbe1e7c1..eca631127e5 100644 --- a/Modules/Core/Common/test/itkMultiThreaderTypeFromEnvironmentTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderTypeFromEnvironmentTest.cxx @@ -67,10 +67,13 @@ itkMultiThreaderTypeFromEnvironmentTest(int argc, char * argv[]) success &= checkThreaderByName(expectedThreaderType); // check that developer's choice for default is respected - const std::set threadersToTest = { ThreaderEnum::Platform, ThreaderEnum::Pool }; + const std::set threadersToTest = { + ThreaderEnum::Platform, + ThreaderEnum::Pool, #ifdef ITK_USE_TBB - threadersToTest.insert(ThreaderEnum::TBB); + ThreaderEnum::TBB, #endif // ITK_USE_TBB + }; for (auto thType : threadersToTest) { itk::MultiThreaderBase::SetGlobalDefaultThreader(thType);