-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·33 lines (30 loc) · 993 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·33 lines (30 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash -x
# take the build type from the command line, or default to release
cfg=${1:-Release}
shift
# make sure to run from where this file is
cd $(dirname $0)
#------------------------------
# first, build and install ryml
#------------------------------
RYML_SRC=$(cd ../.. ; pwd)
RYML_DIR=./build/$cfg/ryml-install # install ryml to this directory
# configure ryml
cmake -S "$RYML_SRC" -B ./build/$cfg/ryml-build \
"-DCMAKE_INSTALL_PREFIX=$RYML_DIR" \
-DCMAKE_BUILD_TYPE=$cfg \
"$@"
# build ryml
cmake --build ./build/$cfg/ryml-build --parallel --config $cfg
# install ryml
cmake --build ./build/$cfg/ryml-build --config $cfg --target install
#-----------------------------
# now build and run the sample
#-----------------------------
# configure the sample
cmake -S . -B ./build/$cfg \
"-DCMAKE_PREFIX_PATH=$RYML_DIR" \
-DCMAKE_BUILD_TYPE=$cfg \
"$@"
# build and run the sample
cmake --build ./build/$cfg --config $cfg --parallel --target run