Fix #216 Set PROJECT_VERSION to fix CMP0048 Policy warnings

This commit is contained in:
Sébastien Rombauts 2019-08-25 21:35:32 +02:00
parent 85c1bf348b
commit 8015952b93
3 changed files with 15 additions and 4 deletions

View File

@ -129,7 +129,7 @@ Version 2.3.0 - March 3 2019
- Better CMake compatibility #170
- Add implicit cast operator to char and short types #179 #180
Version ?
Version 2.4.0 - August 25 2019
- Update SQLite3 from 3.27.2 to 3.29.0 (2019-07-10)
- #191 CMake Warning line 299
- #190 Implement move constructors

View File

@ -5,7 +5,16 @@
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
cmake_minimum_required(VERSION 2.8.12) # first version with add_compile_options()
project(SQLiteCpp)
if (CMAKE_VERSION VERSION_LESS 3.0)
project(SQLiteCpp)
set(PROJECT_VERSION_MAJOR 2)
set(PROJECT_VERSION_MINOR 4)
set(PROJECT_VERSION_PATCH 0)
set(PROJECT_VERSION "2.4.0")
else()
cmake_policy(SET CMP0048 NEW)
project(SQLiteCpp VERSION "2.4.0")
endif()
message (STATUS "CMake version: ${CMAKE_VERSION}")

View File

@ -37,6 +37,8 @@
* The [SQLITECPP_VERSION_NUMBER] C preprocessor macro resolves to an integer
* with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
* numbers used in [SQLITECPP_VERSION].
*
* WARNING: shall always be updated in sync with PROJECT_VERSION in CMakeLists.txt
*/
#define SQLITECPP_VERSION "2.03.00" // 2.3.0
#define SQLITECPP_VERSION_NUMBER 2003000 // 2.3.0
#define SQLITECPP_VERSION "2.04.00" // 2.4.0
#define SQLITECPP_VERSION_NUMBER 2004000 // 2.4.0