<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>I am trying to use CMake as my Fortran project build tool, it is a wonderful project guard!. But a annoying problem comes up. I searched all around the internet, but no easy document for me : (. Since I want to use static-linking, the Intel Fortran compiler complains "undefined reference to" when it links objects for an executable.</div><div><br></div><div>The structure of the project is:</div><div><br></div><div>CMakeLists.txt <font class="Apple-style-span" color="#3A00FF">core init_data m</font><font class="Apple-style-span" color="#3A00FF">ain test util</font></div><div><br></div><div>and there will be static libraries under util and core as <font class="Apple-style-span" color="#FF0000">libutil.a</font> and <font class="Apple-style-span" color="#FF0000">libcore.a</font>. Further more, libcore.a depends on libutil.a.</div><div><br></div><div>Finally, an executable will be generated under main which uses libcore.a and libutil.a.</div><div><br></div><div>So how can I accomplish this? Thanks very much. I really want to learn CMake~</div><div><br></div><div>Best regards,</div><div><br></div><div>DONG Li</div></body></html>