Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bash - run cmake out of tree / run cmake out of project

Instead of running cmake in tree such as:

cd ${WORKSPACE}
git clone http://github.com/WebAssembly/wabt

cd wabt
mkdir build
cd build
cmake ..
cmake --build .
cmake --install ${HOME}/tools/wabt

You can build from any other directory, like this:

cd ${WORKSPACE}
git clone http://github.com/WebAssembly/wabt

cd /tmp

cmake "${WORKSPACE}/wabt" -B "${WORKSPACE}/wabt/build"
cmake --build "${WORKSPACE}/wabt/build"
cmake --install "${WORKSPACE}/wabt/build" --prefix "${HOME}/tools/wabt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment