samples: fix build without threading support

This commit is contained in:
Alexander Alekhin
2021-10-19 09:28:12 +00:00
parent 0e86e292e4
commit 6d5fdfbf73
3 changed files with 24 additions and 6 deletions
@@ -4,6 +4,17 @@
#include <list>
#include <iostream>
#if !defined(HAVE_THREADS)
int main()
{
std::cout << "This sample is built without threading support. Sample code is disabled." << std::endl;
return 0;
}
#else
#include <thread>
#include <mutex>
#include <condition_variable>
@@ -200,3 +211,5 @@ int main()
return 0;
}
#endif