<div class="gmail_quote">On Fri, Feb 6, 2009 at 7:48 PM, Neal Meyer <span dir="ltr">&lt;<a href="mailto:nmeyer@dottedzebra.com">nmeyer@dottedzebra.com</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;">
I have something like the following in my CMakeLists file.<br><br>&nbsp;set( CMAKE_EXE_LINKER_FLAGS_DEBUG &quot;-lboost_regex-xgcc40-mt-d&quot; )&nbsp;&nbsp;&nbsp; <br>&nbsp;set( CMAKE_EXE_LINKER_FLAGS_RELEASE &quot;-lboost_regex-xgcc40-mt&quot; )<br>

<br>and then a exe that needs this library to link.... <br><br>However the makefile doesn&#39;t actually add this option in.&nbsp; If i use CMAKE_EXE_LINKER_FLAGS it works fine.&nbsp; Am I missing something?<br><br>using CMake 2.6.2</blockquote>
<div><br>Neal,<br><br>What you have there should be being added to the linker flags for *executables*.&nbsp; It at least works fine on my system with 2.6.2 (Linux).&nbsp; It will not work for libraries, however, so you probably want something better.<br>
<br>In this light I suggest you try using FindBoost.cmake.&nbsp; I believe the version in 2.6.2 should work for your needs although if you have any issues at all please try[1] CMake 2.6.3 RC 11 and see the updated FindBoost documentation for debugging options.<br>
<br>find_package(Boost &lt;minimum_version&gt; REQUIRED regex)<br>include_directories(${Boost_INCLUDE_DIRS})<br>add_executable(foo foo.cc)<br>target_link_libraries(foo ${Boost_LIBRARIES})<br></div></div><br><br>[1] = <a href="http://www.cmake.org/files/v2.6/">http://www.cmake.org/files/v2.6/</a><br clear="all">
<br>-- <br>Philip Lowman<br>