Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpiratf <piratf.me@gmail.com>2019-11-11 11:09:43 +0300
committerpiratf <piratf.me@gmail.com>2019-11-11 11:09:43 +0300
commit46d980b46aae3a3f7454794921eb01e2b95360c0 (patch)
tree9c26beb0fd2c679e9b178a36dbf533e4d58b9209 /CMakeLists.txt
parentc4c6a65410d25f8ae1629fa6c86c0fa65bcbc564 (diff)
fix CMake policy CMP0048 warning #1154
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0275672e..3b9ac512 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,13 +9,18 @@ endif()
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
-PROJECT(RapidJSON CXX)
-
set(LIB_MAJOR_VERSION "1")
set(LIB_MINOR_VERSION "1")
set(LIB_PATCH_VERSION "0")
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
+if (CMAKE_VERSION VERSION_LESS 3.0)
+ PROJECT(RapidJSON CXX)
+else()
+ cmake_policy(SET CMP0048 NEW)
+ PROJECT(RapidJSON VERSION "${LIB_VERSION_STRING}" LANGUAGES CXX)
+endif()
+
# compile in release with debug info mode by default
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)