From bebafb8a2d0030120f8028eae0206c1bf1ba208d Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 30 Oct 2019 01:52:08 +0100 Subject: ECMGenerateExportHeader: allow ecm_[..]_format_version wo/ CURRENT_VERSION GIT_SILENT --- modules/ECMGenerateExportHeader.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/ECMGenerateExportHeader.cmake') diff --git a/modules/ECMGenerateExportHeader.cmake b/modules/ECMGenerateExportHeader.cmake index 96c1f696..81bf33e3 100644 --- a/modules/ECMGenerateExportHeader.cmake +++ b/modules/ECMGenerateExportHeader.cmake @@ -383,14 +383,14 @@ function(ecm_export_header_format_version _version) ) cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if (NOT ARGS_CURRENT_VERSION) - message(FATAL_ERROR "No CURRENT_VERSION passed when calling ecm_export_header_format_version().") - endif() if (NOT ARGS_STRING_VAR AND NOT ARGS_HEXNUMBER_VAR) message(FATAL_ERROR "No STRING_VAR or HEXNUMBER_VAR passed when calling ecm_export_header_format_version().") endif() if(_version STREQUAL "CURRENT") + if (NOT ARGS_CURRENT_VERSION ) + message(FATAL_ERROR "\"CURRENT\" as version value not supported when CURRENT_VERSION not passed on calling ecm_export_header_format_version().") + endif() set(_version ${ARGS_CURRENT_VERSION}) endif() -- cgit v1.2.1