← Back to team overview

dolfin team mailing list archive

Re: JIT unit test and OSX

 

On Mon, Jan 21, 2013 at 12:58 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> DOLFIN shouldn't provide FindDolfin.cmake. That's the task of CMake or
> the application developer, if is necessary, which it usually isn't if
> the library produces a CMake config file. DOLFIN provides
>
>     dolfin-config.cmake

I agree. We don't need a FindDolfin.cmake file in addition to
dolfin-config.cmake.

> A small number of projects provide UseDolfin.cmake. What's it used for
> beyond the regular dolfin-config.cmake file?

The UseDOLFIN.cmake is only needed for convenience. Then one can do

  find_package(dolfin REQUIRED)
  if (dolfin_FOUND)
    include(${DOLFIN_USE_FILE})
  endif()

and everything would be set up correctly. With only
dolfin-config.cmake, we would have to do something like this instead:

  find_package(dolfin REQUIRED)
  if (dolfin_FOUND)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DOLFIN_CMAKE_CXX_FLAGS}")
    include_directories(${DOLFIN_INCLUDE_DIRECTORIES})
    ...
  endif()

Like we do in the C++ demos.

Johannes


References