summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-06 16:14:47 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 15:56:10 -0500
commit9324d16e7356c1928d577a719eaaad264da58b13 (patch)
tree6f2eb3bd05daf04104a8f298ee255b3ed7fd49df /src/thread.h
parentceddeed80a21f0d3a3396d90dd61fada361ed745 (diff)
downloadlibgit2-9324d16e7356c1928d577a719eaaad264da58b13.tar.gz
cmake: standardize USE_THREADS and USE_NSEC
Threading can now be disabled with `USE_THREADS=OFF` instead of `THREADSAFE=OFF` to better support the other cmake semantics. Nanosecond support is the default _if_ we can detect it. This should be our default always - like threads - and people can opt out explicitly.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread.h b/src/thread.h
index 4b091c0a2..82eb7fcab 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -12,7 +12,7 @@
#if defined(__clang__)
# if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 1))
-# error Atomic primitives do not exist on this version of clang; configure libgit2 with -DTHREADSAFE=OFF
+# error Atomic primitives do not exist on this version of clang; configure libgit2 with -DUSE_THREADS=OFF
# else
# define GIT_BUILTIN_ATOMIC
# endif
@@ -20,7 +20,7 @@
#elif defined(__GNUC__)
# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1))
-# error Atomic primitives do not exist on this version of gcc; configure libgit2 with -DTHREADSAFE=OFF
+# error Atomic primitives do not exist on this version of gcc; configure libgit2 with -DUSE_THREADS=OFF
# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
# define GIT_BUILTIN_ATOMIC
# else