Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -275,6 +275,10 @@ add_definitions(-DLIBCXXABI_HAS_NO_THREADS=1) endif() +if (LIBCXXABI_HAS_PTHREAD_API) + add_definitions(-D_LIBCPP_HAS_THREAD_API_PTHREAD) +endif() + # This is the _ONLY_ place where add_definitions is called. if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS)