diff options
author | Chris Robinson <[email protected]> | 2014-08-11 13:38:43 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-08-11 13:38:43 -0700 |
commit | e3ee534c3961c4a7c9961019a242693e0da402ef (patch) | |
tree | 05c66a83cd52fd29307b60766c680c1c86b703c8 /CMakeLists.txt | |
parent | 8ecbeb4945441ed4d797905ee1c609c163dcd51b (diff) |
Check for GCC's __get_cpuid before using it
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
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) |