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

[cmake,bugfix] Allow usage of empty CMAKE_MODULE_PATH.

At least for dune-common the CMAKE_MODULE_PATH may be empty
and removing an item from an empty list is an error. This
patch fixes this issue by checking whether th list is empty.
parent 86f1dc9c
No related branches found
No related tags found
No related merge requests found
......@@ -274,7 +274,9 @@ macro(dune_create_dependency_leafs depends depends_versions suggests suggests_ve
endmacro(dune_create_dependency_leafs)
macro(dune_create_dependency_tree)
list(REMOVE_ITEM CMAKE_MODULE_PATH ${dune-common_MODULE_PATH})
if(${dune-common_MODULE_PATH})
list(REMOVE_ITEM CMAKE_MODULE_PATH ${dune-common_MODULE_PATH})
endif(${dune-common_MODULE_PATH})
list(FIND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules start)
set(ALL_DEPENDENCIES "")
if(DEPENDS_MODULE OR SUGGESTS_MODULE)
......
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