[Bug 306323] [kdepimlibs] missed boost dependency in KdepimLibsConfig.cmake.in

Andreas K. Huettel dilfridge at gentoo.org
Fri Sep 7 17:43:02 BST 2012


https://bugs.kde.org/show_bug.cgi?id=306323

--- Comment #15 from Andreas K. Huettel <dilfridge at gentoo.org> ---
> - Adding the boost include dir to kdepimlibs_include_dirs supposes that :
> 1/ Boost was already found,

>From /CMakeLists.txt:

set(Boost_MINIMUM_VERSION "1.34.0")
if (WIN32)
  find_package(Boost ${Boost_MINIMUM_VERSION}) # (jstaniek) temp. fix unless we
have graph library, not just headers
else()
  find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS graph)
endif()
macro_log_feature(Boost_FOUND "Boost C++ Libraries" "Required by core
components" "http://www.boost.org" TRUE "${Boost_MINIMUM_VERSION}" "Boost must
include the boost-graph library")
[...]
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}
${Boost_INCLUDE_DIR})

OK, it's not marked as REQUIRED. Which means build takes place as well if it is
not found. However:

> 2/ All of kdepimlibs needs boost
> 
> These two statements are incorrect. Adding a find_package(boost) is excluded
> because of 2 and the posted patch is wrong because of 1.

The find_package(boost) is already there, see above.

And please have a look at the following output:
huettel at grenadine ~/tmp/kdepimlibs-4.9.1 $ find . -name CMakeLists.txt -exec
grep -i boost {} +
./kblog/CMakeLists.txt:include_directories(${Boost_INCLUDE_DIR})
./kioslave/imap4/CMakeLists.txt:include_directories(${imap4_optional_includes}
${Boost_INCLUDE_DIR})
./syndication/tests/CMakeLists.txt:include_directories( ../
${Boost_INCLUDE_DIR} )
./syndication/CMakeLists.txt:include_directories( ${Boost_INCLUDE_DIR} )
./CMakeLists.txt:set(Boost_MINIMUM_VERSION "1.34.0")
./CMakeLists.txt:  find_package(Boost ${Boost_MINIMUM_VERSION}) # (jstaniek)
temp. fix unless we have graph library, not just headers
./CMakeLists.txt:  find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS
graph)
./CMakeLists.txt:macro_log_feature(Boost_FOUND "Boost C++ Libraries" "Required
by core components" "http://www.boost.org" TRUE "${Boost_MINIMUM_VERSION}"
"Boost must include the boost-graph library")
./CMakeLists.txt:include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
${KDE4_INCLUDES} ${Boost_INCLUDE_DIR})
./gpgme++/CMakeLists.txt:include_directories(  ${GPGME_INCLUDES}
${Boost_INCLUDE_DIR} )
./gpgme++/CMakeLists.txt:set( GPGMEPP_INCLUDE ${INCLUDE_INSTALL_DIR}
${GPGME_INCLUDES} ${Boost_INCLUDE_DIR} )
./mailtransport/CMakeLists.txt:  ${Boost_INCLUDE_DIR}
./akonadi/tests/testrunner/CMakeLists.txt:    ${Boost_INCLUDE_DIR}
./akonadi/tests/etm_test_app/CMakeLists.txt:    ${Boost_INCLUDE_DIR}
./akonadi/tests/CMakeLists.txt:    ${Boost_INCLUDE_DIR}
./akonadi/tests/benchmarker/CMakeLists.txt:    ${Boost_INCLUDE_DIR}
./akonadi/CMakeLists.txt:  ${Boost_INCLUDE_DIR}
./akonadi/kmime/CMakeLists.txt:        ${Boost_INCLUDE_DIR}
./akonadi/contact/CMakeLists.txt:    ${Boost_INCLUDE_DIR}
./includes/tests/CMakeLists.txt:  ${Boost_INCLUDE_DIR}
./kimap/tests/CMakeLists.txt:include_directories( ${CMAKE_SOURCE_DIR}/kimap
${Boost_INCLUDE_DIR})
./kimap/CMakeLists.txt:include_directories( ${CMAKE_SOURCE_DIR}/kioslave
${SASL2_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
./kldap/CMakeLists.txt:  ${Boost_INCLUDE_DIR}
./qgpgme/tests/CMakeLists.txt:include_directories( ${Boost_INCLUDE_DIR} )
./qgpgme/CMakeLists.txt:   include_directories( ${GPGME_INCLUDES}
${CMAKE_SOURCE_DIR}/gpgme++ ${Boost_INCLUDE_DIR} )

This means kblog, kioslave/imap4, syndication, gpgme++, mailtransport, akonadi,
kimap, kldap, and qgpgme already use Boost includes in the CMakeLists.txt,
which makes me strongly doubt if they build without Boost. Is kdepimlibs useful
if you switch off these components? (Not that it is done anywhere in the build
system.)

> And even without 1 & 2, that would mean we'd have to support FindBoost.cmake

You already do.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list