Thanks to David & Daniel for the replies, but I was
already doing everything by the book, so their replies
didn't help.  It seems to be a bug, or flaky feature, in boost; I had
to disable "auto-linking".  Here's the final, working CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
# Turn off boost's autolinking feature, since it seems to guess wrong
about the name of the library
add_definitions(-DBOOST_ALL_NO_LIB)
find_package(Boost 1.45 COMPONENTS date_time REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
add_executable(mymain mymain.cpp)
target_link_libraries(mymain ${Boost_LIBRARIES})

The only change from before was adding the add_definitions line.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to