mirror of
https://github.com/zlib-ng/minizip-ng
synced 2025-03-28 21:13:18 +00:00
Define GCC pragmas only for GCC compiler
This commit is contained in:
parent
5083bef59f
commit
616815fc8e
@ -53,6 +53,10 @@ if(UNIX)
|
||||
add_definitions(-D_FILE_OFFSET_BIT=64)
|
||||
endif()
|
||||
|
||||
if (CMAKE_C_COMPILER MATCHES ".*clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -msse4.1 -maes")
|
||||
endif ()
|
||||
|
||||
# create minizip library
|
||||
add_library(minizip ${MINIZIP_SRC} ${MINIZIP_PUBLIC_HEADERS})
|
||||
target_link_libraries(minizip ZLIB::ZLIB)
|
||||
|
@ -42,9 +42,13 @@ INLINE int has_aes_ni(void)
|
||||
#elif defined( __GNUC__ )
|
||||
|
||||
#include <cpuid.h>
|
||||
|
||||
#if !defined(__clang__)
|
||||
#pragma GCC target ("ssse3")
|
||||
#pragma GCC target ("sse4.1")
|
||||
#pragma GCC target ("aes")
|
||||
#endif
|
||||
|
||||
#include <x86intrin.h>
|
||||
#define INLINE static __inline
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user