浏览代码

Require the current cmake version in --find-package mode

This fixes the problem that otherwise Platforms/CYGWIN.cmake doesn't
know whether it should set WIN32 or not.
Now it uses always the current behaviour.

Alex
Alex Neundorf 14 年之前
父节点
当前提交
98472e45c8
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Modules/CMakeFindPackageMode.cmake

+ 3 - 0
Modules/CMakeFindPackageMode.cmake

@@ -37,6 +37,9 @@ if(NOT MODE)
   message(FATAL_ERROR "MODE argument not specified. Use either EXIST, COMPILE or LINK.")
 endif()
 
+# require the current version. If we don't do this, Platforms/CYGWIN.cmake complains because
+# it doesn't know whether it should set WIN32 or not:
+cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} )
 
 include(CMakeDetermineSystem)