Skip to content
Snippets Groups Projects
Commit 9afabdcd authored by Markus Blatt's avatar Markus Blatt
Browse files

[cmake,bugfix] Allow 0 as a version.

Previously we checked whether the extracted Version evaluated to
True. Unfortunately, there lazy people like me that like use a version
of 0 for testing, which evaluates to False and breaks configure.
With this patch we allow 0 to and just test wether the version consists
of characters.
parent af0401cc
Branches
Tags
No related merge requests found
......@@ -186,9 +186,9 @@ macro(dune_module_information MODULE_DIR)
# find version strings
extract_line("Version:" MODULE_LINE "${DUNE_MODULE}")
if(NOT MODULE_LINE)
if(NOT MODULE_LINE MATCHES ".+")
message(FATAL_ERROR "${MODULE_DIR}/dune.module is missing a version.")
endif(NOT MODULE_LINE)
endif(NOT MODULE_LINE MATCHES ".+")
string(REGEX REPLACE ".*Version:[ ]*([^ \n]+).*" "\\1" DUNE_MOD_VERSION "${MODULE_LINE}")
string(REGEX REPLACE "([0-9]).*" "\\1" DUNE_VERSION_MAJOR "${DUNE_MOD_VERSION}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment