diff options
author | Cristi Vîjdea <cristi@cvjd.me> | 2020-03-19 11:46:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 10:46:52 +0100 |
commit | f503cb709ca181dbf5c73986ebac1b18ac5c9f63 (patch) | |
tree | a2b3fef9523640ce85930e90ec8eef51e244cd86 /CMakeLists.txt | |
parent | 36ac0feaf9654855ee090b1f042363ecfb256f31 (diff) | |
download | brotli-f503cb709ca181dbf5c73986ebac1b18ac5c9f63.zip brotli-f503cb709ca181dbf5c73986ebac1b18ac5c9f63.tar.gz brotli-f503cb709ca181dbf5c73986ebac1b18ac5c9f63.tar.bz2 |
Add HAVE_LOG2 build macro (#783)
* Add HAVE_LOG2 build macro
Fixes #781
* Rename macro to BROTLI_HAVE_LOG2 and move comment for visibility
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a8ea872..2520278 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,13 +110,16 @@ if(NOT LOG2_RES) CHECK_FUNCTION_EXISTS(log2 LOG2_LIBM_RES) if(LOG2_LIBM_RES) set(LIBM_LIBRARY "m") + add_definitions(-DBROTLI_HAVE_LOG2=1) else() - message(FATAL_ERROR "log2() not found") + add_definitions(-DBROTLI_HAVE_LOG2=0) endif() set(CMAKE_REQUIRED_LIBRARIES "${orig_req_libs}") unset(LOG2_LIBM_RES) unset(orig_req_libs) +else() + add_definitions(-DBROTLI_HAVE_LOG2=1) endif() unset(LOG2_RES) |