[Gmsh] patching CMakeLists.txt for TAUCS

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Sep 1 19:33:49 CEST 2016


Dear Joseph,

The Taucs timing code uses ftime, which indeed is obsolete. I've changed our Taucs config to disable timings - we don't use them anyway. The fix is in SVN.

Christophe

> On 01 Sep 2016, at 16:09, Joseph Mingrone <jrm at ftfl.ca> wrote:
> 
> Hello,
> 
> There is a linking issue with the FreeBSD gmsh package when TAUCS is enabled.  Here is a build snippet.
> 
> ----
> CMakeFiles/gmsh.dir/contrib/taucs/G/taucs_timer.c.o: In function `taucs_wtime':
> /wrkdirs/usr/ports/cad/gmsh/work/gmsh-2.13.2-source/contrib/taucs/G/taucs_timer.c:(.text+0xd): undefined reference to `ftime'
> ----
> 
> I believe adding '-lcompat' when linking gmsh solves the problem.  How can cmake be instructed to do this?
> 
> I tried patching CMakeLists.txt as below, but without success.
> 
> Regards,
> 
> Joseph
> 
> --- CMakeLists.txt.orig	2016-08-31 20:17:30 UTC
> +++ CMakeLists.txt
> @@ -887,6 +887,10 @@ if(HAVE_SOLVER)
>       else(WIN32)
>         add_definitions(-DOSTYPE_linux)
>       endif(WIN32 OR CYGWIN)
> +      find_library(COMPAT_LIB compat)
> +      if(COMPAT_LIB)
> +        list(APPEND LINK_LIBRARIES ${COMPAT_LIB})
> +      endif(COMPAT_LIB)
>       file(GLOB_RECURSE TAUCS_D ${CMAKE_CURRENT_BINARY_DIR}/contrib/taucs/D/*.c)
>       file(GLOB_RECURSE TAUCS_S ${CMAKE_CURRENT_BINARY_DIR}/contrib/taucs/S/*.c)
>       file(GLOB_RECURSE TAUCS_Z ${CMAKE_CURRENT_BINARY_DIR}/contrib/taucs/Z/*.c)
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list