Skip to content
Permalink
Browse files

cmake: better error for failing version detection

Previously the error message when the detection of the Bareos version
failed was quite hard to understand.
With this patch the error now refers to the troubleshooting section of
the new "Automatic Version Generation" chapter in the developer guide.
  • Loading branch information
arogge committed Dec 5, 2019
1 parent a1c7400 commit a39bce2557d13876c681c8bfd7e378c859a1a480
@@ -32,7 +32,9 @@ if(BareosVersionFile STREQUAL "NOTFOUND")
else()
message(
FATAL_ERROR
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available."
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available.\n"
"For more information why this happened and how to fix it, please see "
"https://docs.bareos.org/DeveloperGuide/AutomaticVersionGeneration.html#troubleshooting"
)
endif()
else()
@@ -33,7 +33,9 @@ if(NOT DEFINED VERSION_STRING)
else()
message(
FATAL_ERROR
"BareosVersion.cmake not found and no git version available."
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available.\n"
"For more information why this happened and how to fix it, please see "
"https://docs.bareos.org/DeveloperGuide/AutomaticVersionGeneration.html#troubleshooting"
)
endif()
endif()
@@ -25,7 +25,9 @@ if(NOT DEFINED VERSION_STRING)
else()
message(
FATAL_ERROR
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available."
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available.\n"
"For more information why this happened and how to fix it, please see "
"https://docs.bareos.org/DeveloperGuide/AutomaticVersionGeneration.html#troubleshooting"
)
endif()
else()
@@ -31,7 +31,11 @@ if(GIT_DESCRIBE_VERSION)
endif()
set(VERSION_TIMESTAMP "${GIT_COMMIT_TIMESTAMP}")
else()
message(FATAL_ERROR "No version information from git available.")
message(
FATAL_ERROR
"VERSION_STRING not set, BareosVersion.cmake not found and no version data from git available.\n"
"For more information why this happened and how to fix it, please see "
"https://docs.bareos.org/DeveloperGuide/AutomaticVersionGeneration.html#troubleshooting")
endif()

set(version_file_header "# autogenerated by write_version_files.cmake")

0 comments on commit a39bce2

Please sign in to comment.
You can’t perform that action at this time.