[Dune-devel] [Dune-Commit] [Commit] dune-grid - 6ba7040: [CMake] UseUG does no longer emit warnings when UG is not found.

Markus Blatt markus at dr-blatt.de
Thu May 15 22:31:12 CEST 2014


As I cannot filter the lines that fixed the problem, would you
commenting what the problem was?

On Thu, May 15, 2014 at 11:15:52AM +0200, Christoph Grüninger wrote:
> New commit, appeared at Thu May 15 11:15:52 2014 +0200
> as part of the following ref changes:
> 
>     branch refs/heads/releases/2.3    updated from bea71a5 -> 739e827
> 
> Browsable version: http://cgit.dune-project.org/repositories/dune-grid/commit/?id=6ba7040a1ea078e98ee705e263acabcf385317a0
> 
> ======================================================================
> 
> commit 6ba7040a1ea078e98ee705e263acabcf385317a0
> Author: Christoph Grüninger <gruenich at dune-project.org>
> Date:   Thu May 1 18:25:11 2014 +0200
> 
>     [CMake] UseUG does no longer emit warnings when UG is not found.
>     
>     Add result logging.
>     
>     (cherry picked from commit 25f3e041ffe63b8b0843aa88f3947103baede344)
>     Signed-off-by: Christoph Grüninger <gruenich at dune-project.org>
> 
>  cmake/modules/UseUG.cmake | 35 ++++++++++++++++++++---------------
>  1 file changed, 20 insertions(+), 15 deletions(-)
> 
> 
> 
> diff --git a/cmake/modules/UseUG.cmake b/cmake/modules/UseUG.cmake
> index 157adf7..5dff344 100644
> --- a/cmake/modules/UseUG.cmake
> +++ b/cmake/modules/UseUG.cmake
> @@ -21,21 +21,16 @@ if(UG_ROOT AND NOT UG_DIR)
>    endif()
>  endif(UG_ROOT AND NOT UG_DIR)
>  
> -find_package(UG 3.9.1)
> +find_package(UG 3.9.1 QUIET)
>  
> -if(NOT UG_FOR_DUNE STREQUAL "yes")
> -  message(WARNING "UG was not configured for DUNE. Did pass --enable-dune to its configure?")
> -  set(UG_FOUND)
> -endif(NOT UG_FOR_DUNE STREQUAL "yes")
> -if(NOT CMAKE_DISABLE_FIND_PACKAGE_UG)
> -  if(NOT UG_FOUND)
> -    message(WARNING "CMake will only find UG 3.9.1-patch10 or newer. Maybe you need to upgrade?")
> -  endif(NOT UG_FOUND)
> -endif(NOT CMAKE_DISABLE_FIND_PACKAGE_UG)
> -set(HAVE_UG ${UG_FOUND})
> +if(UG_FOUND AND (NOT UG_FOR_DUNE STREQUAL "yes"))
> +  message(WARNING "UG was not configured for DUNE. Did you pass --enable-dune to its configure?")
> +  set(UG_FOUND "UG_FOUND-NOTFOUND")
> +endif()
>  
> -if(${UG_FOUND})
> +set(HAVE_UG ${UG_FOUND})
>  
> +if(UG_FOUND)
>    # parse patch level: last number in UG version string is DUNE patch level
>    string(REGEX MATCH "[0-9]*$" UG_DUNE_PATCHLEVEL ${UG_VERSION})
>  
> @@ -67,14 +62,24 @@ if(${UG_FOUND})
>          list(APPEND UG_LIBRARIES ${full_path})
>        endif(full_path)
>    endforeach(lib ugS2 ugS3 devS)
> -endif(${UG_FOUND})
>  
> -#add all ug related flags to ALL_PKG_FLAGS, this must happen regardless of a target using add_dune_ug_flags
> -if(UG_FOUND)
> +  # add all UG related flags to ALL_PKG_FLAGS, this must happen
> +  # regardless of a target using add_dune_ug_flags
>    set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-DENABLE_UG")
>    foreach(dir ${UG_INCLUDES})
>      set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-I${dir}")
>    endforeach()
> +  # log result
> +  file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
> +    "Determining location of UG ${UG_VERSION} succeded:\n"
> +    "Include directories: ${UG_INCLUDES}\n"
> +    "Libraries: ${UG_LIBRARIES}\n\n")
> +else()
> +  # log errornous result
> +  file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
> +    "Determining location of UG failed:\n"
> +    "Include directories: ${UG_INCLUDES}\n"
> +    "Libraries: ${UG_LIBRARIES}\n\n")
>  endif()
>  
>  # Add flags to targets
> 
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140515/5fdc0ec8/attachment.sig>


More information about the Dune-devel mailing list