← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/cmakepolicy_2 into lp:widelands

 

kaputtnik has proposed merging lp:~widelands-dev/widelands/cmakepolicy_2 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1772079 in widelands: "CMake 3.11: warning about FindOpenGL"
  https://bugs.launchpad.net/widelands/+bug/1772079

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/cmakepolicy_2/+merge/356609

Another attempt to fix CMP warnings. Lets see what Travis and Appveyor think of this :-)
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/cmakepolicy_2 into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2018-09-26 13:41:40 +0000
+++ CMakeLists.txt	2018-10-11 19:24:20 +0000
@@ -1,7 +1,14 @@
 project (widelands)
 
 cmake_minimum_required (VERSION 2.8.7)
-cmake_policy(SET CMP0054 NEW)
+
+if(${CMAKE_VERSION} VERSION_GREATER  "3.10") 
+    cmake_policy(SET CMP0072 OLD)
+endif()
+
+if(${CMAKE_VERSION} VERSION_GREATER  "3.0") 
+    cmake_policy(SET CMP0054 NEW)
+endif()
 
 include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake")
 
@@ -140,6 +147,7 @@
   message(STATUS "Not using AddressSanitizer.")
 endif(OPTION_ASAN)
 
+
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Weverything")
 


Follow ups