Hi CMake people,
I am trying to configure CMake to retrieve boost, and then run boosts bcp tool
to extract a subset of boost (math/special_functions) that I need for my
project. I had it working before, but now I'm not sure what went wrong.
Right now when I build, CMake is able to retrieve the boost zip archive from
their website, extract it, and run bcp to extract the subset, but now when I
build my project that depends on the imported boost library it is looking for
.obj files.
Since boost is header only, it doesn't need to be built, so should CMake be
looking for library files?
This is the contents of CMakeLists-BOOST.txt that the main CMakeLists.txt
calls. The boost-bcp.py script is able to extract the subset of header files
that I need, so the problem shouldn't be in there.
Any help is appreciated, thank you
include(ExternalProject)
set(BOOST_PREFIX "${CMAKE_SOURCE_DIR}/../pulsar-boost")
file(MAKE_DIRECTORY ${BOOST_PREFIX})
file(MAKE_DIRECTORY ${BOOST_PREFIX}/boost-full)
file(MAKE_DIRECTORY ${BOOST_PREFIX}/include)
ExternalProject_Add(boost
URL https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.zip
PATCH_COMMAND ""
PREFIX "${BOOST_PREFIX}"
SOURCE_DIR "${BOOST_PREFIX}/boost-full"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
LOG_DOWNLOAD 1
LOG_CONFIGURE 1
LOG_INSTALL 1
)
# Additional submodules can be passed to the python script if needed
# BCP will extract each subset
ExternalProject_Add_Step(boost
bcp
COMMAND python boost-bcp.py math/special_functions
DEPENDEES download
ALWAYS 0
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
LOG 1
)
ExternalProject_Get_Property(boost install_dir)
message("boost install dir: " ${install_dir})
add_library(pulsar-boost STATIC IMPORTED)
set_property(TARGET pulsar-boost PROPERTY IMPORTED_LOCATION
${install_dir}/lib/lib-boost)
add_dependencies(pulsar-boost boost)
include_directories(${install_dir}/include)
The information contained in this communication is confidential, is intended
only for the use of the recipient(s) named above, and may be legally
privileged. If the reader of this message is not the intended recipient, you
are hereby notified that any dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this communication
in error, please re-send this communication to the sender and delete the
original message or any copy of it from your computer system.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake