summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.cmake.in6
-rw-r--r--source/kit/c11/threads.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/config.cmake.in b/config.cmake.in
index 7909293..2638feb 100644
--- a/config.cmake.in
+++ b/config.cmake.in
@@ -1,6 +1,8 @@
@PACKAGE_INIT@
-include(CMakeFindDependencyMacro)
-find_dependency(Threads)
+if(NOT @KIT_DISABLE_SYSTEM_THREADS@)
+ include(CMakeFindDependencyMacro)
+ find_dependency(Threads)
+endif()
include("${CMAKE_CURRENT_LIST_DIR}/@KIT_TARGETS@.cmake")
diff --git a/source/kit/c11/threads.h b/source/kit/c11/threads.h
index f0a398a..2083429 100644
--- a/source/kit/c11/threads.h
+++ b/source/kit/c11/threads.h
@@ -75,7 +75,11 @@
* C++11 and above already have thread_local keyword
*/
# ifndef thread_local
-# define thread_local _Thread_local
+# if _MSC_VER
+# define thread_local __declspec(thread)
+# else
+# define thread_local _Thread_local
+# endif
# endif
#endif