diff options
author | przydatek <przydatek@google.com> | 2019-05-17 16:37:14 +0200 |
---|---|---|
committer | przydatek <bartosz.przydatek@gmail.com> | 2019-05-29 17:39:16 +0200 |
commit | 9582134c228f0a8e67dda1fae0986335b2467758 (patch) | |
tree | 24a199b980fe6a2352957581a528626f5f7af1e7 /cmake | |
parent | d995778029446561476f0412fd66bb2e014d21f5 (diff) | |
download | tink-9582134c228f0a8e67dda1fae0986335b2467758.tar.gz |
Adding a test for CMake build.
PiperOrigin-RevId: 248717508
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/TinkBuildRules.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/TinkBuildRules.cmake b/cmake/TinkBuildRules.cmake index beb4deb5f..5dd56485a 100644 --- a/cmake/TinkBuildRules.cmake +++ b/cmake/TinkBuildRules.cmake @@ -31,7 +31,15 @@ # defined by calls to tink_module(). Please don't alter it directly. include(CMakeParseArguments) -include(GoogleTest) + +# GoogleTest is available only since CMake version 3.9, +# so we're using FindGTest for older versions. +if (${CMAKE_VERSION} VERSION_LESS 3.9) + include(FindGTest) +else() + include(GoogleTest) +endif() + if (TINK_BUILD_TESTS) enable_testing() @@ -136,7 +144,7 @@ function(tink_cc_library) tink::${TINK_MODULE}::${tink_cc_library_NAME} ALIAS ${_target_name}) endfunction(tink_cc_library) -# Declare a Tink test using googletest, with a syntax similar to Blaze. +# Declare a Tink test using googletest, with a syntax similar to Bazel. # # Parameters: # NAME base name of the test. |