diff options
author | Derek Bailey <dbaileychess@gmail.com> | 2022-02-22 16:40:42 -0800 |
---|---|---|
committer | Derek Bailey <dbaileychess@gmail.com> | 2022-02-22 16:41:42 -0800 |
commit | 0471fa807ccfb183acaac2ed9dd451a2782ea598 (patch) | |
tree | 7dfde91c7c713b41f8c6c96cfd5bd22bf5e4e9bb /CMakeLists.txt | |
parent | 914344ea9b7266b0aadb6c668b36b624314854ba (diff) | |
download | flatbuffers-0471fa807ccfb183acaac2ed9dd451a2782ea598.tar.gz flatbuffers-0471fa807ccfb183acaac2ed9dd451a2782ea598.tar.bz2 flatbuffers-0471fa807ccfb183acaac2ed9dd451a2782ea598.zip |
remove stall reference to version
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 16413779..9bf07fe1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # This is the legacy minimum version flatbuffers supported for a while. -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...3.22.1) # CMake version 3.16 is the 'de-facto' minimum version for flatbuffers. If the # current cmake is older than this, warn the user and include the legacy file to @@ -15,18 +15,19 @@ if(CMAKE_VERSION VERSION_LESS 3.16) return() endif() +# Attempt to read the current version of flatbuffers by looking at the latest tag. +include(CMake/Version.cmake) + if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) project(FlatBuffers DESCRIPTION "Flatbuffers serialization library" - VERSION 2.0.0 + VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX) else() project(FlatBuffers) endif (POLICY CMP0048) -include(CMake/Version.cmake) - # generate compile_commands.json set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |