MarkusJx / install-boost

Install boost on Github actions
MIT License
62 stars 3 forks source link

How do I use boost libraries after installation #1

Closed huanghantao closed 3 years ago

huanghantao commented 3 years ago
image image image
MarkusJx commented 3 years ago

Just take a look at the test workflow. The Boost root directory path is stored in the output variable BOOST_ROOT. So if you want to use it, first enter an id for the action, lets say install-boost, as in the test workflow.

The boost root directory then can be retrieved using ${{steps.install-boost.outputs.BOOST_ROOT}}. Add that to your include path. Instructions on how to do that here, if you need those. Using CMake, you only need to set the BOOST_ROOT as an environment variable like this:

env:
        BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}}

Using make, well, I honestly don't know how to do that, just set your include path, the libraries to link against are located in ${{steps.[INSTALL-BOOST-ID].outputs.BOOST_ROOT}}/lib.

huanghantao commented 3 years ago

Thank you!