[CMake] CMake Digest, Vol 117, Issue 38
Pritesh Acharya
priteshacharya at gmail.com
Sun Jan 26 01:44:25 EST 2014
>
>
> Since you are not telling us your CMake version I can't say for sure,
> but it may just be that the FindBoost module does not know about the
> newer Boost version.
>
> > how can i update the FindBoost.cmake file so that I get new version ?
>
> set(Boost_ADDITIONAL_VERSIONS 1.55 1.55.0)
> find_package(Boost)
>
> Make sure to do that with a clean cache (e.g. new build dir), otherwise
> the result of the previous run will be reused.
>
> Eike
>
> Here is my CMakeList file
project (sample_project1)
cmake_policy(SET CMP0015 NEW)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
if (UNIX)
find_package(Boost 1.36.0 COMPONENTS thread log filesystem)
else()
set(BOOST_ROOT C:/boost_1_55_0)
find_package(Boost 1.55.0 COMPONENTS thread log filesystem)
endif()
SET(SOURCE
main.cc sqr.cc
)
SET(HEADERS
sqr.h zhelpers.h
)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
if (UNIX)
message(status "GCC")
add_executable (sample_project1 ${SOURCE} ${HEADERS})
target_link_libraries(sample_project1 ${Boost_LIBRARIES} czmq zmq)
else()
message(status "MSVC")
include_directories("D:\\projects\\lpa\\lpa_c\\ext_library\\zmq\\czmq\\czmq-2.0.3\\include")
include_directories("D:\\projects\\lpa\\lpa_c\\ext_library\\zmq\\zeromq-4.0.3\\include")
link_directories("D:\\projects\\lpa\\lpa_c\\ext_library\\zmq\\czmq\\czmq-2.0.3\\lib\\Release")
link_directories("D:\\projects\\lpa\\lpa_c\\ext_library\\zmq\\zeromq-4.0.3\\lib\\Release")
#PATH=D:\projects\lpa\lpa_c\ext_library\zmq\zeromq-4.0.3\lib\Release;%PATH%
add_executable (sample_project1 ${SOURCE} ${HEADERS})
target_link_libraries(sample_project1 ${Boost_LIBRARIES} czmq libzmq)
endif ()
else()
message(STATUS "Fail asdasd!")
endif()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140126/212f5131/attachment.html>
More information about the CMake
mailing list