From: abn Date: Tue, 15 Apr 2014 09:17:15 +0000 (+0200) Subject: CMake: fixed minor bug: when a _ROOT_DIR variable was set by the user after X-Git-Tag: V7_4_0rc1~15^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6f9c5bd0eb17ab1f0cb40d4761995f48f093526;p=modules%2Fkernel.git CMake: fixed minor bug: when a _ROOT_DIR variable was set by the user after having run CMake once, it was not taken into account (because of CMake cache persistency). --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 8c85651f3..2c892693e 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -465,8 +465,8 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount) ELSE() SET(_var_already_there FALSE) ENDIF() - # Make cache entry - SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory") + # Make cache entry, giving precedence to the env variable + SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory" FORCE) ## ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)