Build: require C11/C++11 for all operating systems in master.

This is in preparation of upgrading our library dependencies, some of which
need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so
this just affects Linux.

On many distributions this will not require any changes, on some
install_deps.sh will need to be run again to rebuild libraries.

Differential Revision: https://developer.blender.org/D3568
This commit is contained in:
2018-07-25 16:59:46 +02:00
parent b59d85b5a5
commit 885cc4cf9a
20 changed files with 40 additions and 570 deletions

View File

@@ -26,11 +26,7 @@ thread::thread(function<void(void)> run_cb, int group)
joined_(false),
group_(group)
{
#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
thread_ = std::thread(&thread::run, this);
#else
pthread_create(&pthread_id_, NULL, run, (void*)this);
#endif
}
thread::~thread()
@@ -64,7 +60,6 @@ void *thread::run(void *arg)
bool thread::join()
{
joined_ = true;
#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
try {
thread_.join();
return true;
@@ -72,9 +67,6 @@ bool thread::join()
catch (const std::system_error&) {
return false;
}
#else
return pthread_join(pthread_id_, NULL) == 0;
#endif
}
CCL_NAMESPACE_END