diff options
author | Ilya Lavrenov <ilya.lavrenov@intel.com> | 2023-01-30 11:00:57 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 23:00:57 -0800 |
commit | ca71fdfb9ab1fd7f4f7bb908a395ea0cc6e99751 (patch) | |
tree | 61a5d0406f7522b45bc8b0f792b475c008546aaa /benchmarks | |
parent | a105c26eca2166c0ac9e2026478ec158ffc01d2c (diff) | |
download | flatbuffers-ca71fdfb9ab1fd7f4f7bb908a395ea0cc6e99751.tar.gz flatbuffers-ca71fdfb9ab1fd7f4f7bb908a395ea0cc6e99751.tar.bz2 flatbuffers-ca71fdfb9ab1fd7f4f7bb908a395ea0cc6e99751.zip |
Supported cmake 3.8 (#7801)
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 2842d60d..18f6ef9f 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,8 +1,9 @@ # Setup for running Google Benchmarks (https://github.com/google/benchmark) on -# flatbuffers. This requires both that benchmark library and its depenency gtest +# flatbuffers. This requires both that benchmark library and its dependency gtest # to build. Instead of including them here or doing a submodule, this uses # FetchContent (https://cmake.org/cmake/help/latest/module/FetchContent.html) to # grab the dependencies at config time. This requires CMake 3.14 or higher. + cmake_minimum_required(VERSION 3.14) include(FetchContent) @@ -62,8 +63,8 @@ add_custom_command( add_executable(flatbenchmark ${FlatBenchmark_SRCS}) # Benchmark requires C++11 -target_compile_features(flatbenchmark PUBLIC - cxx_std_11 +target_compile_features(flatbenchmark PRIVATE + cxx_std_11 # requires cmake 3.8 ) target_compile_options(flatbenchmark @@ -81,7 +82,7 @@ set_target_properties(flatbenchmark # The includes of the benchmark files are fully qualified from flatbuffers root. target_include_directories(flatbenchmark PUBLIC ${CMAKE_SOURCE_DIR}) -target_link_libraries(flatbenchmark +target_link_libraries(flatbenchmark PRIVATE benchmark::benchmark_main # _main to use their entry point gtest # Link to gtest so we can also assert in the benchmarks )
\ No newline at end of file |