我正在尝试使用CMake使boost库工作,但我收到一些奇怪的错误消息。 我正在使用Stephan T. Lavavej的mingw版本,它带有boost-library。
我的CMake文件如下所示:
cmake_minimum_required(VERSION 3.6)
project(untitled)
set(Boost_INCLUDE_DIR C:/MinGW/include)
set(Boost_LIBRARY_DIR C:/MinGW/lib)
find_package(Boost COMPONENTS system filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
set(CMAKE_CXX_FLAGS "-Ofast -msse -msse2 -msse3 -march=znver1 -fno-use-linker-plugin -flto")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -static-libstdc++ ")
set(SOURCE_FILES main.cpp HexBoard.cpp HexBoard.h TreeNode.cpp TreeNode.h)
add_executable(untitled ${SOURCE_FILES})
我收到以下错误消息:
> CMake Warning at C:/Program Files (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:743 (message): Imported targets not available for Boost version 106300
> Call Stack (most recent call first): C:/Program Files
> (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files
> (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES) CMakeLists.txt:6 (find_package)
>
>
> CMake Warning at C:/Program Files (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:743 (message): Imported targets not available for Boost version 106300
> Call Stack (most recent call first): C:/Program Files
> (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files
> (x86)/JetBrains/CLion
> 2016.3.5/bin/cmake/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES) CMakeLists.txt:6 (find_package)
如何使增强库在mingw64下工作?
非常感谢任何帮助