From 83dc7596d7b88e88cedaf008e189f61deec1e4cc Mon Sep 17 00:00:00 2001 From: Markus Blatt <markus@dr-blatt.de> Date: Thu, 9 Jul 2015 21:35:41 +0200 Subject: [PATCH] [bugfix,cmake] Correctly remove dune-common_MODULE_PATH from CMAKE_MODULE_PATH This has to be done as each module puts dune-common_MODULE_PATH into CMAKE_MODULE_PATH to find the DUNE's cmake macros. This should be removed when building the complete CMAKE_MODULE_PATH module path (in reverse order of the dependency). Unfortunately, the conditional to check whether the variable dune-common_MODULE_PATH is set was incorrect. This commit fixes this. I hope that this fixes FS 1686 https://dune-project.org/flyspray/index.php?do=details&task_id=1686 Please merge to the release --- cmake/modules/DuneMacros.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake index d695176d4..5b95a7908 100644 --- a/cmake/modules/DuneMacros.cmake +++ b/cmake/modules/DuneMacros.cmake @@ -417,9 +417,9 @@ macro(dune_create_dependency_leafs depends depends_versions suggests suggests_ve endmacro(dune_create_dependency_leafs) macro(dune_create_dependency_tree) - if(${dune-common_MODULE_PATH}) - list(REMOVE_ITEM CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}) - endif(${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(${ProjectName}_DEPENDS_MODULE OR ${ProjectName}_SUGGESTS_MODULE) -- GitLab