samples: fix build without threading support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user