aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHenry Schreiner <henryschreineriii@utexas.edu>2018-07-09 12:04:13 +0300
committerVictor Zverovich <victor.zverovich@gmail.com>2018-07-11 07:08:17 -0700
commit0eb01b832c095c9a9e87d58adb5ed73b987c437e (patch)
tree8be375223eeb6e45a0a9be24df5c1d8cfaab4c57 /CMakeLists.txt
parent2a4cd6d05e09c6c4a862695aebe2b765ddcc6194 (diff)
downloadfmtlib-0eb01b832c095c9a9e87d58adb5ed73b987c437e.tar.gz
Better support for newer CMake's
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78016a98..e72955f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,12 +1,15 @@
-message(STATUS "CMake version: ${CMAKE_VERSION}")
+cmake_minimum_required(VERSION 3.1.0...3.11)
-cmake_minimum_required(VERSION 3.1.0)
+if(${CMAKE_VERSION} VERSION_LESS 3.12)
+ cmake_policy(VERSION ${CMAKE_VERSION})
+endif()
# Determine if fmt is built as a subproject (using add_subdirectory)
# or if it is the master project.
set(MASTER_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MASTER_PROJECT ON)
+ message(STATUS "CMake version: ${CMAKE_VERSION}")
endif ()
# Joins arguments and places the results in ${result_var}.