Reputation: 36649
I am trying to build my CMake project I was last working on a few months ago, but I get the following error message:
make[3]: *** No rule to make target `/usr/lib/libboost_unit_test_framework-mt.so', needed by `test/baumwelchtests'. Stop.
Indeed, this file does not exist in /usr/lib
, there is only libboost_unit_test_framework.so
. What is the difference between normal version and the -mt
version? I am pretty sure the -mt version was removed after one of the recent system upgrades (I am running Debian Testing, so there were quite a few changes after the latest stable release). How can I get my stuff to compile?
My CMakeLists.txt looks like this:
# Include subdirectories for headers
find_package( Boost REQUIRED COMPONENTS unit_test_framework regex)
include_directories(${BaumWelch_SOURCE_DIR}/../../grzesLib/src
${BaumWelch_SOURCE_DIR}/src
${Boost_INCLUDE_DIRS})
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-g -std=c++11 -Wall -Werror -Wextra -pedantic -Wuninitialized)
endif()
# Create the unit tests executable
add_executable(
baumwelchtests stockestimationtests.cpp forecasttest.cpp lagstest.cpp hiddenmarkovmodeltest.cpp stateindextest.cpp baumiterationtest.cpp baumwelchtest.cpp sampleparameters.cpp sdetest.cpp hmmgenerator.h
# Key includes for setting up Boost.Test
testrunner.cpp
# Just for handy reference
exampletests.cpp
)
# Link the libraries
target_link_libraries( baumwelchtests ${Boost_LIBRARIES} baumwelchlib grzeslib)
Upvotes: 1
Views: 1233
Reputation: 51475
-mt
stands for mutlithreaded.
You can force CMake to link against regular boost libraries by setting set(Boost_USE_MULTITHREADED OFF)
But most likely you just need to install libboost-test-dev
Upvotes: 3