← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5032: Add extra includes for Boost used by Armadillo test, not sure if this

 

On Thu, Aug 19, 2010 at 9:31 PM,  <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 5032
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: dolfin
> timestamp: Thu 2010-08-19 21:28:38 +0200
> message:
>  Add extra includes for Boost used by Armadillo test, not sure if this
>  is the right way.

I think it is better if we use the Boost_INCLUDE_DIR variable defined
by the FindBoost module. We should either call find_package(Boost) in
FindArmadillo or assume that Boost_INCLUDE_DIR has already been
defined. The latter requires the find_package(Boost...) statement (in
CMakeLists.txt) to be moved before the call to
find_package(Armadillo...).

Johannes

> modified:
>  cmake/FindArmadillo.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
>
> === modified file 'cmake/FindArmadillo.dolfin.cmake'
> --- cmake/FindArmadillo.dolfin.cmake    2010-08-19 18:58:58 +0000
> +++ cmake/FindArmadillo.dolfin.cmake    2010-08-19 19:28:38 +0000
> @@ -30,8 +30,10 @@
>   )
>  mark_as_advanced(ARMADILLO_LIBRARY)
>
> -# On mac systems, we likely have to link against the vecLib framework
> +# Special fixes for Mac
>  if (APPLE)
> +
> +  # Link against the vecLib framework
>   include(CMakeFindFrameworks)
>   CMAKE_FIND_FRAMEWORKS(vecLib)
>   if (vecLib_FRAMEWORKS)
> @@ -40,13 +42,19 @@
>   else()
>     message(STATUS "vecLib framework not found.")
>   endif()
> +
> +  # Add includes for Boost
> +  set(ARMADILLO_EXTRA_INCLUDES "/opt/local/include")
> +
>  endif()
>
> +message("CHECK: ${ARMADILLO_EXTRA_INCLUDES}")
> +
>  if (ARMADILLO_INCLUDE_DIR AND ARMADILLO_LIBRARY)
>   include(CheckCXXSourceRuns)
>
>   # These are needed for the try_run and check_cxx_source_runs commands below
> -  set(CMAKE_REQUIRED_INCLUDES ${ARMADILLO_INCLUDE_DIR})
> +  set(CMAKE_REQUIRED_INCLUDES ${ARMADILLO_INCLUDE_DIR} ${ARMADILLO_EXTRA_INCLUDES})
>   set(CMAKE_REQUIRED_LIBRARIES ${ARMADILLO_LIBRARY})
>   if (ARMADILLO_LINK_FLAGS)
>     set(CMAKE_REQUIRED_LIBRARIES "${ARMADILLO_LINK_FLAGS} ${CMAKE_REQUIRED_LIBRARIES}")
>
>
>



Follow ups