mirror of
https://github.com/brave-experiments/DiStefano.git
synced 2026-01-10 04:27:57 -05:00
Add forgotten makefile 2
This commit is contained in:
571
src/boringssl/crypto/CMakeLists.txt
Normal file
571
src/boringssl/crypto/CMakeLists.txt
Normal file
@@ -0,0 +1,571 @@
|
||||
include_directories(../include)
|
||||
|
||||
if(NOT OPENSSL_NO_ASM)
|
||||
if(UNIX)
|
||||
if(ARCH STREQUAL "aarch64")
|
||||
# The "armx" Perl scripts look for "64" in the style argument
|
||||
# in order to decide whether to generate 32- or 64-bit asm.
|
||||
if(APPLE)
|
||||
set(PERLASM_STYLE ios64)
|
||||
else()
|
||||
set(PERLASM_STYLE linux64)
|
||||
endif()
|
||||
elseif(ARCH STREQUAL "arm")
|
||||
if(APPLE)
|
||||
set(PERLASM_STYLE ios32)
|
||||
else()
|
||||
set(PERLASM_STYLE linux32)
|
||||
endif()
|
||||
elseif(ARCH STREQUAL "ppc64le")
|
||||
set(PERLASM_STYLE linux64le)
|
||||
else()
|
||||
if(ARCH STREQUAL "x86")
|
||||
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(PERLASM_STYLE macosx)
|
||||
else()
|
||||
set(PERLASM_STYLE elf)
|
||||
endif()
|
||||
endif()
|
||||
set(ASM_EXT S)
|
||||
enable_language(ASM)
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
|
||||
|
||||
# Clang's integerated assembler does not support debug symbols.
|
||||
if(NOT CMAKE_ASM_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-g")
|
||||
endif()
|
||||
|
||||
# CMake does not add -isysroot and -arch flags to assembly.
|
||||
if(APPLE)
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
|
||||
endif()
|
||||
foreach(arch ${CMAKE_OSX_ARCHITECTURES})
|
||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -arch ${arch}")
|
||||
endforeach()
|
||||
endif()
|
||||
else()
|
||||
if(ARCH STREQUAL "aarch64")
|
||||
set(PERLASM_STYLE win64)
|
||||
set(ASM_EXT S)
|
||||
enable_language(ASM)
|
||||
else()
|
||||
if(ARCH STREQUAL "x86_64")
|
||||
set(PERLASM_STYLE nasm)
|
||||
else()
|
||||
set(PERLASM_STYLE win32n)
|
||||
set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2")
|
||||
endif()
|
||||
set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -gcv8")
|
||||
|
||||
# On Windows, we use the NASM output.
|
||||
set(ASM_EXT asm)
|
||||
enable_language(ASM_NASM)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(perlasm dest src)
|
||||
get_filename_component(dir ${dest} DIRECTORY)
|
||||
if(dir STREQUAL "")
|
||||
set(dir ".")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${dest}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${dir}
|
||||
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} ${dest}
|
||||
DEPENDS
|
||||
${src}
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/ppc-xlate.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
|
||||
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
|
||||
WORKING_DIRECTORY .
|
||||
)
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(fipsmodule)
|
||||
add_subdirectory(test)
|
||||
|
||||
if(FIPS_DELOCATE OR FIPS_SHARED)
|
||||
SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES EXTERNAL_OBJECT true)
|
||||
SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES GENERATED true)
|
||||
|
||||
set(
|
||||
CRYPTO_FIPS_OBJECTS
|
||||
|
||||
fipsmodule/bcm.o
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "arm")
|
||||
set(
|
||||
CRYPTO_ARCH_SOURCES
|
||||
|
||||
chacha/chacha-armv4.${ASM_EXT}
|
||||
curve25519/asm/x25519-asm-arm.S
|
||||
poly1305/poly1305_arm_asm.S
|
||||
test/trampoline-armv4.${ASM_EXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "aarch64")
|
||||
set(
|
||||
CRYPTO_ARCH_SOURCES
|
||||
|
||||
chacha/chacha-armv8.${ASM_EXT}
|
||||
test/trampoline-armv8.${ASM_EXT}
|
||||
cipher_extra/chacha20_poly1305_armv8.${ASM_EXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "ppc64le")
|
||||
set(
|
||||
CRYPTO_ARCH_SOURCES
|
||||
|
||||
test/trampoline-ppc.${ASM_EXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "x86")
|
||||
set(
|
||||
CRYPTO_ARCH_SOURCES
|
||||
|
||||
chacha/chacha-x86.${ASM_EXT}
|
||||
test/trampoline-x86.${ASM_EXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL "x86_64")
|
||||
set(
|
||||
CRYPTO_ARCH_SOURCES
|
||||
|
||||
chacha/chacha-x86_64.${ASM_EXT}
|
||||
cipher_extra/aes128gcmsiv-x86_64.${ASM_EXT}
|
||||
cipher_extra/chacha20_poly1305_x86_64.${ASM_EXT}
|
||||
hrss/asm/poly_rq_mul.S
|
||||
test/trampoline-x86_64.${ASM_EXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
perlasm(chacha/chacha-armv4.${ASM_EXT} chacha/asm/chacha-armv4.pl)
|
||||
perlasm(chacha/chacha-armv8.${ASM_EXT} chacha/asm/chacha-armv8.pl)
|
||||
perlasm(chacha/chacha-x86.${ASM_EXT} chacha/asm/chacha-x86.pl)
|
||||
perlasm(chacha/chacha-x86_64.${ASM_EXT} chacha/asm/chacha-x86_64.pl)
|
||||
perlasm(cipher_extra/aes128gcmsiv-x86_64.${ASM_EXT} cipher_extra/asm/aes128gcmsiv-x86_64.pl)
|
||||
perlasm(cipher_extra/chacha20_poly1305_x86_64.${ASM_EXT} cipher_extra/asm/chacha20_poly1305_x86_64.pl)
|
||||
perlasm(cipher_extra/chacha20_poly1305_armv8.${ASM_EXT} cipher_extra/asm/chacha20_poly1305_armv8.pl)
|
||||
perlasm(test/trampoline-armv4.${ASM_EXT} test/asm/trampoline-armv4.pl)
|
||||
perlasm(test/trampoline-armv8.${ASM_EXT} test/asm/trampoline-armv8.pl)
|
||||
perlasm(test/trampoline-ppc.${ASM_EXT} test/asm/trampoline-ppc.pl)
|
||||
perlasm(test/trampoline-x86.${ASM_EXT} test/asm/trampoline-x86.pl)
|
||||
perlasm(test/trampoline-x86_64.${ASM_EXT} test/asm/trampoline-x86_64.pl)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT err_data.c
|
||||
COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
|
||||
DEPENDS
|
||||
err/err_data_generate.go
|
||||
err/asn1.errordata
|
||||
err/bio.errordata
|
||||
err/bn.errordata
|
||||
err/cipher.errordata
|
||||
err/conf.errordata
|
||||
err/dh.errordata
|
||||
err/digest.errordata
|
||||
err/dsa.errordata
|
||||
err/ecdh.errordata
|
||||
err/ecdsa.errordata
|
||||
err/ec.errordata
|
||||
err/engine.errordata
|
||||
err/evp.errordata
|
||||
err/hkdf.errordata
|
||||
err/obj.errordata
|
||||
err/pem.errordata
|
||||
err/pkcs7.errordata
|
||||
err/pkcs8.errordata
|
||||
err/rsa.errordata
|
||||
err/ssl.errordata
|
||||
err/trust_token.errordata
|
||||
err/x509.errordata
|
||||
err/x509v3.errordata
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/err
|
||||
)
|
||||
|
||||
add_library(
|
||||
crypto
|
||||
|
||||
asn1/a_bitstr.c
|
||||
asn1/a_bool.c
|
||||
asn1/a_d2i_fp.c
|
||||
asn1/a_dup.c
|
||||
asn1/a_gentm.c
|
||||
asn1/a_i2d_fp.c
|
||||
asn1/a_int.c
|
||||
asn1/a_mbstr.c
|
||||
asn1/a_object.c
|
||||
asn1/a_octet.c
|
||||
asn1/a_print.c
|
||||
asn1/a_strex.c
|
||||
asn1/a_strnid.c
|
||||
asn1/a_time.c
|
||||
asn1/a_type.c
|
||||
asn1/a_utctm.c
|
||||
asn1/a_utf8.c
|
||||
asn1/asn1_lib.c
|
||||
asn1/asn1_par.c
|
||||
asn1/asn_pack.c
|
||||
asn1/f_int.c
|
||||
asn1/f_string.c
|
||||
asn1/tasn_dec.c
|
||||
asn1/tasn_enc.c
|
||||
asn1/tasn_fre.c
|
||||
asn1/tasn_new.c
|
||||
asn1/tasn_typ.c
|
||||
asn1/tasn_utl.c
|
||||
asn1/time_support.c
|
||||
base64/base64.c
|
||||
bio/bio.c
|
||||
bio/bio_mem.c
|
||||
bio/connect.c
|
||||
bio/fd.c
|
||||
bio/file.c
|
||||
bio/hexdump.c
|
||||
bio/pair.c
|
||||
bio/printf.c
|
||||
bio/socket.c
|
||||
bio/socket_helper.c
|
||||
blake2/blake2.c
|
||||
bn_extra/bn_asn1.c
|
||||
bn_extra/convert.c
|
||||
buf/buf.c
|
||||
bytestring/asn1_compat.c
|
||||
bytestring/ber.c
|
||||
bytestring/cbb.c
|
||||
bytestring/cbs.c
|
||||
bytestring/unicode.c
|
||||
chacha/chacha.c
|
||||
cipher_extra/cipher_extra.c
|
||||
cipher_extra/derive_key.c
|
||||
cipher_extra/e_aesctrhmac.c
|
||||
cipher_extra/e_aesgcmsiv.c
|
||||
cipher_extra/e_chacha20poly1305.c
|
||||
cipher_extra/e_des.c
|
||||
cipher_extra/e_null.c
|
||||
cipher_extra/e_rc2.c
|
||||
cipher_extra/e_rc4.c
|
||||
cipher_extra/e_tls.c
|
||||
cipher_extra/tls_cbc.c
|
||||
conf/conf.c
|
||||
cpu_aarch64_apple.c
|
||||
cpu_aarch64_fuchsia.c
|
||||
cpu_aarch64_linux.c
|
||||
cpu_aarch64_win.c
|
||||
cpu_arm_linux.c
|
||||
cpu_arm.c
|
||||
cpu_intel.c
|
||||
cpu_ppc64le.c
|
||||
crypto.c
|
||||
curve25519/curve25519.c
|
||||
curve25519/spake25519.c
|
||||
des/des.c
|
||||
dh_extra/params.c
|
||||
dh_extra/dh_asn1.c
|
||||
digest_extra/digest_extra.c
|
||||
dsa/dsa.c
|
||||
dsa/dsa_asn1.c
|
||||
ecdh_extra/ecdh_extra.c
|
||||
ecdsa_extra/ecdsa_asn1.c
|
||||
ec_extra/ec_asn1.c
|
||||
ec_extra/ec_derive.c
|
||||
ec_extra/hash_to_curve.c
|
||||
err/err.c
|
||||
err_data.c
|
||||
engine/engine.c
|
||||
evp/evp.c
|
||||
evp/evp_asn1.c
|
||||
evp/evp_ctx.c
|
||||
evp/p_dsa_asn1.c
|
||||
evp/p_ec.c
|
||||
evp/p_ec_asn1.c
|
||||
evp/p_ed25519.c
|
||||
evp/p_ed25519_asn1.c
|
||||
evp/p_hkdf.c
|
||||
evp/p_rsa.c
|
||||
evp/p_rsa_asn1.c
|
||||
evp/p_x25519.c
|
||||
evp/p_x25519_asn1.c
|
||||
evp/pbkdf.c
|
||||
evp/print.c
|
||||
evp/scrypt.c
|
||||
evp/sign.c
|
||||
ex_data.c
|
||||
hkdf/hkdf.c
|
||||
hpke/hpke.c
|
||||
hrss/hrss.c
|
||||
lhash/lhash.c
|
||||
mem.c
|
||||
obj/obj.c
|
||||
obj/obj_xref.c
|
||||
pem/pem_all.c
|
||||
pem/pem_info.c
|
||||
pem/pem_lib.c
|
||||
pem/pem_oth.c
|
||||
pem/pem_pk8.c
|
||||
pem/pem_pkey.c
|
||||
pem/pem_x509.c
|
||||
pem/pem_xaux.c
|
||||
pkcs7/pkcs7.c
|
||||
pkcs7/pkcs7_x509.c
|
||||
pkcs8/pkcs8.c
|
||||
pkcs8/pkcs8_x509.c
|
||||
pkcs8/p5_pbev2.c
|
||||
poly1305/poly1305.c
|
||||
poly1305/poly1305_arm.c
|
||||
poly1305/poly1305_vec.c
|
||||
pool/pool.c
|
||||
rand_extra/deterministic.c
|
||||
rand_extra/forkunsafe.c
|
||||
rand_extra/fuchsia.c
|
||||
rand_extra/passive.c
|
||||
rand_extra/rand_extra.c
|
||||
rand_extra/windows.c
|
||||
rc4/rc4.c
|
||||
refcount_c11.c
|
||||
refcount_lock.c
|
||||
rsa_extra/rsa_asn1.c
|
||||
rsa_extra/rsa_print.c
|
||||
stack/stack.c
|
||||
siphash/siphash.c
|
||||
thread.c
|
||||
thread_none.c
|
||||
thread_pthread.c
|
||||
thread_win.c
|
||||
trust_token/pmbtoken.c
|
||||
trust_token/trust_token.c
|
||||
trust_token/voprf.c
|
||||
x509/a_digest.c
|
||||
x509/a_sign.c
|
||||
x509/a_verify.c
|
||||
x509/algorithm.c
|
||||
x509/asn1_gen.c
|
||||
x509/by_dir.c
|
||||
x509/by_file.c
|
||||
x509/i2d_pr.c
|
||||
x509/name_print.c
|
||||
x509/rsa_pss.c
|
||||
x509/t_crl.c
|
||||
x509/t_req.c
|
||||
x509/t_x509.c
|
||||
x509/t_x509a.c
|
||||
x509/x509.c
|
||||
x509/x509_att.c
|
||||
x509/x509_cmp.c
|
||||
x509/x509_d2.c
|
||||
x509/x509_def.c
|
||||
x509/x509_ext.c
|
||||
x509/x509_lu.c
|
||||
x509/x509_obj.c
|
||||
x509/x509_req.c
|
||||
x509/x509_set.c
|
||||
x509/x509_trs.c
|
||||
x509/x509_txt.c
|
||||
x509/x509_v3.c
|
||||
x509/x509_vfy.c
|
||||
x509/x509_vpm.c
|
||||
x509/x509cset.c
|
||||
x509/x509name.c
|
||||
x509/x509rset.c
|
||||
x509/x509spki.c
|
||||
x509/x_algor.c
|
||||
x509/x_all.c
|
||||
x509/x_attrib.c
|
||||
x509/x_crl.c
|
||||
x509/x_exten.c
|
||||
x509/x_info.c
|
||||
x509/x_name.c
|
||||
x509/x_pkey.c
|
||||
x509/x_pubkey.c
|
||||
x509/x_req.c
|
||||
x509/x_sig.c
|
||||
x509/x_spki.c
|
||||
x509/x_val.c
|
||||
x509/x_x509.c
|
||||
x509/x_x509a.c
|
||||
x509v3/pcy_cache.c
|
||||
x509v3/pcy_data.c
|
||||
x509v3/pcy_lib.c
|
||||
x509v3/pcy_map.c
|
||||
x509v3/pcy_node.c
|
||||
x509v3/pcy_tree.c
|
||||
x509v3/v3_akey.c
|
||||
x509v3/v3_akeya.c
|
||||
x509v3/v3_alt.c
|
||||
x509v3/v3_bcons.c
|
||||
x509v3/v3_bitst.c
|
||||
x509v3/v3_conf.c
|
||||
x509v3/v3_cpols.c
|
||||
x509v3/v3_crld.c
|
||||
x509v3/v3_enum.c
|
||||
x509v3/v3_extku.c
|
||||
x509v3/v3_genn.c
|
||||
x509v3/v3_ia5.c
|
||||
x509v3/v3_info.c
|
||||
x509v3/v3_int.c
|
||||
x509v3/v3_lib.c
|
||||
x509v3/v3_ncons.c
|
||||
x509v3/v3_ocsp.c
|
||||
x509v3/v3_pci.c
|
||||
x509v3/v3_pcia.c
|
||||
x509v3/v3_pcons.c
|
||||
x509v3/v3_pmaps.c
|
||||
x509v3/v3_prn.c
|
||||
x509v3/v3_purp.c
|
||||
x509v3/v3_skey.c
|
||||
x509v3/v3_utl.c
|
||||
|
||||
$<TARGET_OBJECTS:fipsmodule>
|
||||
|
||||
${CRYPTO_ARCH_SOURCES}
|
||||
${CRYPTO_FIPS_OBJECTS}
|
||||
)
|
||||
target_include_directories(crypto INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
install(TARGETS crypto EXPORT OpenSSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set_property(TARGET crypto PROPERTY EXPORT_NAME Crypto)
|
||||
|
||||
if(FIPS_SHARED)
|
||||
# Rewrite libcrypto.so to inject the correct module hash value. This assumes
|
||||
# UNIX-style library naming, but we only support FIPS mode on Linux anyway.
|
||||
add_custom_command(
|
||||
TARGET crypto POST_BUILD
|
||||
COMMAND ${GO_EXECUTABLE} run
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../util/fipstools/inject_hash/inject_hash.go
|
||||
-o libcrypto.so -in-object libcrypto.so
|
||||
# The DEPENDS argument to a POST_BUILD rule appears to be ignored. Thus
|
||||
# go_executable isn't used (as it doesn't get built), but we list this
|
||||
# dependency anyway in case it starts working in some CMake version.
|
||||
DEPENDS ../util/fipstools/inject_hash/inject_hash.go
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(crypto global_target)
|
||||
|
||||
if(FIPS_DELOCATE OR FIPS_SHARED)
|
||||
add_dependencies(crypto bcm_o_target)
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C)
|
||||
|
||||
if(NOT WIN32 AND NOT ANDROID)
|
||||
target_link_libraries(crypto pthread)
|
||||
endif()
|
||||
|
||||
# Every target depends on crypto, so we add libcxx as a dependency here to
|
||||
# simplify injecting it everywhere.
|
||||
if(USE_CUSTOM_LIBCXX)
|
||||
target_link_libraries(crypto libcxx)
|
||||
endif()
|
||||
|
||||
# urandom_test is a separate binary because it needs to be able to observe the
|
||||
# PRNG initialisation, which means that it can't have other tests running before
|
||||
# it does.
|
||||
add_executable(
|
||||
urandom_test
|
||||
|
||||
fipsmodule/rand/urandom_test.cc
|
||||
)
|
||||
|
||||
target_link_libraries(urandom_test test_support_lib boringssl_gtest crypto)
|
||||
|
||||
add_dependencies(urandom_test global_target)
|
||||
add_dependencies(all_tests urandom_test)
|
||||
|
||||
add_executable(
|
||||
crypto_test
|
||||
|
||||
abi_self_test.cc
|
||||
asn1/asn1_test.cc
|
||||
base64/base64_test.cc
|
||||
bio/bio_test.cc
|
||||
blake2/blake2_test.cc
|
||||
buf/buf_test.cc
|
||||
bytestring/bytestring_test.cc
|
||||
chacha/chacha_test.cc
|
||||
cipher_extra/aead_test.cc
|
||||
cipher_extra/cipher_test.cc
|
||||
compiler_test.cc
|
||||
conf/conf_test.cc
|
||||
constant_time_test.cc
|
||||
cpu_arm_linux_test.cc
|
||||
crypto_test.cc
|
||||
curve25519/ed25519_test.cc
|
||||
curve25519/spake25519_test.cc
|
||||
curve25519/x25519_test.cc
|
||||
ecdh_extra/ecdh_test.cc
|
||||
dh_extra/dh_test.cc
|
||||
digest_extra/digest_test.cc
|
||||
dsa/dsa_test.cc
|
||||
err/err_test.cc
|
||||
evp/evp_extra_test.cc
|
||||
evp/evp_test.cc
|
||||
evp/pbkdf_test.cc
|
||||
evp/scrypt_test.cc
|
||||
fipsmodule/aes/aes_test.cc
|
||||
fipsmodule/bn/bn_test.cc
|
||||
fipsmodule/cmac/cmac_test.cc
|
||||
fipsmodule/ec/ec_test.cc
|
||||
fipsmodule/ec/p256-nistz_test.cc
|
||||
fipsmodule/ecdsa/ecdsa_test.cc
|
||||
fipsmodule/md5/md5_test.cc
|
||||
fipsmodule/modes/gcm_test.cc
|
||||
fipsmodule/rand/ctrdrbg_test.cc
|
||||
fipsmodule/rand/fork_detect_test.cc
|
||||
fipsmodule/service_indicator/service_indicator_test.cc
|
||||
fipsmodule/sha/sha_test.cc
|
||||
hkdf/hkdf_test.cc
|
||||
hpke/hpke_test.cc
|
||||
hmac_extra/hmac_test.cc
|
||||
hrss/hrss_test.cc
|
||||
impl_dispatch_test.cc
|
||||
lhash/lhash_test.cc
|
||||
obj/obj_test.cc
|
||||
pem/pem_test.cc
|
||||
pkcs7/pkcs7_test.cc
|
||||
pkcs8/pkcs8_test.cc
|
||||
pkcs8/pkcs12_test.cc
|
||||
poly1305/poly1305_test.cc
|
||||
pool/pool_test.cc
|
||||
rand_extra/rand_test.cc
|
||||
refcount_test.cc
|
||||
rsa_extra/rsa_test.cc
|
||||
self_test.cc
|
||||
stack/stack_test.cc
|
||||
siphash/siphash_test.cc
|
||||
test/file_test_gtest.cc
|
||||
thread_test.cc
|
||||
trust_token/trust_token_test.cc
|
||||
x509/x509_test.cc
|
||||
x509/x509_time_test.cc
|
||||
x509v3/tab_test.cc
|
||||
|
||||
$<TARGET_OBJECTS:crypto_test_data>
|
||||
$<TARGET_OBJECTS:boringssl_gtest_main>
|
||||
)
|
||||
|
||||
add_dependencies(crypto_test global_target)
|
||||
|
||||
target_link_libraries(crypto_test test_support_lib boringssl_gtest crypto)
|
||||
if(WIN32)
|
||||
target_link_libraries(crypto_test ws2_32)
|
||||
endif()
|
||||
add_dependencies(all_tests crypto_test)
|
||||
49
src/boringssl/decrepit/CMakeLists.txt
Normal file
49
src/boringssl/decrepit/CMakeLists.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
include_directories(../include)
|
||||
|
||||
add_library(
|
||||
decrepit
|
||||
|
||||
bio/base64_bio.c
|
||||
blowfish/blowfish.c
|
||||
cast/cast.c
|
||||
cast/cast_tables.c
|
||||
cfb/cfb.c
|
||||
des/cfb64ede.c
|
||||
dh/dh_decrepit.c
|
||||
dsa/dsa_decrepit.c
|
||||
evp/dss1.c
|
||||
evp/evp_do_all.c
|
||||
obj/obj_decrepit.c
|
||||
rc4/rc4_decrepit.c
|
||||
ripemd/ripemd.c
|
||||
rsa/rsa_decrepit.c
|
||||
ssl/ssl_decrepit.c
|
||||
x509/x509_decrepit.c
|
||||
xts/xts.c
|
||||
)
|
||||
|
||||
add_dependencies(decrepit global_target)
|
||||
|
||||
target_link_libraries(decrepit crypto ssl)
|
||||
|
||||
add_executable(
|
||||
decrepit_test
|
||||
|
||||
blowfish/blowfish_test.cc
|
||||
cast/cast_test.cc
|
||||
cfb/cfb_test.cc
|
||||
evp/evp_test.cc
|
||||
ripemd/ripemd_test.cc
|
||||
xts/xts_test.cc
|
||||
|
||||
$<TARGET_OBJECTS:boringssl_gtest_main>
|
||||
)
|
||||
|
||||
add_dependencies(decrepit_test global_target)
|
||||
|
||||
target_link_libraries(decrepit_test test_support_lib boringssl_gtest decrepit
|
||||
crypto)
|
||||
if(WIN32)
|
||||
target_link_libraries(decrepit_test ws2_32)
|
||||
endif()
|
||||
add_dependencies(all_tests decrepit_test)
|
||||
33
src/boringssl/fuzz/CMakeLists.txt
Normal file
33
src/boringssl/fuzz/CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
include_directories(../include)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-prototypes")
|
||||
|
||||
macro(fuzzer name)
|
||||
add_executable(${name} ${name}.cc)
|
||||
add_dependencies(${name} global_target)
|
||||
target_link_libraries(${name} crypto ${ARGN})
|
||||
if(LIBFUZZER_FROM_DEPS)
|
||||
set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=fuzzer-no-link")
|
||||
target_link_libraries(${name} Fuzzer)
|
||||
else()
|
||||
set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=fuzzer")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
fuzzer(arm_cpuinfo)
|
||||
fuzzer(bn_mod_exp)
|
||||
fuzzer(bn_div)
|
||||
fuzzer(privkey)
|
||||
fuzzer(cert)
|
||||
fuzzer(spki)
|
||||
fuzzer(pkcs8)
|
||||
fuzzer(pkcs12)
|
||||
fuzzer(read_pem)
|
||||
fuzzer(server ssl)
|
||||
fuzzer(client ssl)
|
||||
fuzzer(dtls_server ssl)
|
||||
fuzzer(dtls_client ssl)
|
||||
fuzzer(ssl_ctx_api ssl)
|
||||
fuzzer(session ssl)
|
||||
fuzzer(decode_client_hello_inner ssl)
|
||||
fuzzer(der_roundtrip)
|
||||
57
src/boringssl/rust/CMakeLists.txt
Normal file
57
src/boringssl/rust/CMakeLists.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
# additional interop for things like macros and inlined functions
|
||||
add_library(
|
||||
rust_wrapper
|
||||
STATIC
|
||||
rust_wrapper.c
|
||||
)
|
||||
|
||||
# generate architecture specific wrappers
|
||||
set(WRAPPER_TARGET ${CMAKE_BINARY_DIR}/rust/src/wrapper_${RUST_BINDINGS}.rs)
|
||||
set(COMMAND ${BINDGEN_EXECUTABLE} "wrapper.h"
|
||||
-o ${WRAPPER_TARGET}
|
||||
--no-derive-default
|
||||
--enable-function-attribute-detection
|
||||
--use-core
|
||||
--size_t-is-usize
|
||||
--default-macro-constant-type="signed"
|
||||
--rustified-enum="point_conversion_form_t"
|
||||
# These are not BoringSSL symbols, they are from glibc
|
||||
# and are not relevant to the build besides throwing warnings
|
||||
# about their 'long double' (aka u128) not being FFI safe.
|
||||
# We block those functions so that the build doesn't
|
||||
# spam warnings.
|
||||
#
|
||||
# https://github.com/rust-lang/rust-bindgen/issues/1549 describes the current problem
|
||||
# and other folks' solutions.
|
||||
#
|
||||
# We will explore migrating to https://github.com/rust-lang/rust-bindgen/pull/2122
|
||||
# when it lands
|
||||
--blocklist-function="strtold"
|
||||
--blocklist-function="qecvt"
|
||||
--blocklist-function="qecvt_r"
|
||||
--blocklist-function="qgcvt"
|
||||
--blocklist-function="qfcvt"
|
||||
--blocklist-function="qfcvt_r"
|
||||
-- # these are LLVM arg passthroughs
|
||||
-I../include
|
||||
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
|
||||
--target=${RUST_BINDINGS})
|
||||
|
||||
set(INCLUDES "include!(\"wrapper_${RUST_BINDINGS}.rs\");\n")
|
||||
|
||||
add_custom_target(
|
||||
bindgen_rust_${RUST_BINDINGS}
|
||||
ALL
|
||||
${COMMAND}
|
||||
BYPRODUCTS ${WRAPPER_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# move files into build directory
|
||||
configure_file("src/lib.rs" "src/lib.rs")
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
configure_file("build.rs" "build.rs" COPYONLY)
|
||||
endif()
|
||||
|
||||
configure_file("Cargo.toml" "Cargo.toml" COPYONLY)
|
||||
71
src/boringssl/ssl/CMakeLists.txt
Normal file
71
src/boringssl/ssl/CMakeLists.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
include_directories(../include)
|
||||
|
||||
add_library(
|
||||
ssl
|
||||
|
||||
bio_ssl.cc
|
||||
d1_both.cc
|
||||
d1_lib.cc
|
||||
d1_pkt.cc
|
||||
d1_srtp.cc
|
||||
dtls_method.cc
|
||||
dtls_record.cc
|
||||
encrypted_client_hello.cc
|
||||
extensions.cc
|
||||
handoff.cc
|
||||
handshake.cc
|
||||
handshake_client.cc
|
||||
handshake_server.cc
|
||||
s3_both.cc
|
||||
s3_lib.cc
|
||||
s3_pkt.cc
|
||||
ssl_aead_ctx.cc
|
||||
ssl_asn1.cc
|
||||
ssl_buffer.cc
|
||||
ssl_cert.cc
|
||||
ssl_cipher.cc
|
||||
ssl_file.cc
|
||||
ssl_key_share.cc
|
||||
ssl_lib.cc
|
||||
ssl_privkey.cc
|
||||
ssl_session.cc
|
||||
ssl_stat.cc
|
||||
ssl_transcript.cc
|
||||
ssl_versions.cc
|
||||
ssl_x509.cc
|
||||
t1_enc.cc
|
||||
tls_method.cc
|
||||
tls_record.cc
|
||||
tls13_both.cc
|
||||
tls13_client.cc
|
||||
tls13_enc.cc
|
||||
tls13_server.cc
|
||||
)
|
||||
target_include_directories(ssl INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
install(TARGETS ssl EXPORT OpenSSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set_property(TARGET ssl PROPERTY EXPORT_NAME SSL)
|
||||
|
||||
add_dependencies(ssl global_target)
|
||||
|
||||
target_link_libraries(ssl crypto)
|
||||
|
||||
add_executable(
|
||||
ssl_test
|
||||
|
||||
span_test.cc
|
||||
ssl_test.cc
|
||||
ssl_c_test.c
|
||||
|
||||
$<TARGET_OBJECTS:boringssl_gtest_main>
|
||||
)
|
||||
|
||||
add_dependencies(ssl_test global_target)
|
||||
|
||||
target_link_libraries(ssl_test test_support_lib boringssl_gtest ssl crypto)
|
||||
if(WIN32)
|
||||
target_link_libraries(ssl_test ws2_32)
|
||||
endif()
|
||||
add_dependencies(all_tests ssl_test)
|
||||
320
src/boringssl/third_party/googletest/CMakeLists.txt
vendored
Normal file
320
src/boringssl/third_party/googletest/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,320 @@
|
||||
########################################################################
|
||||
# Note: CMake support is community-based. The maintainers do not use CMake
|
||||
# internally.
|
||||
#
|
||||
# CMake build script for Google Test.
|
||||
#
|
||||
# To run the tests for Google Test itself on Linux, use 'make test' or
|
||||
# ctest. You can select which tests to run using 'ctest -R regex'.
|
||||
# For more options, run 'ctest --help'.
|
||||
|
||||
# When other libraries are using a shared version of runtime libraries,
|
||||
# Google Test also has to use one.
|
||||
option(
|
||||
gtest_force_shared_crt
|
||||
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
|
||||
OFF)
|
||||
|
||||
option(gtest_build_tests "Build all of gtest's own tests." OFF)
|
||||
|
||||
option(gtest_build_samples "Build gtest's sample programs." OFF)
|
||||
|
||||
option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
|
||||
|
||||
option(
|
||||
gtest_hide_internal_symbols
|
||||
"Build gtest with internal symbols hidden in shared libraries."
|
||||
OFF)
|
||||
|
||||
# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
|
||||
include(cmake/hermetic_build.cmake OPTIONAL)
|
||||
|
||||
if (COMMAND pre_project_set_up_hermetic_build)
|
||||
pre_project_set_up_hermetic_build()
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Project-wide settings
|
||||
|
||||
# Name of the project.
|
||||
#
|
||||
# CMake files in this project can refer to the root source directory
|
||||
# as ${gtest_SOURCE_DIR} and to the root binary directory as
|
||||
# ${gtest_BINARY_DIR}.
|
||||
# Language "C" is required for find_package(Threads).
|
||||
|
||||
# Project version:
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS 3.0)
|
||||
project(gtest CXX C)
|
||||
set(PROJECT_VERSION ${GOOGLETEST_VERSION})
|
||||
else()
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
if (POLICY CMP0063) # Visibility
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
endif (POLICY CMP0063)
|
||||
|
||||
if (COMMAND set_up_hermetic_build)
|
||||
set_up_hermetic_build()
|
||||
endif()
|
||||
|
||||
# These commands only run if this is the main project
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "gtest" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution")
|
||||
|
||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
|
||||
# make it prominent in the GUI.
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
||||
|
||||
else()
|
||||
|
||||
mark_as_advanced(
|
||||
gtest_force_shared_crt
|
||||
gtest_build_tests
|
||||
gtest_build_samples
|
||||
gtest_disable_pthreads
|
||||
gtest_hide_internal_symbols)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
if (gtest_hide_internal_symbols)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
endif()
|
||||
|
||||
# Define helper functions and macros used by Google Test.
|
||||
include(cmake/internal_utils.cmake)
|
||||
|
||||
config_compiler_and_linker() # Defined in internal_utils.cmake.
|
||||
|
||||
# Create the CMake package file descriptors.
|
||||
if (INSTALL_GTEST)
|
||||
include(CMakePackageConfigHelpers)
|
||||
set(cmake_package_name GTest)
|
||||
set(targets_export_name ${cmake_package_name}Targets CACHE INTERNAL "")
|
||||
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated" CACHE INTERNAL "")
|
||||
set(cmake_files_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${cmake_package_name}")
|
||||
set(version_file "${generated_dir}/${cmake_package_name}ConfigVersion.cmake")
|
||||
write_basic_package_version_file(${version_file} VERSION ${GOOGLETEST_VERSION} COMPATIBILITY AnyNewerVersion)
|
||||
install(EXPORT ${targets_export_name}
|
||||
NAMESPACE ${cmake_package_name}::
|
||||
DESTINATION ${cmake_files_install_dir})
|
||||
set(config_file "${generated_dir}/${cmake_package_name}Config.cmake")
|
||||
configure_package_config_file("${gtest_SOURCE_DIR}/cmake/Config.cmake.in"
|
||||
"${config_file}" INSTALL_DESTINATION ${cmake_files_install_dir})
|
||||
install(FILES ${version_file} ${config_file}
|
||||
DESTINATION ${cmake_files_install_dir})
|
||||
endif()
|
||||
|
||||
# Where Google Test's .h files can be found.
|
||||
set(gtest_build_include_dirs
|
||||
"${gtest_SOURCE_DIR}/include"
|
||||
"${gtest_SOURCE_DIR}")
|
||||
include_directories(${gtest_build_include_dirs})
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Defines the gtest & gtest_main libraries. User tests should link
|
||||
# with one of them.
|
||||
|
||||
# Google Test libraries. We build them using more strict warnings than what
|
||||
# are used for other targets, to ensure that gtest can be compiled by a user
|
||||
# aggressive about warnings.
|
||||
cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
|
||||
set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
|
||||
set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
|
||||
# If the CMake version supports it, attach header directory information
|
||||
# to the targets for when we are part of a parent build (ie being pulled
|
||||
# in via add_subdirectory() rather than being a standalone build).
|
||||
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(gtest SYSTEM INTERFACE
|
||||
"$<BUILD_INTERFACE:${gtest_build_include_dirs}>"
|
||||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
target_include_directories(gtest_main SYSTEM INTERFACE
|
||||
"$<BUILD_INTERFACE:${gtest_build_include_dirs}>"
|
||||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
endif()
|
||||
target_link_libraries(gtest_main PUBLIC gtest)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Install rules
|
||||
install_project(gtest gtest_main)
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Samples on how to link user tests with gtest or gtest_main.
|
||||
#
|
||||
# They are not built by default. To build them, set the
|
||||
# gtest_build_samples option to ON. You can do it by running ccmake
|
||||
# or specifying the -Dgtest_build_samples=ON flag when running cmake.
|
||||
|
||||
if (gtest_build_samples)
|
||||
cxx_executable(sample1_unittest samples gtest_main samples/sample1.cc)
|
||||
cxx_executable(sample2_unittest samples gtest_main samples/sample2.cc)
|
||||
cxx_executable(sample3_unittest samples gtest_main)
|
||||
cxx_executable(sample4_unittest samples gtest_main samples/sample4.cc)
|
||||
cxx_executable(sample5_unittest samples gtest_main samples/sample1.cc)
|
||||
cxx_executable(sample6_unittest samples gtest_main)
|
||||
cxx_executable(sample7_unittest samples gtest_main)
|
||||
cxx_executable(sample8_unittest samples gtest_main)
|
||||
cxx_executable(sample9_unittest samples gtest)
|
||||
cxx_executable(sample10_unittest samples gtest)
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Google Test's own tests.
|
||||
#
|
||||
# You can skip this section if you aren't interested in testing
|
||||
# Google Test itself.
|
||||
#
|
||||
# The tests are not built by default. To build them, set the
|
||||
# gtest_build_tests option to ON. You can do it by running ccmake
|
||||
# or specifying the -Dgtest_build_tests=ON flag when running cmake.
|
||||
|
||||
if (gtest_build_tests)
|
||||
# This must be set in the root directory for the tests to be run by
|
||||
# 'make test' or ctest.
|
||||
enable_testing()
|
||||
|
||||
############################################################
|
||||
# C++ tests built with standard compiler flags.
|
||||
|
||||
cxx_test(googletest-death-test-test gtest_main)
|
||||
cxx_test(gtest_environment_test gtest)
|
||||
cxx_test(googletest-filepath-test gtest_main)
|
||||
cxx_test(googletest-listener-test gtest_main)
|
||||
cxx_test(gtest_main_unittest gtest_main)
|
||||
cxx_test(googletest-message-test gtest_main)
|
||||
cxx_test(gtest_no_test_unittest gtest)
|
||||
cxx_test(googletest-options-test gtest_main)
|
||||
cxx_test(googletest-param-test-test gtest
|
||||
test/googletest-param-test2-test.cc)
|
||||
cxx_test(googletest-port-test gtest_main)
|
||||
cxx_test(gtest_pred_impl_unittest gtest_main)
|
||||
cxx_test(gtest_premature_exit_test gtest
|
||||
test/gtest_premature_exit_test.cc)
|
||||
cxx_test(googletest-printers-test gtest_main)
|
||||
cxx_test(gtest_prod_test gtest_main
|
||||
test/production.cc)
|
||||
cxx_test(gtest_repeat_test gtest)
|
||||
cxx_test(gtest_sole_header_test gtest_main)
|
||||
cxx_test(gtest_stress_test gtest)
|
||||
cxx_test(googletest-test-part-test gtest_main)
|
||||
cxx_test(gtest_throw_on_failure_ex_test gtest)
|
||||
cxx_test(gtest-typed-test_test gtest_main
|
||||
test/gtest-typed-test2_test.cc)
|
||||
cxx_test(gtest_unittest gtest_main)
|
||||
cxx_test(gtest-unittest-api_test gtest)
|
||||
cxx_test(gtest_skip_in_environment_setup_test gtest_main)
|
||||
cxx_test(gtest_skip_test gtest_main)
|
||||
|
||||
############################################################
|
||||
# C++ tests built with non-standard compiler flags.
|
||||
|
||||
# MSVC 7.1 does not support STL with exceptions disabled.
|
||||
if (NOT MSVC OR MSVC_VERSION GREATER 1310)
|
||||
cxx_library(gtest_no_exception "${cxx_no_exception}"
|
||||
src/gtest-all.cc)
|
||||
cxx_library(gtest_main_no_exception "${cxx_no_exception}"
|
||||
src/gtest-all.cc src/gtest_main.cc)
|
||||
endif()
|
||||
cxx_library(gtest_main_no_rtti "${cxx_no_rtti}"
|
||||
src/gtest-all.cc src/gtest_main.cc)
|
||||
|
||||
cxx_test_with_flags(gtest-death-test_ex_nocatch_test
|
||||
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
|
||||
gtest test/googletest-death-test_ex_test.cc)
|
||||
cxx_test_with_flags(gtest-death-test_ex_catch_test
|
||||
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
|
||||
gtest test/googletest-death-test_ex_test.cc)
|
||||
|
||||
cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
|
||||
gtest_main_no_rtti test/gtest_unittest.cc)
|
||||
|
||||
cxx_shared_library(gtest_dll "${cxx_default}"
|
||||
src/gtest-all.cc src/gtest_main.cc)
|
||||
|
||||
cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
|
||||
gtest_dll test/gtest_all_test.cc)
|
||||
set_target_properties(gtest_dll_test_
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
|
||||
|
||||
############################################################
|
||||
# Python tests.
|
||||
|
||||
cxx_executable(googletest-break-on-failure-unittest_ test gtest)
|
||||
py_test(googletest-break-on-failure-unittest)
|
||||
|
||||
py_test(gtest_skip_check_output_test)
|
||||
py_test(gtest_skip_environment_check_output_test)
|
||||
|
||||
# Visual Studio .NET 2003 does not support STL with exceptions disabled.
|
||||
if (NOT MSVC OR MSVC_VERSION GREATER 1310) # 1310 is Visual Studio .NET 2003
|
||||
cxx_executable_with_flags(
|
||||
googletest-catch-exceptions-no-ex-test_
|
||||
"${cxx_no_exception}"
|
||||
gtest_main_no_exception
|
||||
test/googletest-catch-exceptions-test_.cc)
|
||||
endif()
|
||||
|
||||
cxx_executable_with_flags(
|
||||
googletest-catch-exceptions-ex-test_
|
||||
"${cxx_exception}"
|
||||
gtest_main
|
||||
test/googletest-catch-exceptions-test_.cc)
|
||||
py_test(googletest-catch-exceptions-test)
|
||||
|
||||
cxx_executable(googletest-color-test_ test gtest)
|
||||
py_test(googletest-color-test)
|
||||
|
||||
cxx_executable(googletest-env-var-test_ test gtest)
|
||||
py_test(googletest-env-var-test)
|
||||
|
||||
cxx_executable(googletest-filter-unittest_ test gtest)
|
||||
py_test(googletest-filter-unittest)
|
||||
|
||||
cxx_executable(gtest_help_test_ test gtest_main)
|
||||
py_test(gtest_help_test)
|
||||
|
||||
cxx_executable(googletest-list-tests-unittest_ test gtest)
|
||||
py_test(googletest-list-tests-unittest)
|
||||
|
||||
cxx_executable(googletest-output-test_ test gtest)
|
||||
py_test(googletest-output-test --no_stacktrace_support)
|
||||
|
||||
cxx_executable(googletest-shuffle-test_ test gtest)
|
||||
py_test(googletest-shuffle-test)
|
||||
|
||||
# MSVC 7.1 does not support STL with exceptions disabled.
|
||||
if (NOT MSVC OR MSVC_VERSION GREATER 1310)
|
||||
cxx_executable(googletest-throw-on-failure-test_ test gtest_no_exception)
|
||||
set_target_properties(googletest-throw-on-failure-test_
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${cxx_no_exception}")
|
||||
py_test(googletest-throw-on-failure-test)
|
||||
endif()
|
||||
|
||||
cxx_executable(googletest-uninitialized-test_ test gtest)
|
||||
py_test(googletest-uninitialized-test)
|
||||
|
||||
cxx_executable(gtest_list_output_unittest_ test gtest)
|
||||
py_test(gtest_list_output_unittest)
|
||||
|
||||
cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
|
||||
cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
|
||||
py_test(gtest_xml_outfiles_test)
|
||||
py_test(googletest-json-outfiles-test)
|
||||
|
||||
cxx_executable(gtest_xml_output_unittest_ test gtest)
|
||||
py_test(gtest_xml_output_unittest --no_stacktrace_support)
|
||||
py_test(googletest-json-output-unittest --no_stacktrace_support)
|
||||
endif()
|
||||
41
src/boringssl/tool/CMakeLists.txt
Normal file
41
src/boringssl/tool/CMakeLists.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
include_directories(../include)
|
||||
|
||||
add_executable(
|
||||
bssl
|
||||
|
||||
args.cc
|
||||
ciphers.cc
|
||||
client.cc
|
||||
const.cc
|
||||
digest.cc
|
||||
fd.cc
|
||||
file.cc
|
||||
generate_ech.cc
|
||||
generate_ed25519.cc
|
||||
genrsa.cc
|
||||
pkcs12.cc
|
||||
rand.cc
|
||||
server.cc
|
||||
sign.cc
|
||||
speed.cc
|
||||
tool.cc
|
||||
transport_common.cc
|
||||
)
|
||||
install(TARGETS bssl DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
add_dependencies(bssl global_target)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(bssl ws2_32)
|
||||
endif()
|
||||
|
||||
if(APPLE OR WIN32 OR ANDROID)
|
||||
target_link_libraries(bssl ssl crypto)
|
||||
else()
|
||||
find_library(FOUND_LIBRT rt)
|
||||
if(FOUND_LIBRT)
|
||||
target_link_libraries(bssl ssl crypto -lrt)
|
||||
else()
|
||||
target_link_libraries(bssl ssl crypto)
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user