diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-11-06 16:14:47 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-11-11 15:56:10 -0500 |
| commit | 9324d16e7356c1928d577a719eaaad264da58b13 (patch) | |
| tree | 6f2eb3bd05daf04104a8f298ee255b3ed7fd49df /src/CMakeLists.txt | |
| parent | ceddeed80a21f0d3a3396d90dd61fada361ed745 (diff) | |
| download | libgit2-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/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9812fc0e4..de8beefd8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,11 +81,11 @@ if(NEED_LIBRT) list(APPEND LIBGIT2_PC_LIBS "-lrt") endif() -if(THREADSAFE) +if(USE_THREADS) list(APPEND LIBGIT2_LIBS ${CMAKE_THREAD_LIBS_INIT}) list(APPEND LIBGIT2_PC_LIBS ${CMAKE_THREAD_LIBS_INIT}) endif() -add_feature_info(threadsafe THREADSAFE "threadsafe support") +add_feature_info(threadsafe USE_THREADS "threadsafe support") if(WIN32 AND EMBED_SSH_PATH) @@ -277,7 +277,7 @@ endif() add_feature_info(iconv GIT_USE_ICONV "iconv encoding conversion support") -if(THREADSAFE) +if(USE_THREADS) if(NOT WIN32) find_package(Threads REQUIRED) endif() |
