Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2016-10-18 19:32:12 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2016-10-18 20:19:45 +0300
commit2bc26c2772ad0a5d6b0ad4ba2ec77c8183d8932d (patch)
tree73eb04886c9dbd43bf29af9647e1de5c9473c574
parent8c01551f4ce2bf7482dfc293715f468ed6fb18d2 (diff)
Make building tests optional with an ENABLE_TESTS symbol
We don't need them in our fork and they cause issues such as https://github.com/mono/boringssl/issues/2
-rw-r--r--CMakeLists.txt4
-rw-r--r--crypto/CMakeLists.txt4
-rw-r--r--crypto/aes/CMakeLists.txt2
-rw-r--r--crypto/asn1/CMakeLists.txt2
-rw-r--r--crypto/base64/CMakeLists.txt2
-rw-r--r--crypto/bio/CMakeLists.txt2
-rw-r--r--crypto/bn/CMakeLists.txt2
-rw-r--r--crypto/bytestring/CMakeLists.txt2
-rw-r--r--crypto/cipher/CMakeLists.txt2
-rw-r--r--crypto/cmac/CMakeLists.txt2
-rw-r--r--crypto/curve25519/CMakeLists.txt2
-rw-r--r--crypto/dh/CMakeLists.txt2
-rw-r--r--crypto/digest/CMakeLists.txt2
-rw-r--r--crypto/dsa/CMakeLists.txt2
-rw-r--r--crypto/ec/CMakeLists.txt2
-rw-r--r--crypto/ecdsa/CMakeLists.txt2
-rw-r--r--crypto/err/CMakeLists.txt2
-rw-r--r--crypto/evp/CMakeLists.txt2
-rw-r--r--crypto/hkdf/CMakeLists.txt2
-rw-r--r--crypto/hmac/CMakeLists.txt2
-rw-r--r--crypto/lhash/CMakeLists.txt2
-rw-r--r--crypto/modes/CMakeLists.txt2
-rw-r--r--crypto/pkcs8/CMakeLists.txt2
-rw-r--r--crypto/poly1305/CMakeLists.txt2
-rw-r--r--crypto/rsa/CMakeLists.txt4
-rw-r--r--crypto/x509/CMakeLists.txt2
-rw-r--r--crypto/x509v3/CMakeLists.txt2
-rw-r--r--ssl/CMakeLists.txt2
-rw-r--r--ssl/pqueue/CMakeLists.txt2
29 files changed, 63 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e31f9a16..17776ae8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,11 +169,15 @@ endif()
# Declare a dummy target to build all unit tests. Test targets should inject
# themselves as dependencies next to the target definition.
+if(ENABLE_TESTS)
add_custom_target(all_tests)
+endif()
add_subdirectory(crypto)
add_subdirectory(ssl)
+if(ENABLE_TESTS)
add_subdirectory(ssl/test)
+endif()
add_subdirectory(tool)
add_subdirectory(decrepit)
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index ccbe60c7..23a1a505 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -138,7 +138,9 @@ add_subdirectory(x509v3)
add_subdirectory(pkcs8)
# Test support code
+if(ENABLE_TESTS)
add_subdirectory(test)
+endif()
set(
crypto_objects_dependencies
@@ -268,6 +270,7 @@ if(NOT MSVC AND NOT ANDROID)
target_link_libraries(crypto pthread)
endif()
+if(ENABLE_TESTS)
add_executable(
constant_time_test
@@ -298,3 +301,4 @@ add_executable(
target_link_libraries(refcount_test crypto)
add_dependencies(all_tests refcount_test)
+endif()
diff --git a/crypto/aes/CMakeLists.txt b/crypto/aes/CMakeLists.txt
index 0566e398..04705856 100644
--- a/crypto/aes/CMakeLists.txt
+++ b/crypto/aes/CMakeLists.txt
@@ -61,6 +61,7 @@ perlasm(aes-armv4.${ASM_EXT} asm/aes-armv4.pl)
perlasm(bsaes-armv7.${ASM_EXT} asm/bsaes-armv7.pl)
perlasm(aesv8-armx.${ASM_EXT} asm/aesv8-armx.pl)
+if(ENABLE_TESTS)
add_executable(
aes_test
@@ -70,3 +71,4 @@ add_executable(
target_link_libraries(aes_test crypto)
add_dependencies(all_tests aes_test)
+endif()
diff --git a/crypto/asn1/CMakeLists.txt b/crypto/asn1/CMakeLists.txt
index df48e26d..bd16f872 100644
--- a/crypto/asn1/CMakeLists.txt
+++ b/crypto/asn1/CMakeLists.txt
@@ -44,6 +44,7 @@ add_library(
x_long.c
)
+if(ENABLE_TESTS)
add_executable(
asn1_test
@@ -54,3 +55,4 @@ add_executable(
target_link_libraries(asn1_test crypto)
add_dependencies(all_tests asn1_test)
+endif()
diff --git a/crypto/base64/CMakeLists.txt b/crypto/base64/CMakeLists.txt
index 15ee6916..affcb482 100644
--- a/crypto/base64/CMakeLists.txt
+++ b/crypto/base64/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(
base64.c
)
+if(ENABLE_TESTS)
add_executable(
base64_test
@@ -18,3 +19,4 @@ add_executable(
target_link_libraries(base64_test crypto)
add_dependencies(all_tests base64_test)
+endif()
diff --git a/crypto/bio/CMakeLists.txt b/crypto/bio/CMakeLists.txt
index 7859b58d..c5766ddd 100644
--- a/crypto/bio/CMakeLists.txt
+++ b/crypto/bio/CMakeLists.txt
@@ -18,6 +18,7 @@ add_library(
socket_helper.c
)
+if(ENABLE_TESTS)
add_executable(
bio_test
@@ -31,3 +32,4 @@ if (WIN32)
target_link_libraries(bio_test ws2_32)
endif()
add_dependencies(all_tests bio_test)
+endif()
diff --git a/crypto/bn/CMakeLists.txt b/crypto/bn/CMakeLists.txt
index b9875d6d..81bca4d2 100644
--- a/crypto/bn/CMakeLists.txt
+++ b/crypto/bn/CMakeLists.txt
@@ -76,6 +76,7 @@ perlasm(x86-mont.${ASM_EXT} asm/x86-mont.pl)
perlasm(armv4-mont.${ASM_EXT} asm/armv4-mont.pl)
perlasm(armv8-mont.${ASM_EXT} asm/armv8-mont.pl)
+if(ENABLE_TESTS)
add_executable(
bn_test
@@ -86,3 +87,4 @@ add_executable(
target_link_libraries(bn_test crypto)
add_dependencies(all_tests bn_test)
+endif()
diff --git a/crypto/bytestring/CMakeLists.txt b/crypto/bytestring/CMakeLists.txt
index 362e702f..a1964b2e 100644
--- a/crypto/bytestring/CMakeLists.txt
+++ b/crypto/bytestring/CMakeLists.txt
@@ -11,6 +11,7 @@ add_library(
cbb.c
)
+if(ENABLE_TESTS)
add_executable(
bytestring_test
@@ -21,3 +22,4 @@ add_executable(
target_link_libraries(bytestring_test crypto)
add_dependencies(all_tests bytestring_test)
+endif()
diff --git a/crypto/cipher/CMakeLists.txt b/crypto/cipher/CMakeLists.txt
index 52b87b66..49e5c6d8 100644
--- a/crypto/cipher/CMakeLists.txt
+++ b/crypto/cipher/CMakeLists.txt
@@ -21,6 +21,7 @@ add_library(
e_ssl3.c
)
+if(ENABLE_TESTS)
add_executable(
cipher_test
@@ -38,3 +39,4 @@ add_executable(
target_link_libraries(cipher_test crypto)
target_link_libraries(aead_test crypto)
add_dependencies(all_tests cipher_test aead_test)
+endif()
diff --git a/crypto/cmac/CMakeLists.txt b/crypto/cmac/CMakeLists.txt
index a346b248..0c3bf0d1 100644
--- a/crypto/cmac/CMakeLists.txt
+++ b/crypto/cmac/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(
cmac.c
)
+if(ENABLE_TESTS)
add_executable(
cmac_test
@@ -18,3 +19,4 @@ add_executable(
target_link_libraries(cmac_test crypto)
add_dependencies(all_tests cmac_test)
+endif()
diff --git a/crypto/curve25519/CMakeLists.txt b/crypto/curve25519/CMakeLists.txt
index a2ef3bb2..90c5705e 100644
--- a/crypto/curve25519/CMakeLists.txt
+++ b/crypto/curve25519/CMakeLists.txt
@@ -27,6 +27,7 @@ add_library(
${CURVE25519_ARCH_SOURCES}
)
+if(ENABLE_TESTS)
add_executable(
ed25519_test
@@ -45,3 +46,4 @@ add_executable(
target_link_libraries(x25519_test crypto)
add_dependencies(all_tests x25519_test)
+endif()
diff --git a/crypto/dh/CMakeLists.txt b/crypto/dh/CMakeLists.txt
index f1e86162..2f3a6ded 100644
--- a/crypto/dh/CMakeLists.txt
+++ b/crypto/dh/CMakeLists.txt
@@ -11,6 +11,7 @@ add_library(
dh_asn1.c
)
+if(ENABLE_TESTS)
add_executable(
dh_test
@@ -21,3 +22,4 @@ add_executable(
target_link_libraries(dh_test crypto)
add_dependencies(all_tests dh_test)
+endif()
diff --git a/crypto/digest/CMakeLists.txt b/crypto/digest/CMakeLists.txt
index 7a68f6fe..f0a0b23f 100644
--- a/crypto/digest/CMakeLists.txt
+++ b/crypto/digest/CMakeLists.txt
@@ -9,6 +9,7 @@ add_library(
digests.c
)
+if(ENABLE_TESTS)
add_executable(
digest_test
@@ -19,3 +20,4 @@ add_executable(
target_link_libraries(digest_test crypto)
add_dependencies(all_tests digest_test)
+endif()
diff --git a/crypto/dsa/CMakeLists.txt b/crypto/dsa/CMakeLists.txt
index de365656..3cb7c349 100644
--- a/crypto/dsa/CMakeLists.txt
+++ b/crypto/dsa/CMakeLists.txt
@@ -9,6 +9,7 @@ add_library(
dsa_asn1.c
)
+if(ENABLE_TESTS)
add_executable(
dsa_test
@@ -19,3 +20,4 @@ add_executable(
target_link_libraries(dsa_test crypto)
add_dependencies(all_tests dsa_test)
+endif()
diff --git a/crypto/ec/CMakeLists.txt b/crypto/ec/CMakeLists.txt
index 4749484e..0d429e0b 100644
--- a/crypto/ec/CMakeLists.txt
+++ b/crypto/ec/CMakeLists.txt
@@ -30,6 +30,7 @@ add_library(
perlasm(p256-x86_64-asm.${ASM_EXT} asm/p256-x86_64-asm.pl)
+if(ENABLE_TESTS)
add_executable(
example_mul
@@ -49,3 +50,4 @@ add_executable(
target_link_libraries(example_mul crypto)
target_link_libraries(ec_test crypto)
add_dependencies(all_tests example_mul ec_test)
+endif()
diff --git a/crypto/ecdsa/CMakeLists.txt b/crypto/ecdsa/CMakeLists.txt
index 0cc672e8..f9af1ed7 100644
--- a/crypto/ecdsa/CMakeLists.txt
+++ b/crypto/ecdsa/CMakeLists.txt
@@ -10,6 +10,7 @@ add_library(
)
+if(ENABLE_TESTS)
add_executable(
ecdsa_test
@@ -20,3 +21,4 @@ add_executable(
target_link_libraries(ecdsa_test crypto)
add_dependencies(all_tests ecdsa_test)
+endif()
diff --git a/crypto/err/CMakeLists.txt b/crypto/err/CMakeLists.txt
index a9ac70a2..91510881 100644
--- a/crypto/err/CMakeLists.txt
+++ b/crypto/err/CMakeLists.txt
@@ -38,6 +38,7 @@ add_library(
err_data.c
)
+if(ENABLE_TESTS)
add_executable(
err_test
@@ -48,3 +49,4 @@ add_executable(
target_link_libraries(err_test crypto)
add_dependencies(all_tests err_test)
+endif()
diff --git a/crypto/evp/CMakeLists.txt b/crypto/evp/CMakeLists.txt
index 000f0762..d47a7e2d 100644
--- a/crypto/evp/CMakeLists.txt
+++ b/crypto/evp/CMakeLists.txt
@@ -20,6 +20,7 @@ add_library(
)
+if(ENABLE_TESTS)
add_executable(
evp_extra_test
@@ -48,3 +49,4 @@ target_link_libraries(evp_extra_test crypto)
target_link_libraries(evp_test crypto)
target_link_libraries(pbkdf_test crypto)
add_dependencies(all_tests evp_extra_test evp_test pbkdf_test)
+endif()
diff --git a/crypto/hkdf/CMakeLists.txt b/crypto/hkdf/CMakeLists.txt
index d9db933e..df9f0d0d 100644
--- a/crypto/hkdf/CMakeLists.txt
+++ b/crypto/hkdf/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(
hkdf.c
)
+if(ENABLE_TESTS)
add_executable(
hkdf_test
@@ -18,3 +19,4 @@ add_executable(
target_link_libraries(hkdf_test crypto)
add_dependencies(all_tests hkdf_test)
+endif()
diff --git a/crypto/hmac/CMakeLists.txt b/crypto/hmac/CMakeLists.txt
index 179a53b0..40b73bcd 100644
--- a/crypto/hmac/CMakeLists.txt
+++ b/crypto/hmac/CMakeLists.txt
@@ -9,6 +9,7 @@ add_library(
)
+if(ENABLE_TESTS)
add_executable(
hmac_test
@@ -19,3 +20,4 @@ add_executable(
target_link_libraries(hmac_test crypto)
add_dependencies(all_tests hmac_test)
+endif()
diff --git a/crypto/lhash/CMakeLists.txt b/crypto/lhash/CMakeLists.txt
index 4f4dea7c..f7a00dee 100644
--- a/crypto/lhash/CMakeLists.txt
+++ b/crypto/lhash/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(
lhash.c
)
+if(ENABLE_TESTS)
add_executable(
lhash_test
@@ -18,3 +19,4 @@ add_executable(
target_link_libraries(lhash_test crypto)
add_dependencies(all_tests lhash_test)
+endif()
diff --git a/crypto/modes/CMakeLists.txt b/crypto/modes/CMakeLists.txt
index 41f71d7e..6dae9f6a 100644
--- a/crypto/modes/CMakeLists.txt
+++ b/crypto/modes/CMakeLists.txt
@@ -54,6 +54,7 @@ perlasm(ghash-x86.${ASM_EXT} asm/ghash-x86.pl)
perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
+if(ENABLE_TESTS)
add_executable(
gcm_test
@@ -64,3 +65,4 @@ add_executable(
target_link_libraries(gcm_test crypto)
add_dependencies(all_tests gcm_test)
+endif()
diff --git a/crypto/pkcs8/CMakeLists.txt b/crypto/pkcs8/CMakeLists.txt
index 95501099..329e02b2 100644
--- a/crypto/pkcs8/CMakeLists.txt
+++ b/crypto/pkcs8/CMakeLists.txt
@@ -11,6 +11,7 @@ add_library(
p5_pbev2.c
)
+if(ENABLE_TESTS)
add_executable(
pkcs12_test
@@ -28,3 +29,4 @@ add_executable(
target_link_libraries(pkcs8_test crypto)
target_link_libraries(pkcs12_test crypto)
add_dependencies(all_tests pkcs8_test pkcs12_test)
+endif()
diff --git a/crypto/poly1305/CMakeLists.txt b/crypto/poly1305/CMakeLists.txt
index 1b6a8049..e1d5c746 100644
--- a/crypto/poly1305/CMakeLists.txt
+++ b/crypto/poly1305/CMakeLists.txt
@@ -20,6 +20,7 @@ add_library(
${POLY1305_ARCH_SOURCES}
)
+if(ENABLE_TESTS)
add_executable(
poly1305_test
@@ -29,3 +30,4 @@ add_executable(
target_link_libraries(poly1305_test crypto)
add_dependencies(all_tests poly1305_test)
+endif()
diff --git a/crypto/rsa/CMakeLists.txt b/crypto/rsa/CMakeLists.txt
index 969b753e..23db9a7a 100644
--- a/crypto/rsa/CMakeLists.txt
+++ b/crypto/rsa/CMakeLists.txt
@@ -12,6 +12,7 @@ add_library(
rsa_asn1.c
)
+if(ENABLE_TESTS)
add_executable(
rsa_test
@@ -21,4 +22,5 @@ add_executable(
)
target_link_libraries(rsa_test crypto)
-add_dependencies(all_tests rsa_test) \ No newline at end of file
+add_dependencies(all_tests rsa_test)
+endif() \ No newline at end of file
diff --git a/crypto/x509/CMakeLists.txt b/crypto/x509/CMakeLists.txt
index 2d92bf38..de98eedf 100644
--- a/crypto/x509/CMakeLists.txt
+++ b/crypto/x509/CMakeLists.txt
@@ -56,6 +56,7 @@ add_library(
x_x509a.c
)
+if(ENABLE_TESTS)
add_executable(
pkcs7_test
@@ -75,3 +76,4 @@ add_executable(
target_link_libraries(pkcs7_test crypto)
target_link_libraries(x509_test crypto)
add_dependencies(all_tests pkcs7_test x509_test)
+endif()
diff --git a/crypto/x509v3/CMakeLists.txt b/crypto/x509v3/CMakeLists.txt
index cf2474a4..fb5b76b9 100644
--- a/crypto/x509v3/CMakeLists.txt
+++ b/crypto/x509v3/CMakeLists.txt
@@ -43,6 +43,7 @@ add_library(
v3_utl.c
)
+if(ENABLE_TESTS)
add_executable(
v3name_test
@@ -64,3 +65,4 @@ add_executable(
target_link_libraries(tab_test crypto)
add_dependencies(all_tests tab_test)
+endif()
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
index f18e922c..9bd715a4 100644
--- a/ssl/CMakeLists.txt
+++ b/ssl/CMakeLists.txt
@@ -82,6 +82,7 @@ add_library(
target_link_libraries(ssl crypto)
+if(ENABLE_TESTS)
add_executable(
ssl_test
@@ -92,3 +93,4 @@ add_executable(
target_link_libraries(ssl_test ssl crypto)
add_dependencies(all_tests ssl_test)
+endif()
diff --git a/ssl/pqueue/CMakeLists.txt b/ssl/pqueue/CMakeLists.txt
index 3a8b82bc..294c0d13 100644
--- a/ssl/pqueue/CMakeLists.txt
+++ b/ssl/pqueue/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(
pqueue.c
)
+if(ENABLE_TESTS)
add_executable(
pqueue_test
@@ -18,3 +19,4 @@ add_executable(
target_link_libraries(pqueue_test ssl crypto)
add_dependencies(all_tests pqueue_test)
+endif()