Skip to content

Commit 9046f3c

Browse files
committed
Merge pull request #372 from fran6co/stdlib
stdlib threading is only available for c++11
2 parents 33eb61c + 96d49c5 commit 9046f3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/protonect/cmake_modules/SetupLibfreenect2Threading.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
INCLUDE(CheckCXXSourceCompiles)
22

3+
IF(COMPILER_SUPPORTS_CXX0X OR COMPILER_SUPPORTS_CXX11)
34
CHECK_CXX_SOURCE_COMPILES("
45
#include <thread>
56
#include <mutex>
@@ -12,12 +13,13 @@ int main(int argc, char** argv) {
1213
std::lock_guard<std::mutex> lock_guard(mutex);
1314
std::unique_lock<std::mutex> unique_lock(mutex);
1415
std::condition_variable condition_variable;
15-
thread_local int i;
16+
//thread_local int i; // libfreenect is not using this feature, Mac OSX doesn't support it
1617
1718
return 0;
1819
}
1920
2021
" LIBFREENECT2_THREADING_STDLIB)
22+
ENDIF()
2123

2224
IF(LIBFREENECT2_THREADING_STDLIB)
2325
SET(LIBFREENECT2_THREADING "stdlib")

0 commit comments

Comments
 (0)