我正在尝试将boost库导入到我的C++项目中,并且由于某种原因它找不到Boost.Process,尽管它找到了其他的.
我的CMakeLists.txt文件:
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
set (PROJECT_NAME "test-stuff" CXX)
project (${PROJECT_NAME})
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.64.0 REQUIRED system filesystem process)
if(Boost_FOUND)
include_directories (SYSTEM ${Boost_INCLUDE_DIR})
endif()
include_directories(include)
file(GLOB SOURCES "src/*.cpp")
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
Run Code Online (Sandbox Code Playgroud)
完整的错误跟踪(使用调试设置):
The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile …Run Code Online (Sandbox Code Playgroud)