aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Karney <charles@karney.com>2017-12-07 11:11:16 -0500
committerCharles Karney <charles@karney.com>2017-12-07 11:11:16 -0500
commit5975ff8f0920b1f4b4353f59f45e9033ea784c5f (patch)
tree2a017dceaeb2cc8625e13100369664584583a0f9 /CMakeLists.txt
parentcbb497636ec29f5350864b128e7d09d603f6a15d (diff)
downloadPROJ-5975ff8f0920b1f4b4353f59f45e9033ea784c5f.tar.gz
PROJ-5975ff8f0920b1f4b4353f59f45e9033ea784c5f.zip
Squelch Visual Studio's obnoxious warnings about sprintf being unsafe.
Also set policy CMP0054 to stop a cmake warning.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9c9cdbf..33547190 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,9 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
project(PROJ4 C)
set(PROJECT_INTERN_NAME PROJ)
+if (NOT CMAKE_VERSION VERSION_LESS 3.1)
+ cmake_policy(SET CMP0054 NEW)
+endif ()
# Set warnings
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_C_FLAGS "/WX ${CMAKE_C_FLAGS}")