aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/ryml/samples/fetch_content/run.sh
blob: cb1d7a008030377f6f51ec8e9b9568497c65a26e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash -x

# take the build type from the command line, or default to release
cfg=${1:-Release}
# force cmake's FetchContent to choose a specific branch, or default to nothing
branch=${2:-}
# make sure to run from where this file is
cd $(dirname $0)
# configure the sample
cmake -S . -B ./build/$cfg -DCMAKE_BUILD_TYPE=$cfg -DRYML_BRANCH_NAME="$branch"
# build and run the sample
cmake --build ./build/$cfg --config $cfg --target run