-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Context
node-cpp-skel now has a single method for setting up mason and the clang++ toolchain. It lives in https://github.com/mapbox/node-cpp-skel/blob/master/scripts/setup.sh and is used like:
./scripts/setup.ch --config local.env
source local.env
# now both `clang++` and `mason` are available and on your PATH
The idea behind this script is to:
- Make it easy to get
clang++andmasonwithout worrying about the versions (which are controlled in the script) - Avoid needing to source a script that might error, which can cause problems on travis: it is best practice for bash scripts need to use
set -eto stop on error, but sourcing will accidentally inherit this in the travis shell (and this cane break the travis build oddly). The output of setup.sh (akalocal.env) is purelyexportcommands for variables. So this is safe to source without worrying about breaking the travis shell. - This script can be a central location for adding further methods/variables needed for building C++ code
- The script can be used locally as well as on travis ci for installing clang++. For example, a custom clang++ from mason is needed even on OS X for local coverage reporting, as demonstrated at https://github.com/mapbox/node-cpp-skel/blob/master/scripts/coverage.sh
Proposal
This setup.sh script is not specific to node addons, so we could start using and recommending it for all header only C++ libs.
So, @mapsam what do you think about pulling it into hpp-skel and adapting the travis.yml to use it?
mapsam
Metadata
Metadata
Assignees
Labels
No labels