<div dir="ltr">Maybe save and restore the CMAKE_SHARED_LINKER_FLAGS around your reset of it in the sub-CMakeLists.txt...?<br><br><br><div class="gmail_quote">On Wed, Sep 3, 2008 at 10:41 AM, Martin Apel <span dir="ltr">&lt;<a href="mailto:martin.apel@simpack.de">martin.apel@simpack.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I have defined the following in a top-level CMakeLists.txt:<br>
 &nbsp;SET (CMAKE_SHARED_LINKER_FLAGS &quot;${CMAKE_SHARED_LINKER_FLAGS}<br>
-Wl,--unresolved-symbols=ignore-in-shared-libs&quot;)<br>
<br>
Now I&#39;d like to reset this for one specific library in a subdirectory<br>
(in a separate CMakeLists.txt added with ADD_SUBDIRECTORY to the main<br>
CMakeLists.txt). I tried to use<br>
 &nbsp;SET_TARGET_PROPERTIES (FortranInterface PROPERTIES LINK_FLAGS<br>
-Wl,--unresolved-symbols=ignore-in-object-files&quot;)<br>
which reverses the effect of &quot;ignore-in-shared-libs&quot;. Unfortunately the<br>
linker rule contains the LINK_FLAGS before CMAKE_SHARED_LINKER_FLAGS, so<br>
this cannot be used to override the setting. I have also tried resetting<br>
CMAKE_SHARED_LINKER_FLAGS in the sub-CMakeLists.txt, but then it applies<br>
to all other<br>
libraries handled in this CMakeLists.txt as well.<br>
<br>
Any ideas, how I can solve this problem?<br>
<br>
Regards,<br>
<br>
Martin<br>
<br>
____________<br>
Virus checked by G DATA AntiVirus<br>
Version: AVF 19.21 from 03.09.2008<br>
<br>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>