Skip to content

Commit 6305dbf

Browse files
1a1a11ahaochengxia
andauthored
[refactor]: remove compiler flags (#225)
* Refactor install_libcachesim.sh for improved readability and consistency. Simplified directory navigation and build commands by removing redundant lines and ensuring proper quoting. * fix typo --------- Co-authored-by: Percy <[email protected]>
1 parent 64551b3 commit 6305dbf

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

scripts/install_libcachesim.sh

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
#!/bin/bash
1+
#!/bin/bash
22
set -euo pipefail
33

4+
SOURCE=$(readlink -f "${BASH_SOURCE[0]}")
5+
DIR=$(dirname "${SOURCE}")
46

5-
SORUCE=$(readlink -f ${BASH_SOURCE[0]})
6-
DIR=$(dirname ${SORUCE})
7-
8-
cd ${DIR}/../;
9-
mkdir _build || true 2>/dev/null;
10-
cd _build;
11-
cmake -DCMAKE_BUILD_TYPE=Debug \
12-
-DCMAKE_C_FLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-but-set-variable -Wpedantic -Wformat=2 -Wformat-security -Wshadow -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs -Wmissing-include-dirs" \
13-
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-but-set-variable -Wpedantic -Wformat=2 -Wformat-security -Wshadow -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs -Wmissing-include-dirs" \
14-
..
15-
make -j;
16-
cd ${DIR};
17-
7+
cd "${DIR}"/../
8+
mkdir -p _build
9+
cd _build
10+
cmake ..
11+
make -j
12+
cd "${DIR}"

0 commit comments

Comments
 (0)