← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5046: Add FindCGAL.cmake.dolfin for finding CGAL config. Includes compile/run

 

On Sat, 2010-08-21 at 20:52 +0000, noreply@xxxxxxxxxxxxx wrote:
> ------------------------------------------------------------
> revno: 5046
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: dolfin-dev
> timestamp: Sat 2010-08-21 22:45:13 +0200
> message:
>   Add FindCGAL.cmake.dolfin for finding CGAL config. Includes compile/run
>   test that passes on Lucid.

I don't think that this is the right approach (plus it no longer works
on my computer).

CGAL uses CMake, and generates a config file with loads of build
information, like libraries on which it depends. We should use the CMake
config file.

Garth


> removed:
>   cmake/FindCGAL.dolfin.cmake
> modified:
>   CMakeLists.txt
>   cmake/FindUMFPACK.dolfin.cmake
> 
> 
> --
> lp:dolfin
> https://code.launchpad.net/~dolfin-core/dolfin/main
> 
> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
> differences between files attachment (revision-diff.txt)
> === modified file 'CMakeLists.txt'
> --- CMakeLists.txt	2010-08-21 13:21:39 +0000
> +++ CMakeLists.txt	2010-08-21 20:45:13 +0000
> @@ -13,11 +13,6 @@
>  set(DOLFIN_VERSION "${DOLFIN_VERSION_MAJOR}.${DOLFIN_VERSION_MINOR}.${DOLFIN_VERSION_MICRO}")
>  add_definitions(-DPACKAGE_VERSION="${DOLFIN_VERSION}")
>  
> -# Debugging
> -#message("Calling CGAL test")
> -#find_package(CGAL.dolfin)
> -#message(FATAL_ERROR "test")
> -
>  #------------------------------------------------------------------------------
>  # General configuration
>  
> @@ -152,7 +147,6 @@
>      find_package(SWIG REQUIRED)
>      include(UseSWIG)
>    endif()
> -  message(STATUS "Python lib dir ${PYTHON_LIBRARIES}")
>  
>  endif()
>  
> @@ -187,7 +181,7 @@
>  
>  # Check for Trilinos
>  if (DOLFIN_ENABLE_TRILINOS)
> -  find_package(Trilinos PATHS $ENV{TRILINOS_DIR}/include)
> +  find_package(Trilinos PATHS "$ENV{TRILINOS_DIR}/include")
>  endif()
>  
>  # Check for MTL4
> 
> === removed file 'cmake/FindCGAL.dolfin.cmake'
> --- cmake/FindCGAL.dolfin.cmake	2010-08-21 13:21:39 +0000
> +++ cmake/FindCGAL.dolfin.cmake	1970-01-01 00:00:00 +0000
> @@ -1,26 +0,0 @@
> -# - Try to find CGAL
> -# Once done this will define
> -#
> -#  CGAL_FOUND    - system has CGAL
> -#  CGAL_USE_FILE - CMake file to use CGAL
> -#
> -# This test calls the standard CGAL test but in addition checks for
> -# MPFR which is needed by CGAL.
> -
> -message(STATUS "Checking for package 'CGAL'")
> -
> -# Check for header file
> -find_path(MPFR_INCLUDE_DIR mpfr.h
> -  $ENV{MPFR_DIR}
> -  /usr/local/include
> -  /usr/include
> -  DOC "Directory where the MPFR header is located"
> -  )
> -
> -# Call standard CGAL test
> -find_package(CGAL PATHS $ENV{CGAL_DIR}/lib QUIET)
> -
> -# Standard package handling
> -include(FindPackageHandleStandardArgs)
> -find_package_handle_standard_args(CGAL "CGAL could not be found. Be sure to set CGAL_DIR and MPFR_DIR."
> -                                  CGAL_FOUND MPFR_INCLUDE_DIR)
> 
> === modified file 'cmake/FindUMFPACK.dolfin.cmake'
> --- cmake/FindUMFPACK.dolfin.cmake	2010-08-12 21:50:21 +0000
> +++ cmake/FindUMFPACK.dolfin.cmake	2010-08-21 20:45:13 +0000
> @@ -10,20 +10,18 @@
>   )
>  mark_as_advanced(UMFPACK_INCLUDE_DIR)
>  
> -message(STATUS "UMF  ${UMFPACK_INCLUDE_DIR}")
> -
>  # Check for library
>  find_library(UMFPACK_LIBRARY
>    NAMES umfpack
>    HINTS $ENV{UMFPACK_DIR}
> -  PATHS /usr/local /opt/local /sw
> +  PATHS /usr/local /usr /opt/local /sw
>    PATH_SUFFIXES lib lib64
>    DOC "The UMFPACK library"
>    )
>  mark_as_advanced(UMFPACK_LIBRARY)
>  
>  # Try compiling and running test program
> -if(UMFPACK_INCLUDE_DIR AND UMFPACK_LIBRARY)
> +if (UMFPACK_INCLUDE_DIR AND UMFPACK_LIBRARY)
>  
>    # Set flags for building test program
>    set(CMAKE_REQUIRED_INCLUDES ${UMFPACK_INCLUDE_DIR})
> @@ -59,21 +57,9 @@
>  }
>  " UMFPACK_TEST_RUNS)
>  
> -  if(NOT UMFPACK_TEST_RUNS)
> -    message("   Unable to run test program for package 'UMFPACK'")
> -  endif(NOT UMFPACK_TEST_RUNS)
> -
> -endif(UMFPACK_INCLUDE_DIR AND UMFPACK_LIBRARY)
> -
> -if (UMFPACK_TEST_RUNS)
> -  include(FindPackageHandleStandardArgs)
> -  FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG UMFPACK_INCLUDE_DIR UMFPACK_LIBRARY)
> -endif (UMFPACK_TEST_RUNS)
> -
> -# Report results of tests
> -#if(UMFPACK_TEST_RUNS)
> -#  message("   Found package 'UMFPACK'")
> -#  set(UMFPACK_FOUND 1)
> -#else(UMFPACK_TEST_RUNS)
> -#  message("   Unable to configure package 'UMFPACK'")
> -#endif(UMFPACK_TEST_RUNS)
> +endif()
> +
> +# Standard package handling
> +include(FindPackageHandleStandardArgs)
> +FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG
> +  UMFPACK_INCLUDE_DIR UMFPACK_LIBRARY UMFPACK_TEST_RUNS)
> 





Follow ups