<div dir="ltr"><div>For building my project on Linux with gcc I set the following.</div><div><br></div>set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")<br clear="all"><div><br></div><div>Later, if, the system appears to be OSX, I change it:</div><div><br></div><div>if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")<br><br>    set(CMAKE_EXE_LINKER_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")<br>    set(CMAKE_PREFIX_PATH /usr/local/opt/ncurses)<br><br>endif()<br></div><div><br></div><div>However, when creating the shared object, linking fails.  The flags are not being passed to clang as expected.  When I dive into CMakeFile/vterm-shared.dir/link.txt I confirm that the wrong flags are there.  </div><div><br></div><div>What am I doing wrong?</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Bryan<br><><</div></div>