Installing boost-spirit "properly"
Boost-spirit is not a self-contained library by any means,
unfortunately. Rather than inventing ad-hoc measures of installing the
dependencies and dependencies of dependencies and..., let's stop playing
whack-a-mole and instead use the big installation hammer.
We're not calling `b2 install` because that one attempts to build these
libraries. We do not want that. On the other hand, `b2 headers` is
"lazy" as it prefers to create symlinks where it makes sense. These
symlinks are relative, pointing to the source directory of each
individual Boost module -- hence that `cp`.
Yay for custom build systems, once again :(.
Change-Id: Iad867386ac5907630db8bdde0668d8fd9edee580
diff --git a/.gitmodules b/.gitmodules
index 6fa00a0..00eeb89 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,12 +4,12 @@
[submodule "submodules/trompeloeil"]
path = submodules/trompeloeil
url = ../../github/rollbear/trompeloeil
-[submodule "submodules/spirit"]
- path = submodules/spirit
- url = ../../github/boostorg/spirit
[submodule "submodules/docopt.cpp"]
path = submodules/docopt.cpp
url = ../../github/docopt/docopt.cpp
[submodule "submodules/spdlog"]
path = submodules/spdlog
url = ../../github/gabime/spdlog
+[submodule "submodules/boost"]
+ path = submodules/boost
+ url = ../../github/boostorg/boost
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8986d4f..83634a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,13 +45,14 @@
find_package(docopt REQUIRED)
find_package(spdlog REQUIRED)
+find_package(Boost REQUIRED)
set(netconf-cli_SRCS
src/main.cpp
)
add_executable(netconf-cli ${netconf-cli_SRCS})
-target_link_libraries(netconf-cli docopt)
+target_link_libraries(netconf-cli docopt Boost::boost)
add_dependencies(netconf-cli target-NETCONF_CLI_VERSION)
target_include_directories(netconf-cli PRIVATE ${PROJECT_BINARY_DIR})
diff --git a/ci/do-build.sh b/ci/do-build.sh
index 1c0ca6b..891ebef 100755
--- a/ci/do-build.sh
+++ b/ci/do-build.sh
@@ -69,6 +69,12 @@
do_test_dep_cmake spdlog -j${CI_PARALLEL_JOBS}
# boost-spirit doesn't require installation
+ pushd ${TH_GIT_PATH}/submodules/boost
+ git submodule update --init
+ ./bootstrap.sh --prefix=${PREFIX}
+ ./b2 --ignore-site-config headers
+ cp -LR boost ${PREFIX}/include/
+ popd
tar -C ~/target -cvJf ${TH_JOB_WORKING_DIR}/${ARTIFACT} .
ssh th-ci-logs@ci-logs.gerrit.cesnet.cz mkdir -p artifacts/${TH_JOB_NAME} \
diff --git a/submodules/boost b/submodules/boost
new file mode 160000
index 0000000..5980152
--- /dev/null
+++ b/submodules/boost
@@ -0,0 +1 @@
+Subproject commit 59801528be781d6093bae306e01f452c00276497
diff --git a/submodules/spirit b/submodules/spirit
deleted file mode 160000
index f41e80a..0000000
--- a/submodules/spirit
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f41e80a719c0bf5dc02f1e5164aecd81a984ed75