[Gmsh] Possible bug in CMakeLists.txt script?: Stack size not set to 16 MB and Win32icon.res not linked for MinGW builds

Trevor Strickler trevor.strickler at gmail.com
Sun Nov 21 21:37:18 CET 2010


Hello,

I have successfully compiled Gmsh in the MinGW  platform for Windows. I
choose MinGW because cygwin builds will rely on a cygwin dll (and
-mno-cygwin option has been removed from new releases of gcc), and I do not
feel inclined to purchase MS VC. Anyway, I discovered that the
CMakeLists.txt file you distribute with Gmsh does not create makefiles for
MinGW that tell the linker to set the stack size to 16 MB, nor does it link
the Win32icon.  I made a modification that will allow that to happen.  I
added the following elseif statement to the code block in the cmake script
that is in charge of setting the stacksize for windows builds:

elseif( CMAKE_GENERATOR STREQUAL "MinGW Makefiles" OR CMAKE_GENERATOR
STREQUAL "MinGW Makefiles" OR CMAKE_GENERATOR  STREQUAL "Eclipse CDT4 -
MinGW Makefiles" )
  set_target_properties(gmsh PROPERTIES LINK_FLAGS
    "-Wl,--stack,16777216
${CMAKE_CURRENT_SOURCE_DIR}/Fltk/Win32Icon.res
    -mwindows")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20101121/16aafaf0/attachment.html>