aboutsummaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-14 12:34:30 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-14 12:36:35 +0200
commit73309f19e582a712e78f54988fc51dbc5ab60bf4 (patch)
treeced9f0106753410aed6ab49d134936acbea0f65e /ConfigureChecks.cmake
parent6ad80bb4b2c1680e9447703b55b6a97b345e1f37 (diff)
downloadlibssh-73309f19e582a712e78f54988fc51dbc5ab60bf4.tar.gz
libssh-73309f19e582a712e78f54988fc51dbc5ab60bf4.tar.xz
libssh-73309f19e582a712e78f54988fc51dbc5ab60bf4.zip
cmake: Check if we have Thread Local Storage support.
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b0485d98..f73fc567 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -165,6 +165,20 @@ if (CMAKE_HAVE_THREADS_LIBRARY)
endif (CMAKE_HAVE_THREADS_LIBRARY)
# OPTIONS
+check_c_source_compiles("
+__thread int tls;
+
+int main(void) {
+ return 0;
+}" HAVE_GCC_THREAD_LOCAL_STORAGE)
+
+check_c_source_compiles("
+__declspec(thread) int tls;
+
+int main(void) {
+ return 0;
+}" HAVE_MSC_THREAD_LOCAL_STORAGE)
+
if (WITH_DEBUG_CRYPTO)
set(DEBUG_CRYPTO 1)
endif (WITH_DEBUG_CRYPTO)