Fix wrong check of the CMAKE_VERSION (#602)

`CMAKE_VERSION_MAJOR` is just the first component of the CMake version (e.g. 3 for 3.10.1) which compares less than `3.7.9` if it is less than 3. The proper variable to compare is `CMAKE_VERSION` which contains the full version number.
This commit is contained in:
Jérémie Delaitre 2018-02-14 14:26:44 +13:00 committed by Neil MacIntosh
parent ac91ac1408
commit 30b1641ff4

View File

@ -16,7 +16,7 @@ endif ()
# when minimum version required is 3.8.0 remove if below
# both branches do exactly the same thing
if (CMAKE_MAJOR_VERSION VERSION_LESS 3.7.9)
if (CMAKE_VERSION VERSION_LESS 3.7.9)
if (NOT MSVC)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)