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

[cmake,bugfix] Handle case where module search path is not in list.

With new modules there were cases where cmake/modules was not in the
modules path which made configuration fail. This patch fixes this case.
parent 0826cf14
No related branches found
No related tags found
No related merge requests found
...@@ -360,7 +360,9 @@ macro(dune_create_dependency_tree) ...@@ -360,7 +360,9 @@ macro(dune_create_dependency_tree)
if(start EQUAL ${length}) if(start EQUAL ${length})
list(APPEND CMAKE_MODULE_PATH ${_my_path}) list(APPEND CMAKE_MODULE_PATH ${_my_path})
else(start EQUAL ${length}) else(start EQUAL ${length})
list(INSERT CMAKE_MODULE_PATH ${start} ${_my_path}) if(_my_path)
list(INSERT CMAKE_MODULE_PATH ${start} ${_my_path})
endif(_my_path)
endif(start EQUAL ${length}) endif(start EQUAL ${length})
endif(start EQUAL -1) endif(start EQUAL -1)
endif(length GREATER 0) endif(length GREATER 0)
......
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