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

[cmake,bugfix] Fixes issue with versions of suggestions.

Du to typo the length of the modules and version list of the suggestion
differed. This patch fixes this.
parent f78ce3a8
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,7 @@ macro(dune_module_information MODULE_DIR)
# 3. Check for line starting with Depends
extract_line("Depends:" ${DUNE_MOD_NAME}_DEPENDS "${DUNE_MODULE}")
if(${DUNE_MOD_NAME}_DEPENDS)
split_module_version(${${DUNE_MOD_NAME}_DEPENDS} ${DUNE_MOD_NAME}_DEPENDS_MODULE ${DUNE_MOD_NAME}_DEPENDS_VERSIONS)
split_module_version(${${DUNE_MOD_NAME}_DEPENDS} ${DUNE_MOD_NAME}_DEPENDS_MODULE ${DUNE_MOD_NAME}_DEPENDS_VERSION)
foreach(_mod ${${DUNE_MOD_NAME}_DEPENDS})
set(${_mod}_REQUIRED REQUIRED)
endforeach(_mod ${${DUNE_MOD_NAME}_DEPENDS})
......@@ -334,6 +334,8 @@ macro(dune_process_dependency_leafs modules versions is_required next_level_deps
list(LENGTH mmodules mlength)
list(LENGTH mversions vlength)
if(NOT mlength EQUAL vlength)
message(STATUS "mmodules=${mmodules} modules=${modules}")
message(STATUS "mversions=${mversions} versions=${mversions}")
message(FATAL_ERROR "List of modules and versions do not have the same length!")
endif(NOT mlength EQUAL vlength)
if(mlength GREATER 0)
......@@ -408,8 +410,8 @@ macro(dune_create_dependency_tree)
set(ALL_DEPENDENCIES "")
if(${ProjectName}_DEPENDS_MODULE OR ${ProjectName}_SUGGESTS_MODULE)
set(ALL_DEPENDENCIES ${${ProjectName}_DEPENDS_MODULE} ${${ProjectName}_SUGGESTS_MODULE})
dune_create_dependency_leafs("${${ProjectName}_DEPENDS_MODULE}" "${${ProjectName}_DEPENDS_VERSIONS}"
"${${ProjectName}_SUGGESTS_MODULE}" "${${ProjectName}_SUGGESTS_VERSIONS}")
dune_create_dependency_leafs("${${ProjectName}_DEPENDS_MODULE}" "${${ProjectName}_DEPENDS_VERSION}"
"${${ProjectName}_SUGGESTS_MODULE}" "${${ProjectName}_SUGGESTS_VERSION}")
endif(${ProjectName}_DEPENDS_MODULE OR ${ProjectName}_SUGGESTS_MODULE)
set(_my_path "")
if(ALL_DEPENDENCIES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment