[CMake] Probably a bug in FindIce.cmake
Ravi Kumar Singh
rkspsm at gmail.com
Sun Jan 4 08:21:38 EST 2015
Yes, its working fine, thanks.
On Sun, Jan 4, 2015 at 6:37 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
> Am Sonntag, 4. Januar 2015, 18:28:43 schrieb Ravi Kumar Singh:
> > In FindIce.cmake, when searching for libraries, there are lots of if
> > conditionals with quotes around their arguments. With changes in cmake
> 3.1
> > (policy CMP0054), they are preventing the module to find libraries
> > successfully. See lines 285, 292, 293, 299 in Modules/FindIce.cmake
> >
> > I am new to cmake thus have little experience with cmake language, so I
> am
> > not sure if its a bug, but removing the quotes made it find ice and
> > libraries properly.
>
> Please try if the attached patch fixes all your issues:
>
> commit 65351fe916f2d537e722ccbcc37ed1b76bd1af0e
> Author: Rolf Eike Beer <eike at sf-mail.de>
> Date: Sun Jan 4 14:06:14 2015 +0100
>
> FindICE: remove quoting of variable names that must be dereferenced
>
> diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
> index 76cecc1..8493d80 100644
> --- a/Modules/FindIce.cmake
> +++ b/Modules/FindIce.cmake
> @@ -282,21 +282,21 @@ function(_Ice_FIND)
> PATH_SUFFIXES ${ice_library_suffixes}
> DOC "Ice ${component} library")
> mark_as_advanced("${component_cache}")
> - if("${component_cache}")
> + if(${component_cache})
> set("${component_found}" ON)
> list(APPEND Ice_LIBRARY "${${component_cache}}")
> endif()
> mark_as_advanced("${component_found}")
> set("${component_cache}" "${${component_cache}}" PARENT_SCOPE)
> set("${component_found}" "${${component_found}}" PARENT_SCOPE)
> - if("${component_found}")
> - if ("Ice_FIND_REQUIRED_${component}")
> + if(${component_found})
> + if (Ice_FIND_REQUIRED_${component})
> list(APPEND Ice_LIBS_FOUND "${component} (required)")
> else()
> list(APPEND Ice_LIBS_FOUND "${component} (optional)")
> endif()
> else()
> - if ("Ice_FIND_REQUIRED_${component}")
> + if (Ice_FIND_REQUIRED_${component})
> set(Ice_REQUIRED_LIBS_FOUND OFF)
> list(APPEND Ice_LIBS_NOTFOUND "${component} (required)")
> else()
> @@ -356,7 +356,7 @@ if(Ice_FOUND)
> set(_Ice_component_cache "Ice_${_Ice_component_upcase}_LIBRARY")
> set(_Ice_component_lib "Ice_${_Ice_component_upcase}_LIBRARIES")
> set(_Ice_component_found "${_Ice_component_upcase}_FOUND")
> - if("${_Ice_component_found}")
> + if(${_Ice_component_found})
> set("${_Ice_component_lib}" "${${_Ice_component_cache}}")
> endif()
> unset(_Ice_component_upcase)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150104/8491ce5f/attachment.html>
More information about the CMake
mailing list