Answer the question
In order to leave comments, you need to log in
How to install boost::program_options dependency along with your project using ExternalProject_Add in cmake?
You need to add this dependency to the project. When assembled, it gives
Серьезность Код Описание Проект Файл Строка Состояние подавления
Ошибка MSB8066 пользовательская сборка для "F:\code\C++\tasks\build\CMakeFiles\a02e4265147eb1a3546f70796cde7b11\external_boost-build.rule;F:\code\C++\tasks\build\CMakeFiles\a02e4265147eb1a3546f70796cde7b11\external_boost-install.rule;F:\code\C++\tasks\build\CMakeFiles\0e4e7d5d50178db39cc1c505593c8a26\external_boost-complete.rule;F:\code\C++\tasks\build\CMakeFiles\2daa0d109a3f41d5cd6f5bdbb5817a2f\external_boost.rule" завершила работу с кодом 9009. external_boost F:\microsoft\visual_studio\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 240
include( ExternalProject )
set( boost_URL "http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.zip" )
set( boost_SHA1 "4364989afbe6b11f2d5e59df902c3ca4d7851824" )
set( boost_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/third_party/boost )
set( boost_INCLUDE_DIR ${boost_INSTALL}/include )
set( boost_LIB_DIR ${boost_INSTALL}/lib )
ExternalProject_Add( external_boost
PREFIX boost
URL ${boost_URL}
URL_HASH SHA1=${boost_SHA1}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND bootstrap.bat
--with-libraries=filesystem
--with-libraries=system
--with-libraries=date_time
--prefix=<INSTALL_DIR>
BUILD_COMMAND
b2 install link=static variant=release threading=multi runtime-link=static
INSTALL_COMMAND ""
INSTALL_DIR ${boost_INSTALL} )
set( boost_LIBRARY_SUFFIX .lib )
add_library( boost::program_options STATIC IMPORTED )
set_property( TARGET boost::program_options PROPERTY IMPORTED_LOCATION ${boost_LIB_DIR}/libboost_program_options ${boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::program_options PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${boost_INCLUDE_DIR} )
add_dependencies( boost::program_options external_boost )
F:\code\C++\tasks\build\boost\src\external_boost\tools\build\src\engine\jam.h(71): fatal error C1034: ctype.h: не указан путь поиска включаемых файлов
compile.c
F:\code\C++\tasks\build\boost\src\external_boost\tools\build\src\engine\jam.h(71): fatal error C1034: ctype.h: не указан путь поиска включаемых файлов
constants.c
debug.c
F:\code\C++\tasks\build\boost\src\external_boost\tools\build\src\engine\jam.h(71): fatal error C1034: ctype.h: не указан путь поиска включаемых файлов
execcmd.c
Answer the question
In order to leave comments, you need to log in
And what for this mouse fuss with manual import?
I did something like this for boost::context
cmake_minimum_required(VERSION 2.8.2)
project(boost-context-download NONE)
include(ExternalProject)
ExternalProject_Add(boost-context
SOURCE_DIR "@[email protected]"
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND bootstrap.bat
BUILD_COMMAND b2 --with-context
INSTALL_COMMAND b2 install --with -context --build-type=complete [email protected][email protected]
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question