mirror of
https://github.com/anrieff/libcpuid
synced 2025-02-22 20:25:04 +00:00
Do not warn about deprecated declarations in cpu_ident_internal()
This commit is contained in:
parent
549206f59e
commit
7456289072
2 changed files with 6 additions and 1 deletions
|
@ -55,7 +55,7 @@ if(UNIX)
|
||||||
set(exec_prefix "\${prefix}")
|
set(exec_prefix "\${prefix}")
|
||||||
set(libdir "\${exec_prefix}/lib")
|
set(libdir "\${exec_prefix}/lib")
|
||||||
set(includedir "\${prefix}/include")
|
set(includedir "\${prefix}/include")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security -Wunused-parameter -Wno-deprecated-declarations")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wuninitialized -Wstrict-prototypes -Wformat -Wformat-security -Wunused-parameter -Wdeprecated-declarations")
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcpuid.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcpuid.pc" ESCAPE_QUOTES
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libcpuid.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libcpuid.pc" ESCAPE_QUOTES
|
||||||
@ONLY)
|
@ONLY)
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/libcpuid.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
install(FILES "${PROJECT_BINARY_DIR}/libcpuid.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||||
|
|
|
@ -1381,6 +1381,11 @@ int cpu_ident_internal(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBCPUID_DISABLE_DEPRECATED
|
#ifndef LIBCPUID_DISABLE_DEPRECATED
|
||||||
|
# if defined(__GNUC__) || defined(GNUC)
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# elif defined(__clang__)
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# endif
|
||||||
/* Backward compatibility */
|
/* Backward compatibility */
|
||||||
/* - Deprecated since v0.5.0 */
|
/* - Deprecated since v0.5.0 */
|
||||||
data->l1_assoc = data->l1_data_assoc;
|
data->l1_assoc = data->l1_data_assoc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue