-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
+
+if (POLICY CMP0069)
+ cmake_policy(SET CMP0069 NEW)
+endif()
project(hunspell)
# Please note that the package source code is licensed under its own license.
project ( libiconv C )
-cmake_minimum_required ( VERSION 2.8 )
+cmake_minimum_required(VERSION 3.1)
+
+if (POLICY CMP0069)
+ cmake_policy(SET CMP0069 NEW)
+endif()
+
set(CMAKE_MODULE_PATH .)
include ( configure.cmake )
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
+
+if (POLICY CMP0069)
+ cmake_policy(SET CMP0069 NEW)
+endif()
set(VERSION "1.2.5")
set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${VERSION})
-cmake_minimum_required(VERSION 2.4.4)
+cmake_minimum_required(VERSION 3.1)
+
+if (POLICY CMP0069)
+ cmake_policy(SET CMP0069 NEW)
+endif()
+
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(zlib C)
message(FATAL_ERROR "Exiting")
endif()
endif()
+ # Enable LTO if supported
+ if (POLICY CMP0069)
+ cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT result OUTPUT reason LANGUAGES CXX)
+ if(result)
+ message(STATUS "Setting IPO True")
+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+ else()
+ message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
+ endif()
+ endif()
endif()
if(UNIX)