aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-27 11:19:59 -0800
committerChris Robinson <[email protected]>2018-01-27 14:34:05 -0800
commitf76ab02bd4fc13d6648d839374da966ef12201fd (patch)
treeb049aca85a332f798806443b635438ff8b9febf3 /CMakeLists.txt
parent4d392a8b870818662572ff2784e8ebab07714218 (diff)
Add a ctz64 fallback using _BitScanForward when available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e3ee808..b5c65c55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -494,6 +494,13 @@ IF(HAVE_INTRIN_H)
_BitScanForward64(&idx, 1);
return idx;
}" HAVE_BITSCANFORWARD64_INTRINSIC)
+ CHECK_C_SOURCE_COMPILES("#include <intrin.h>
+ int main()
+ {
+ unsigned long idx = 0;
+ _BitScanForward(&idx, 1);
+ return idx;
+ }" HAVE_BITSCANFORWARD_INTRINSIC)
ENDIF()
CHECK_SYMBOL_EXISTS(sysconf unistd.h HAVE_SYSCONF)