@@ -310,29 +310,38 @@ add_library(CCryptoBoringSSL STATIC
310
310
"crypto/x509v3/v3_purp.c"
311
311
"crypto/x509v3/v3_skey.c"
312
312
"crypto/x509v3/v3_utl.c" )
313
- if (APPLE )
314
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64" )
315
- target_sources (CCryptoBoringSSL PRIVATE
316
- crypto/chacha/chacha-x86_64.mac.x86_64.S
317
- crypto/cipher_extra/aes128gcmsiv-x86_64.mac.x86_64.S
318
- crypto/cipher_extra/chacha20_poly1305_x86_64.mac.x86_64.S
319
- crypto/fipsmodule/aesni-gcm-x86_64.mac.x86_64.S
320
- crypto/fipsmodule/aesni-x86_64.mac.x86_64.S
321
- crypto/fipsmodule/ghash-ssse3-x86_64.mac.x86_64.S
322
- crypto/fipsmodule/ghash-x86_64.mac.x86_64.S
323
- crypto/fipsmodule/md5-x86_64.mac.x86_64.S
324
- crypto/fipsmodule/p256-x86_64-asm.mac.x86_64.S
325
- crypto/fipsmodule/p256_beeu-x86_64-asm.mac.x86_64.S
326
- crypto/fipsmodule/rdrand-x86_64.mac.x86_64.S
327
- crypto/fipsmodule/rsaz-avx2.mac.x86_64.S
328
- crypto/fipsmodule/sha1-x86_64.mac.x86_64.S
329
- crypto/fipsmodule/sha256-x86_64.mac.x86_64.S
330
- crypto/fipsmodule/sha512-x86_64.mac.x86_64.S
331
- crypto/fipsmodule/vpaes-x86_64.mac.x86_64.S
332
- crypto/fipsmodule/x86_64-mont.mac.x86_64.S
333
- crypto/fipsmodule/x86_64-mont5.mac.x86_64.S )
313
+
314
+ function (add_assembly_files )
315
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin )
316
+ set (platform_name mac )
317
+ elseif (CMAKE_SYSTEM_NAME STREQUAL Linux )
318
+ set (platform_name linux )
319
+ else ()
320
+ return ()
334
321
endif ()
335
- endif ()
322
+
323
+ target_sources (CCryptoBoringSSL PRIVATE
324
+ crypto/chacha/chacha-x86_64.${platform_name}.x86_64.S
325
+ crypto/cipher_extra/aes128gcmsiv-x86_64.${platform_name}.x86_64.S
326
+ crypto/cipher_extra/chacha20_poly1305_x86_64.${platform_name}.x86_64.S
327
+ crypto/fipsmodule/aesni-gcm-x86_64.${platform_name}.x86_64.S
328
+ crypto/fipsmodule/aesni-x86_64.${platform_name}.x86_64.S
329
+ crypto/fipsmodule/ghash-ssse3-x86_64.${platform_name}.x86_64.S
330
+ crypto/fipsmodule/ghash-x86_64.${platform_name}.x86_64.S
331
+ crypto/fipsmodule/md5-x86_64.${platform_name}.x86_64.S
332
+ crypto/fipsmodule/p256-x86_64-asm.${platform_name}.x86_64.S
333
+ crypto/fipsmodule/p256_beeu-x86_64-asm.${platform_name}.x86_64.S
334
+ crypto/fipsmodule/rdrand-x86_64.${platform_name}.x86_64.S
335
+ crypto/fipsmodule/rsaz-avx2.${platform_name}.x86_64.S
336
+ crypto/fipsmodule/sha1-x86_64.${platform_name}.x86_64.S
337
+ crypto/fipsmodule/sha256-x86_64.${platform_name}.x86_64.S
338
+ crypto/fipsmodule/sha512-x86_64.${platform_name}.x86_64.S
339
+ crypto/fipsmodule/vpaes-x86_64.${platform_name}.x86_64.S
340
+ crypto/fipsmodule/x86_64-mont.${platform_name}.x86_64.S
341
+ crypto/fipsmodule/x86_64-mont5.${platform_name}.x86_64.S )
342
+ endfunction ()
343
+
344
+ add_assembly_files ()
336
345
337
346
target_include_directories (CCryptoBoringSSL PUBLIC
338
347
include )
0 commit comments