← Back to team overview

dolfin team mailing list archive

Re: Problems with MTL

 

The flags shouldn't be added.

It is possible to set compiler options locally in .cpp files. See rev
6299 where I did this to get around a Boost problem.

Garth

On 21 October 2011 11:53, Johannes Ring <johannr@xxxxxxxxx> wrote:
> On Fri, Oct 21, 2011 at 9:40 AM, Anders Logg <logg@xxxxxxxxx> wrote:
>> Would it be possible to add -fpermissive only in the case when MTL4 is
>> detected?
>
> Yes. Try to add that flag to CMAKE_REQUIRED_FLAGS in FindMTL4.cmake:
>
> === modified file 'cmake/modules/FindMTL4.cmake'
> --- cmake/modules/FindMTL4.cmake        2011-02-04 10:02:55 +0000
> +++ cmake/modules/FindMTL4.cmake        2011-10-21 10:49:30 +0000
> @@ -33,7 +33,7 @@
>   # Set flags for building test program
>   set(CMAKE_REQUIRED_INCLUDES  ${MTL4_INCLUDE_DIRS} ${Boost_INCLUDE_DIR})
>   set(CMAKE_REQUIRED_LIBRARIES ${MTL4_LIBRARIES})
> -  set(CMAKE_REQUIRED_FLAGS ${MTL4_DEFINITIONS})
> +  set(CMAKE_REQUIRED_FLAGS ${MTL4_DEFINITIONS} -fpermissive)
>
>   # Build and run test program
>   include(CheckCXXSourceRuns)
>
> Johannes
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>


References