X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=87f867dbf6490b6e7e786549d922ba69879883a2;hb=185ba4893778b9f2862c37383697e84140d3c70a;hp=061c182a8b09e60db85943ec1c30490a13971ff9;hpb=9d28cac4690e32eae94e180ea0d6d7ce0b6fc71d;p=platform%2Fupstream%2Fglog.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 061c182..87f867d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ include (CTest) include (DetermineGflagsNamespace) include (GNUInstallDirs) +set (CMAKE_DEBUG_POSTFIX d) set (CMAKE_THREAD_PREFER_PTHREAD 1) if (WITH_GFLAGS) @@ -194,6 +195,11 @@ int main() { return i; } " HAVE_NAMESPACES) check_cxx_source_compiles (" +__thread int tls; +int main() { } +" HAVE_GCC_TLS) + +check_cxx_source_compiles (" __declspec(thread) int tls; int main() { } " HAVE_MSVC_TLS) @@ -203,19 +209,15 @@ thread_local int tls; int main() { } " HAVE_CXX11_TLS) -check_cxx_source_compiles (" -__attribute__((thread)) int tls; -int main() { } -" HAVE_CYGWIN_TLS) - if (WITH_TLS) - if (HAVE_CYGWIN_TLS) - set (GLOG_THREAD_LOCAL_STORAGE "__attribute__((thread))") + # Cygwin does not support the thread attribute. Don't bother. + if (HAVE_GCC_TLS) + set (GLOG_THREAD_LOCAL_STORAGE "__thread") elseif (HAVE_MSVC_TLS) set (GLOG_THREAD_LOCAL_STORAGE "__declspec(thread)") elseif (HAVE_CXX11_TLS) set (GLOG_THREAD_LOCAL_STORAGE thread_local) - endif (HAVE_CYGWIN_TLS) + endif (HAVE_GCC_TLS) endif (WITH_TLS) set (_PC_FIELDS