<div dir="ltr">Hi Eike,<br><div class="gmail_extra"><br><div class="gmail_quote">On 17 October 2013 12:32, Rolf Eike Beer <span dir="ltr"><<a href="mailto:eike@sf-mail.de" target="_blank">eike@sf-mail.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
1) CMake generates this link.txt (error when linking)<br>
/usr/bin/c++ -lfusion_io -ladios -lmxml -lmpi -lopen-rte -lopen-pal<br>
-lpthread -lstdc++ CMakeFiles/niio-main.dir/main.<u></u>cpp.o -o niio-main<br>
-rdynamic -L/home/testuser/dev/niio/lib<br>
-L/home/testuser/dev/niio/<u></u>openmpi/lib<br>
<br>
<br>
2) Desired linking that works:<br>
/usr/bin/c++ CMakeFiles/niio-main.dir/main.<u></u>cpp.o -lfusion_io -ladios<br>
-lmxml -lmpi -lopen-rte -lopen-pal -lpthread -lstdc++ -o niio-main<br>
-rdynamic -L/home/testuser/dev/niio/lib<br>
-L/home/testuser/dev/niio/<u></u>openmpi/lib<br><br></blockquote></div></div>
cmake --help-module FindMPI<br>
cmake --help-module FindThreads (I doubt you need it, this is probably only a dependency of MPI which should take care for that itself)<br>
cmake --help-command link_directories<br>
<br>
To get -g: cmake -D CMAKE_BUILD_TYPE=Debug … (or =RelWithDebInfo).<br></blockquote><div><br></div><div>On this example I'm using a specific MPI compiled for this example. I do not want to used the MPI installed in the system.</div>
<div><br></div><div>I read the help for that commands (and many other things) and I didn't find how to move link flags after the object file.</div><div><br></div><div>I'm lost. Where I must look for to understand how to modify the way link.txt is generated? At least specify that my main.cpp.o must be the first in the chain.</div>
<div><br></div><div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>JP</div></div><br></div></div>