<div class="gmail_quote">On Fri, Feb 6, 2009 at 7:48 PM, Neal Meyer <span dir="ltr"><<a href="mailto:nmeyer@dottedzebra.com">nmeyer@dottedzebra.com</a>></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> set( CMAKE_EXE_LINKER_FLAGS_DEBUG "-lboost_regex-xgcc40-mt-d" ) <br> set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-lboost_regex-xgcc40-mt" )<br>
<br>and then a exe that needs this library to link.... <br><br>However the makefile doesn't actually add this option in. If i use CMAKE_EXE_LINKER_FLAGS it works fine. 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*. It at least works fine on my system with 2.6.2 (Linux). 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. 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 <minimum_version> 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>