percona/percona-server
cmake/compiler_features.cmake
:123
CHECK_CXX_SOURCE_RUNS("
#if defined(_MSC_VER) && !defined(__thread)
#define __thread __declspec(thread)
#endif
int main() {
static __thread int tls;
return 0;
}
" HAVE_THREAD_LOCAL)