[CMake] Boost Link errors in CMAKE

Andreas Pakulat apaku at gmx.de
Mon Jun 23 13:33:06 EDT 2008


On 23.06.08 12:25:38, Ravi Tej Kavalipati wrote:
> I am using the Cmake to link the boost libraries to my project HPX, But im
> getting various link errors in the process.
> can anyone please let me know if I am misrepresenting anything.
> ___________________________________________________________________________
> #CMakeLists.txt
> # Distributed under the Boost Software License, Version 1.0. (See
> accompanying
> # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
> 
> # We require at least CMake V2.6
> cmake_minimum_required(VERSION 2.6)
> 
> # The name of our project is "hpx".  CMakeLists files in this project can
> # refer to the root source directory of the project as ${hpx_SOURCE_DIR} and
> # to the root binary directory of the project as ${hpx_BINARY_DIR}.
> project (hpx)
> 
> # We need to use Boost
> find_package(Boost 1.35.0 COMPONENTS system filesystem threads signals
> archive )

Are you using target_link_libraries with your target and the variables
set by FindBoost.cmake? Just having

> LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

This won't magically link yout executables against the needed boost
libs.

Andreas

-- 
You will be audited by the Internal Revenue Service.


More information about the CMake mailing list