[Gmsh] patching CMakeLists.txt for TAUCS
Joseph Mingrone
jrm at ftfl.ca
Thu Sep 1 16:09:29 CEST 2016
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20160901/a4b93834/attachment.asc>
More information about the gmsh
mailing list