数か月前に最後に作業した CMake プロジェクトをビルドしようとしていますが、次のエラー メッセージが表示されます。
make[3]: *** No rule to make target `/usr/lib/libboost_unit_test_framework-mt.so', needed by `test/baumwelchtests'. Stop.
実際、このファイルは には存在せず/usr/lib
、 しかありませんlibboost_unit_test_framework.so
。通常版と版の違いは何-mt
ですか?-mt バージョンは、最近のシステム アップグレードの 1 つ後に削除されたと確信しています (私は Debian テストを実行しているため、最新の安定版リリース後にかなりの数の変更がありました)。自分のものをコンパイルするにはどうすればよいですか?
私の CMakeLists.txt は次のようになります。
# 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)