summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-11 13:38:43 -0700
committerChris Robinson <[email protected]>2014-08-11 13:38:43 -0700
commite3ee534c3961c4a7c9961019a242693e0da402ef (patch)
tree05c66a83cd52fd29307b60766c680c1c86b703c8 /CMakeLists.txt
parent8ecbeb4945441ed4d797905ee1c609c163dcd51b (diff)
Check for GCC's __get_cpuid before using it
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b1fc772..cbb6844b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -360,6 +360,15 @@ IF(NOT HAVE_GUIDDEF_H)
CHECK_INCLUDE_FILE(initguid.h HAVE_INITGUID_H)
ENDIF()
+IF(HAVE_CPUID_H)
+ CHECK_C_SOURCE_COMPILES("#include <cpuid.h>
+ int main()
+ {
+ unsigned int eax, ebx, ecx, edx;
+ return __get_cpuid(0, eax, ebx, ecx, edx);
+ }" HAVE_GCC_GET_CPUID)
+ENDIF()
+
# Some systems need libm for some of the following math functions to work
CHECK_LIBRARY_EXISTS(m pow "" HAVE_LIBM)
IF(HAVE_LIBM)