Boost logo

Boost Users :

Subject: Re: [Boost-users] makefile
From: Olivier Tournaire (olitour_at_[hidden])
Date: 2009-08-26 13:28:13


Hi,

Here is an example:
>
> project( MyProject )
>
> set( Boost_ADDITIONAL_VERSIONS "1.38.0" "1.39.0" )
> set( Boost_USE_STATIC_LIBS OFF )
> set( Boost_USE_MULTITHREAD ON )
> find_package( Boost 1.36.0 REQUIRED )
> if( Boost_FOUND )
> include_directories( ${Boost_INCLUDE_DIR} )
> link_directories( ${Boost_LIBRARY_DIR} )
> else()
> message( FATAL_ERROR "Boost not found ! Please set Boost directories !"
> )
> endif()
>
> add_executable( projectbinary myproject.cpp )
> target_link_libraries( projectbinary ${Boost_LIBRARIES} )
>

I made a mistake. Please use this line:

find_package( Boost 1.36.0 REQUIRED thread system unit_test_framework )

You can be more specific on the libs you want to use.

Regards,

Olivier



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net