diff options
author | Chris Robinson <[email protected]> | 2018-01-27 11:11:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-27 11:11:39 -0800 |
commit | 9718502e5db46952693d550c54ec35b0a44128d3 (patch) | |
tree | 14ee1ae3eaeb24bc7c837338b87395f0659115f0 /CMakeLists.txt | |
parent | 9613b4bfe24cbefba0f4c9c738ebd30d4b116970 (diff) |
Check for _BitScanForward64 before using it
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 29c0a3b7..8e3ee808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,6 +487,13 @@ IF(HAVE_INTRIN_H) __cpuid(regs, 0); return regs[0]; }" HAVE_CPUID_INTRINSIC) + CHECK_C_SOURCE_COMPILES("#include <intrin.h> + int main() + { + unsigned long idx = 0; + _BitScanForward64(&idx, 1); + return idx; + }" HAVE_BITSCANFORWARD64_INTRINSIC) ENDIF() CHECK_SYMBOL_EXISTS(sysconf unistd.h HAVE_SYSCONF) |