summaryrefslogtreecommitdiff
path: root/cmake/thread_local.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/thread_local.cmake')
-rw-r--r--cmake/thread_local.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/thread_local.cmake b/cmake/thread_local.cmake
new file mode 100644
index 0000000000..e0031d8439
--- /dev/null
+++ b/cmake/thread_local.cmake
@@ -0,0 +1,10 @@
+include(WriteCompilerDetectionHeader)
+
+write_compiler_detection_header(
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/compilerchecks/thread_local_compiler_detection.h"
+ PREFIX MB
+ COMPILERS GNU Clang AppleClang MSVC Intel
+ FEATURES cxx_thread_local
+)
+
+add_definitions(-DDETECT_THREAD_LOCAL)