Use sources.cmake for the bssl tool

Bug: 542
Change-Id: I94684f2398a28792cc0a31c8e776eecac8cc3cba
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61305
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
chromium-stable
David Benjamin 2 years ago committed by Boringssl LUCI CQ
parent de0d05a0a8
commit 99ce1e01fc
  1. 6
      CMakeLists.txt
  2. 24
      sources.cmake
  3. 23
      tool/CMakeLists.txt
  4. 3
      util/generate_build_files.py

@ -515,7 +515,6 @@ add_library(crypto_test_data OBJECT crypto_test_data.cc)
add_subdirectory(crypto)
add_subdirectory(ssl)
add_subdirectory(ssl/test)
add_subdirectory(tool)
add_subdirectory(util/fipstools)
add_subdirectory(util/fipstools/acvp/modulewrapper)
add_subdirectory(decrepit)
@ -572,12 +571,17 @@ set_target_properties(
CXX_STANDARD_REQUIRED YES
COMPILE_FLAGS "${PKI_CXX_FLAGS}")
add_executable(bssl ${BSSL_SOURCES})
install_if_enabled(TARGETS bssl DESTINATION ${INSTALL_DESTINATION_DEFAULT})
target_link_libraries(bssl ssl crypto)
# Historically, targets were built in subdirectories. For compatibility with
# existing tools, we, for now, copy the targets into the subdirectories. This
# will be removed sometime in 2024.
copy_post_build(crypto crypto_test urandom_test)
copy_post_build(ssl ssl_test)
copy_post_build(decrepit decrepit_test)
copy_post_build(tool bssl)
if(FUZZ)
if(LIBFUZZER_FROM_DEPS)

@ -424,4 +424,26 @@ set(
crypto/test/file_test_gtest.cc
crypto/test/test_util.cc
crypto/test/wycheproof_util.cc
)
)
set(
BSSL_SOURCES
tool/args.cc
tool/ciphers.cc
tool/client.cc
tool/const.cc
tool/digest.cc
tool/fd.cc
tool/file.cc
tool/generate_ech.cc
tool/generate_ed25519.cc
tool/genrsa.cc
tool/pkcs12.cc
tool/rand.cc
tool/server.cc
tool/sign.cc
tool/speed.cc
tool/tool.cc
tool/transport_common.cc
)

@ -1,23 +0,0 @@
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_if_enabled(TARGETS bssl DESTINATION ${INSTALL_DESTINATION_DEFAULT})
target_link_libraries(bssl ssl crypto)

@ -759,7 +759,6 @@ def main(platforms):
FindCFiles(os.path.join('src', 'third_party', 'fiat'), NoTestsNorFIPSFragments))
fips_fragments = FindCFiles(os.path.join('src', 'crypto', 'fipsmodule'), OnlyFIPSFragments)
ssl_source_files = FindCFiles(os.path.join('src', 'ssl'), NoTests)
tool_c_files = FindCFiles(os.path.join('src', 'tool'), NoTests)
tool_h_files = FindHeaderFiles(os.path.join('src', 'tool'), AllFiles)
# BCM shared library C files
@ -837,7 +836,7 @@ def main(platforms):
'ssl_headers': ssl_h_files,
'ssl_internal_headers': ssl_internal_h_files,
'ssl_test': PrefixWithSrc(cmake['SSL_TEST_SOURCES']),
'tool': tool_c_files,
'tool': PrefixWithSrc(cmake['BSSL_SOURCES']),
'tool_headers': tool_h_files,
'test_support': PrefixWithSrc(cmake['TEST_SUPPORT_SOURCES']),
'test_support_headers': test_support_h_files,

Loading…
Cancel
Save