aboutsummaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2023-07-10Use the /bigobj copt when building for MSVC.ambrosin
This is needed for template-heavy code [1], and it is added by default by Bazel [2]. [1] https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1128?view=msvc-170 [2] https://github.com/bazelbuild/bazel/blob/726b1007c9cc843cf65e2e4289a61c5ee346d5e1/tools/cpp/windows_cc_toolchain_config.bzl#L667 PiperOrigin-RevId: 546865338
2023-05-19Upgrade Abseil to LTS 20230125.3ambrosin
PiperOrigin-RevId: 533411534
2023-05-02Enable building against OpenSSL 3.0ambrosin
NOTE: This is a first step to allow us to start experimenting with OpenSSL 3. - Use const uint8_t* pointer when calling `EVP_PKEY_CTX_set*` functions - Remove `EXACT` keyword when using `find_package` for OpenSSL - Assign the result of `EVP_PKEY_get0_EC_KEY` to a `const EC_KEY*` PiperOrigin-RevId: 528720245
2023-04-26Use FetchContent to download, unpack and configure in-tree dependenciesambrosin
FetchContent is available since CMake 3.11, and does all the heavy lifting that `http_archive` did. NOTE: `FetchContent_MakeAvailable` is only available >= 3.14, so for now we must use `add_subdirectory`. PiperOrigin-RevId: 527204754
2023-04-26Don't fetch googletest and whycheproof when TINK_BUILD_TESTS=OFFambrosin
PiperOrigin-RevId: 527197822
2023-04-26Add TESTONLY attribute to CMake tink_cc_library targetsambrosin
This option excludes the target from being defined when TINK_BUILD_TESTS=OFF. PiperOrigin-RevId: 527197212
2023-04-25Set minimum supported CMake version to 3.13ambrosin
The current minimum supported version in https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md is 3.10, but this is going to change to 3.13 from May 1st because Ubuntu 18.04 will be no longer supoported. 3.13 is the older version that comes packaged with the supported distros (Debian 10 in this case). See https://opensource.google/documentation/policies/cplusplus-support#support_criteria_3 PiperOrigin-RevId: 526954498
2023-02-16Upgrade BoringSSL to 20203-02-15 commit in tink-cc.ambrosin
This is now available as a Bazel Module in the Bazel Central Repository, so use that instead of loading it as an extension. Also rename "deps.bzl" => "extensions.bzl". NOTE: CMake is two commits after the version used by Bazel to include a CMake fix. See https://github.com/google/boringssl/compare/5c22014...e27ff0e PiperOrigin-RevId: 510118273
2023-02-13Add genrules to copy wycheproof test vectors locally in Tink C++.ambrosin
This is needed as a bridge as we enable, and eventually move towards using, Bazel Modules. Bazel Modules use different repository names (https://bazel.build/versions/6.0.0/build/bzlmod#repository-names), so this change is needed to allow WORKSPACE and Module based package definitions to coexist. PiperOrigin-RevId: 509297684
2023-02-13Update Abseil to LTS 20230125.wconner
Also, upgrade to GCC 7 as required by latest Abseil release. https://github.com/abseil/abseil-cpp/blob/master/absl/base/policy_checks.h#L57 PiperOrigin-RevId: 509248959
2023-02-08Use a tag to exclude targets on Windows when building with CMakeambrosin
PiperOrigin-RevId: 508006914
2023-01-31Increase minimum CMake version to 3.10 (required by latest Abseil C++ library).wconner
https://github.com/abseil/abseil-cpp/blob/master/CMakeLists.txt#L19 PiperOrigin-RevId: 506009333
2022-11-15Upgrade more protobuf dependencies to X.21.9, which is the latest.tholenst
PiperOrigin-RevId: 488604910
2022-11-10Upgrade some protobuf dependencies from 3.19.3 to 3.20.3tholenst
PiperOrigin-RevId: 487468666
2022-11-04Require using OpensSSL 1.1.1xambrosin
Without EXCLUDE, find_package will be fine with OpenSSL 3.X.Y as well which isn't compatible with Tink. PiperOrigin-RevId: 486138471
2022-11-04Don't download BoringSSL or search for OpenSSL if target crypto is already ↵ambrosin
defined Without this projects including Tink as a subdirectory that already define a `crypto` target will fail to build. This is useful when building Tink alongside other libraries that define some `crypto` target. PiperOrigin-RevId: 486128754
2022-09-22Search into the `src/` subdir for BoringSSL's CMake config and specify only ↵ambrosin
BUILD_INTERFACE for BoringSSL's includes The latter is because we are only concerned about the build tree of `crypto`. https://cmake.org/cmake/help/latest/command/target_include_directories.html#target-include-directories PiperOrigin-RevId: 476112521
2022-09-22Update BoringSSL for Tink C++ when using CMakeambrosin
This allows building Tink with GCC 12 and CMake, which currently fails due to warnings treated as errors that were fixed by https://github.com/google/boringssl/commit/8462a367bb57e9524c3d8eca9c62733c63a63cf4. Note that, as a consequence this requires setting: - the default C++ version to 14 - the minimum CMake version to 3.8 which are required by BoringSSL. PiperOrigin-RevId: 476062757
2022-06-08Update BoringSSL version for Tink C++ library.wconner
Using EVP_HPKE_CTX with SslUniquePtr requires the EVP_HPKE_CTX_new() and EVP_HPKE_CTX_free() functions. PiperOrigin-RevId: 453667718
2022-02-17Merge pull request #520 from carloscbl:masterCopybara-Service
PiperOrigin-RevId: 429489691
2022-02-15Upgrade to googletest 1.11.0.ckl
PiperOrigin-RevId: 428893269
2022-02-03Add option to link against installed GTest.ambrosin
Add a macro to create interface targets. PiperOrigin-RevId: 426077117
2022-01-26Add option `TINK_USE_INSTALLED_ABSEIL` to build Tink against an installed ↵ambrosin
version of Abseil. `TINK_USE_INSTALLED_ABSEIL` is set to OFF by default. Abseil can be installed following the instructions in https://abseil.io/docs/cpp/tools/cmake-installs. Then one only needs to do: ``` cmake <path/to/tink> \ -DCMAKE_CXX_STANDARD=11 \ -DCMAKE_PREFIX_PATH=<abseil/install/path> \ -DTINK_USE_INSTALLED_ABSEIL=ON ``` PiperOrigin-RevId: 424371062
2022-01-26Remove the use of CMake's GoogleTest moduleambrosin
Using recent versions of CMake causes `gtest_discover_tests` to fail when parsing `jwt/tink_test_jwt_jwk_set_converter_test`, likely because of the issue in [1]. Using `add_test` avoids the issue at the price of losing some granularity (from per test case to per test binary). [1] https://gitlab.kitware.com/cmake/cmake/-/issues/23039 PiperOrigin-RevId: 424321280
2022-01-24Exclude HPKE targets from Tink when building with OpenSSL.ambrosin
* Introduce a parameter 'TAGS' to CMake build rules, and the specific tag "exclude_if_openssl"; adding this tag will result in skipping the target if `TINK_USE_SYSTEM_OPENSSL=ON`. * Tag with "exclude_if_openssl" all the targets in `cc/hybrid/internal`, `hpke_config(|_test)` and tentatively hybrid_key_templates_test` since it depends on excluded targets. PiperOrigin-RevId: 423836764
2022-01-20Update protobuf to v3.19.3.juerg
The dependencies in examples_java_deps_init needed to be updated to work with this version of protobuf. Also, add some explicit six requirements. This was not required until now because protobuf depends on six, and most targets imported protobuf. But the new protobuf version how does not require six anymore, but absl-py still depends on it and the build would break if I don't add this requirement explicitly. But soon, the six dependency will also be removed from absl-py. PiperOrigin-RevId: 423124555
2022-01-19Upgrade to protobuf v3.17.3.juerg
Note that this version of protobuf supports M1 Macs, see https://github.com/protocolbuffers/protobuf/releases/tag/v3.17.3 PiperOrigin-RevId: 422812112
2022-01-04Make ed25519_verify_boringssl compatible with OpenSSLambrosin
Use the `EVP_DigestVerify` oneshot instead of `ED25519_verify` which is not visible in OpenSSL. Bumping the minimum required version of OpenSSL to 1.1.1 to guarantee support for ED25519. PiperOrigin-RevId: 419568280
2021-12-08Update abseil's version for Tink C++.ambrosin
PiperOrigin-RevId: 415186897
2021-11-18Add Wycheproof tests to ssl_aead_tests. Also refactored the test using ↵ambrosin
parametrized test suites and updated the version of the wycheproof lib used with CMake to the same as Bazel. PiperOrigin-RevId: 410780048
2021-11-16Implement RunfilesPath() test utility function.ckl
PiperOrigin-RevId: 410437687
2021-10-12Changes to CMake config files to allow linking to OpenSSL installed in the ↵ambrosin
system. Tested with: ``` cmake .. -DTINK_USE_SYSTEM_OPENSSL=ON -DTINK_BUILD_TESTS=ON make tink_test_subtle_random_test ./cc/subtle/tink_test_subtle_random_test ``` PiperOrigin-RevId: 402634773
2021-07-07Updated BoringSSL dependency to a more recent version with HPKE support.Tink Team
PiperOrigin-RevId: 383480717
2021-06-13Added logic to support compile with different c++ version more organicallyCarlos Bernal
2021-04-13Add missing copyright statements. These were missing due to internal ↵tholenst
miscommunication. PiperOrigin-RevId: 368367721
2021-01-22Update protobuf dependency.kste
PiperOrigin-RevId: 353244445
2021-01-14Update absl version for C++.kste
PiperOrigin-RevId: 351780622
2020-06-25Update BoringSSL version.kste
PiperOrigin-RevId: 318238715
2020-05-13Update to Bazel 3.1.0 and newer version of Protobuf.kste
PiperOrigin-RevId: 311341949
2020-04-28Upgrade the absl dependency to head and explicitly specify the C++ version ↵tholenst
to c++11 when using cmake. It seems the C++ should be specified, as otherwise CMake can decide to use a different version. PiperOrigin-RevId: 308784762
2020-03-04Add the capability of making submodules to Tink CMake and use it in one place.tholenst
PiperOrigin-RevId: 298831408
2020-02-20Update absl version.kste
PiperOrigin-RevId: 296164489
2019-09-25Bumping up versions of Protobufs and gRPC.przydatek
Cleaning up WORKSPACE. PiperOrigin-RevId: 271114848
2019-08-20Bumping up ABSL-version.tholenst
PiperOrigin-RevId: 264384749
2019-08-20*** Reason for rollback ***przydatek
Newer ABSL breaks CMake build. *** Original change description *** Bumping up ABSL-version. PiperOrigin-RevId: 264381021
2019-08-20Bumping up ABSL-version.przydatek
PiperOrigin-RevId: 264374853
2019-06-17Run the unit tests with cmake under kokoro.tholenst
PiperOrigin-RevId: 253569428
2019-06-17Tink CMake: Simplify the handling of tests.tholenst
The previous syntax for GTEST_ADD_TESTS only works with later versions of cmake, see e.g. https://cmake.org/cmake/help/v3.7/module/FindGTest.html?highlight=gtest_add_tests Since we use cmake 3.7.1 in kokoro we cannot run these tests like this. Furthermore, the function gtest_add_tests is problematic for parametrized tests. Hence, we remove it and replace it with the simpler add_tests. PiperOrigin-RevId: 253555478
2019-05-29Adding a test for CMake build.przydatek
PiperOrigin-RevId: 248717508
2019-05-02Fix typo in parameter descriptionTink Team
PiperOrigin-RevId: 240538904 GitOrigin-RevId: 4af85f811706a3dae1aef8a04acdc442216a00d2