mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-12-04 08:02:31 +00:00
5163c3cec8
* build OpenSSL using MSVC toolchain on Windows * Display lib name in progress message Before this commit, when building OpenSSL using MSVC, the progress message would display "Building openssl_msvc_". After this commit, the progess message would display "Building openssl". * Add test to verify linkage with OpenSSL libs * Add test to verify linkage with Curl libs Note that linker errors occur in applications that link with libssl and libcrypto if libcrypto comes before libssl on the linker command-line. Swapping the order of libcrypto and libssl in BUILD.openssl.bazel resolved the issue.
18 lines
544 B
C++
18 lines
544 B
C++
#include <curl/curl.h>
|
|
|
|
#include <cassert>
|
|
#include <string>
|
|
|
|
// Use (void) to silent unused warnings.
|
|
#define assertm(exp, msg) assert(((void)msg, exp))
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
curl_version_info_data* data = curl_version_info(CURLVERSION_NOW);
|
|
|
|
assertm(std::string(data->version) == std::string("7.74.0"), "The version of curl does not match the expected version");
|
|
assertm(std::string(data->ssl_version) == std::string("OpenSSL/1.1.1h"), "The version of openssl does not match the expected version");
|
|
|
|
return 0;
|
|
}
|