]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
CMake: fixed minor bug: when a _ROOT_DIR variable was set by the user after
authorabn <adrien.bruneton@cea.fr>
Tue, 15 Apr 2014 09:17:15 +0000 (11:17 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 15 Apr 2014 09:17:15 +0000 (11:17 +0200)
having run CMake once, it was not taken into account (because of CMake cache
persistency).

salome_adm/cmake_files/SalomeMacros.cmake

index 8c85651f31fd1ada802d8544d171b3ad5eb9f237..2c892693e2e21f28b4f14f2246bb0ad03171a3b2 100644 (file)
@@ -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)