Commit 567af1a5 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

WCDH: Issue a better message for version compatibility.

parent 2336ec51
...@@ -197,8 +197,13 @@ function(write_compiler_detection_header ...@@ -197,8 +197,13 @@ function(write_compiler_detection_header
if(NOT _WCD_VERSION) if(NOT _WCD_VERSION)
set(_WCD_VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) set(_WCD_VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})
endif() endif()
if (_WCD_VERSION VERSION_LESS 3.1.0) # Version which introduced this function set(_min_version 3.1.0) # Version which introduced this function
message(FATAL_ERROR "VERSION parameter too low.") if (_WCD_VERSION VERSION_LESS _min_version)
set(err "VERSION compatibility for write_compiler_detection_header is set to ${_WCD_VERSION}, which is too low.")
set(err "${err} It must be set to at least ${_min_version}. ")
set(err "${err} Either set the VERSION parameter to the write_compiler_detection_header function, or update")
set(err "${err} your minimum required CMake version with the cmake_minimum_required command.")
message(FATAL_ERROR "${err}")
endif() endif()
set(compilers set(compilers
......
CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\):
VERSION parameter too low. VERSION compatibility for write_compiler_detection_header is set to 3.0,
which is too low. It must be set to at least 3.1.0. Either set the
VERSION parameter to the write_compiler_detection_header function, or
update your minimum required CMake version with the cmake_minimum_required
command.
Call Stack \(most recent call first\): Call Stack \(most recent call first\):
OldVersion.cmake:4 \(write_compiler_detection_header\) OldVersion.cmake:4 \(write_compiler_detection_header\)
CMakeLists.txt:3 \(include\) CMakeLists.txt:3 \(include\)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment