1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-13 11:10:39 +00:00

Don't link with msrdriver.c on non-Windows platform. (#159)

This simplify the procedure of sanitizing unneeded blob in source.
This commit is contained in:
Zhu Zihao 2022-01-14 16:35:10 +08:00 committed by GitHub
commit 2e61160983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 3 deletions

View file

@ -5,9 +5,12 @@ set(cpuid_sources
rdtsc.c
libcpuid_util.c
rdmsr.c
msrdriver.c
asm-bits.c)
if(WIN32)
list(APPEND cpuid_sources msrdriver.c)
endif()
if("${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
list(APPEND cpuid_sources masm-x64.asm)
endif()

View file

@ -13,8 +13,11 @@ libcpuid_la_SOURCES = \
rdtsc.c \
asm-bits.c \
libcpuid_util.c \
rdmsr.c \
msrdriver.c
rdmsr.c
if WINDOWS
libcpuid_la_SOURCES += msrdriver.c
endif
libcpuid_la_DEPENDENCIES = \
$(srcdir)/libcpuid.sym