[mapguide-commits] r9414 - trunk/MgDev

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Nov 23 00:24:12 PST 2018


Author: jng
Date: 2018-11-23 00:24:12 -0800 (Fri, 23 Nov 2018)
New Revision: 9414

Modified:
   trunk/MgDev/CMakeLists.txt
Log:
Bump CMake minimum required version to 2.8 and enable ccache

Modified: trunk/MgDev/CMakeLists.txt
===================================================================
--- trunk/MgDev/CMakeLists.txt	2018-11-17 15:23:04 UTC (rev 9413)
+++ trunk/MgDev/CMakeLists.txt	2018-11-23 08:24:12 UTC (rev 9414)
@@ -1,9 +1,15 @@
 project(mapguide)
 
 # CMake base requires and policy tweaks
-cmake_minimum_required( VERSION 2.6.2 FATAL_ERROR )
-# CMP0005: keep escaping behaviour for definitions added via add_definitions()
-cmake_policy( SET CMP0005 OLD )
+cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
+if (POLICY CMP0005)
+    # CMP0005: keep escaping behaviour for definitions added via add_definitions()
+    cmake_policy( SET CMP0005 OLD )
+endif (POLICY CMP0005)
+if (POLICY CMP0026)
+    # CMP0026: Disallow use of the LOCATION target property
+    cmake_policy( SET CMP0026 OLD )
+endif (POLICY CMP0026)
 
 # Look first in internal modules
 set(CMAKE_MODULE_PATH 
@@ -17,6 +23,13 @@
 
 message(STATUS "CMake Build Type is: ${CMAKE_BUILD_TYPE}")
 
+# Use ccache if available
+find_program(CCACHE_PROGRAM ccache)
+if(CCACHE_PROGRAM)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
+    message(STATUS "ccache was found and will be used to cache compilations")
+endif()
+
 # Determine bitness
 if ((NOT MG_CPU EQUAL 32) AND (NOT MG_CPU EQUAL 64))
     message(STATUS "MG_CPU not defined, determining what we're building for based on system bitness")



More information about the mapguide-commits mailing list