Search code examples
c++boostcmakecmake-gui

cmake findboost how to set -g tag of the ABI?


I am having problems finding the boost-log library with the findboost module of cmake.

instead of libboost_log-vc120-mt-sgd-1_57 (which is present in my boost lib diretory) cmake searches for: libboost_log-vc120-mt-sd-1_57 which is not present.

i have tried to enable Boost_USE_DEBUG_RUNTIME at the invokation of cmake (command line parameter) and also in my cmakelists.txt file, but it has no effect ont the ABI tag of the library names cmake find searches for.

the cmake version i am using is 3.1.0

in the documentation they write:

Boost_USE_DEBUG_RUNTIME - Set to ON or OFF to specify whether to use libraries linked to the MS debug C++ runtime ('g' tag). Default is ON.

so it should search for libboost_log-vc120-mt-sgd-1_57 by default, also in this bug report, they introduced the Boost_USE_DEBUG_RUNTIME flag, and aknowledged that it should be set to on by default in order to not break previous behavior.


Solution

  • Ok i have found an answer to my problem, as it turned out there were 2 configurations missing in my example first,

    Variable MSVC musst be set to true (which causes the ABI tag to contain the g value)

    second,

    variable CMAKE_FIND_LIBRARY_SUFFIXES is a list which must be set to the value lib dll