diff options
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 0d62529..5540b53 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -91,6 +91,21 @@ endif (WIN32) set(CMOCKA_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "cmocka required system libraries") # OPTIONS +check_c_source_compiles(" +__thread int tls; + +int main(void) { + return 0; +}" HAVE_GCC_THREAD_LOCAL_STORAGE) + +if (WIN32) +check_c_source_compiles(" +__declspec(thread) int tls; + +int main(void) { + return 0; +}" HAVE_MSVC_THREAD_LOCAL_STORAGE) +endif(WIN32) # ENDIAN if (NOT WIN32) |