Skip to content

Commit

Permalink
Fix #216 Set PROJECT_VERSION to fix CMP0048 Policy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SRombauts committed Aug 25, 2019
1 parent 85c1bf3 commit 8015952
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion CMakeLists.txt
Expand Up @@ -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}")

Expand Down
6 changes: 4 additions & 2 deletions include/SQLiteCpp/SQLiteCpp.h
Expand Up @@ -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

0 comments on commit 8015952

Please sign in to comment.