-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is possible to build boost-json outside of the boost tree with b2? #556
Comments
I'm confused. Are you trying to build the library in standalone mode or are you trying to build it in Boost mode, but not in the Boost tree? |
This one. I have updated the Issue |
Well, it is technically possible but probably not very easy. Aside from requiring Boost.Config jam files you also need target |
Building outside the boost tree with b2 is possible, but I think what you're really asking is "Does the Jamfile that comes with Boost.JSON support out-of-tree builds" to which the answer is an emphatic no. Bjam and CMake are not my specialties so I only can support what is necessary for my workflow and for the Boost libraries. |
BTW, I've grepped for other cases where Boost.Config jam module is used. Aside from tests and examples, I've got these:
At least a few of them aren't header only. |
Yeah in the other ports something similar to the following is done: file(READ "${SOURCE_PATH}/build/Jamfile" _contents)
string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}")
file(WRITE "${SOURCE_PATH}/build/Jamfile" "${_contents}")
file(READ "${SOURCE_PATH}/Jamfile" _contents)
string(REPLACE "import ../config/checks/config" "import build/config/checks/config" _contents "${_contents}")
file(WRITE "${SOURCE_PATH}/Jamfile" "${_contents}")
file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") But with this patches I got the following errors:
PS: I also tried it in the past, but didn't know what to with the error. But you also said that this will happen |
Ok, I simply removed this line: Line 17 in aae1863
Works now :D Thank you! |
LOL.... that's serendipitous :) |
In vcpkg every boost lib is its own lib, so we do not clone the boost meta repo recursively and build the whole thing. Every lib is cloned and build separately.
So this lib will be build with the following command:
cd /mnt/vcpkg-ci/buildtrees/boost-json/src/ost-1.75.0-71b8ba6dd3.clean/build && /mnt/vcpkg-ci/installed/x64-linux/tools/boost-build/b2 --user-config=/mnt/vcpkg-ci/buildtrees/boost-json/x64-linux-rel/user-config.jam --stagedir=/mnt/vcpkg-ci/buildtrees/boost-json/x64-linux-rel/stage --build-dir=/mnt/vcpkg-ci/buildtrees/boost-json/x64-linux-rel runtime-link=static link=static address-model=64 architecture=x86 target-os=linux toolset=gcc threadapi=pthread -sZLIB_BINARY=z -sZLIB_LIBPATH="/mnt/vcpkg-ci/installed/x64-linux/lib/libz.a" -sBZIP2_BINARY=bz2 -sBZIP2_LIBPATH="/mnt/vcpkg-ci/installed/x64-linux/lib/libbz2.a" variant=release --layout=system --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -sZLIB_INCLUDE="/mnt/vcpkg-ci/installed/x64-linux/include" -sBZIP2_INCLUDE="/mnt/vcpkg-ci/installed/x64-linux/include" -sICU_PATH="/mnt/vcpkg-ci/installed/x64-linux" -j16 -sBOOST_ROOT=/mnt/vcpkg-ci/installed/x64-linux/tools/boost-build -sBOOST_BUILD_PATH=/mnt/vcpkg-ci/installed/x64-linux/tools/boost-build --debug-configuration --ignore-site-config --hash -q threading=multi debug-symbols=on stage
This works for the most libs, but not for this one because is looks outside of this repository:
json/Jamfile
Line 10 in aae1863
For completeness the resulting error log:
Click to expand
Is there a way to build this lib with b2 outside of the boost tree?
The text was updated successfully, but these errors were encountered: