1
0
mirror of https://github.com/google/cpu_features.git synced 2025-06-30 21:02:34 +02:00

Remove need for utsname (#136)

This commit is contained in:
Guillaume Chatelet
2020-10-09 22:40:06 +02:00
committed by GitHub
parent 4795373db2
commit e63405f118
3 changed files with 39 additions and 58 deletions

View File

@ -91,11 +91,6 @@ macro(add_cpu_features_headers_and_sources HDRS_LIST_NAME SRCS_LIST_NAME)
endif()
endmacro()
if(UNIX AND PROCESSOR_IS_X86)
check_include_file(sys/utsname.h HAVE_UTSNAME_H)
endif()
#
# library : utils
#
@ -154,9 +149,6 @@ target_include_directories(cpu_features
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cpu_features>
)
if(PROCESSOR_IS_X86)
if(HAVE_UTSNAME_H)
target_compile_definitions(cpu_features PRIVATE HAVE_UTSNAME_H)
endif()
if(APPLE)
target_compile_definitions(cpu_features PRIVATE HAVE_SYSCTLBYNAME)
endif()