User module is compiling on Mac but not on Linux

17 views
Skip to first unread message

Karol Lewandowski

unread,
Dec 14, 2017, 9:11:16 AM12/14/17
to mofem...@googlegroups.com
Hello,

Recently I have been struggling with the problem stated in the subject. My user module was compiling fine on OSX but not on the server (with Linux) This is very common issue, so I have an idea to start a topic in which people could report similar issues with cross-platform compiling and indicate how was it solved. In my case, it turned out that on Linux you need to remember to preserve proper order of target_link_libraries in CMakeLists.txt. 

target_link_libraries(crack_propagation

   fm_crack_propagation

   mwls

   users_modules

   mofem_finite_elements

   mofem_interfaces

   mofem_multi_indices

   mofem_petsc

   users_modules_obsolete

   mofem_approx

   mofem_third_party

   mofem_cblas

   ${MoFEM_PROJECT_LIBS}

 )



I that case fm_crack_propagation depends on mwls and the other libraries, so you need make sure to put it first to avoid problems with compilation. :) 

Cheers
Reply all
Reply to author
Forward
0 new messages