Philip,<div><br></div><div>Ok... so it works with the Build_Type thing set, but now with out it. I also I'm using XCode sometimes and it doesn't use the linker flags at all.</div><div><br></div><div>-Neal<br><br><div class="gmail_quote">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="Ih2E3d">
</div><div><br>It could be something simple like<br>1. The CMAKE_EXE_LINKER_FLAGS_<config> variable is somehow not in scope when you're calling add_executable()<br>2. Setting CMAKE_EXE_LINKER_FLAGS_MinSizeRel (uppercase config names seems to be the only thing that works for me).<br>
3. You forgot to set CMAKE_BUILD_TYPE at configure time<br><br>Could you try the following small CMakeLists.txt on your system and see if it works OK?<br><br>====<br>
project(Foo)<br>
cmake_minimum_required(VERSION 2.6)<br>
<br>
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-L/FOO_DEBUG_OK")<br>
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-L/FOO_RELEASE_OK")<br>
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-L/FOO_MINSIZEREL_OK")<br>
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-L/FOO_RELWITHDEBINFO_OK")<div class="Ih2E3d"><br>
<br>
add_executable(foo foo.cc)<br></div>
====<br>cmake -DCMAKE_BUILD_TYPE=Debug<br></div></div><br><br clear="all"><br>-- <br><font color="#888888">Philip Lowman<br>
</font></blockquote></div><br></div>