A patch update will be applied today - June 21st between 1pm - 1:45pm EDT (UTC-0400). GitLab will go down a few minutes within that time.

Commit 41d2f2c4 authored by Alexander Neundorf's avatar Alexander Neundorf Committed by Brad King
Browse files

write_basic_package_version_file: use PROJECT_VERSION

In the write_basic_package_version_file(), the VERSION argument
is now optional. If none is given, it falls back to ${PROJECT_VERSION}.

Alex
parent 7e142c5a
......@@ -99,7 +99,7 @@
#
# ::
#
# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) )
# WRITE_BASIC_PACKAGE_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) )
#
#
#
......@@ -112,6 +112,9 @@
# filename is the output filename, it should be in the build tree.
# major.minor.patch is the version number of the project to be installed
#
# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable
# is used. If this hasn't been set, it errors out.
#
# The COMPATIBILITY mode AnyNewerVersion means that the installed
# package version will be considered compatible if it is newer or
# exactly the same as the requested version. This mode should be used
......
......@@ -6,7 +6,7 @@
#
# ::
#
# WRITE_BASIC_CONFIG_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
# WRITE_BASIC_CONFIG_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
#
#
#
......@@ -46,7 +46,11 @@ function(WRITE_BASIC_CONFIG_VERSION_FILE _filename)
endif()
if("${CVF_VERSION}" STREQUAL "")
message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")
if ("${PROJECT_VERSION}" STREQUAL "")
message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")
else()
set(CVF_VERSION "${PROJECT_VERSION}")
endif()
endif()
configure_file("${versionTemplateFile}" "${_filename}" @ONLY)
......
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