From 0471fa807ccfb183acaac2ed9dd451a2782ea598 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Tue, 22 Feb 2022 16:40:42 -0800 Subject: [PATCH] remove stall reference to version --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16413779a..9bf07fe17 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)