Skip to content

Commit db9a35a

Browse files
committed
Update configure for build process
1 parent a84d5e4 commit db9a35a

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
.Rhistory
33
.RData
44
.Ruserdata
5-
install
5+
/build/
6+
/install/
67
/docs/
78
/revdep/
89
/.claude/

cleanup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
rm -rf src/Makevars install
2+
rm -rf src/Makevars build install

cleanup.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rm -rf src/Makevars install
1+
rm -rf src/Makevars build install

configure

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ then
7878
exit 1
7979
fi
8080
fi
81-
cd fswatch
82-
cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_INSTALL_LIBDIR=lib \
81+
cmake -S src/fswatch -B build \
82+
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_INSTALL_LIBDIR=lib \
8383
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
8484
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
85-
-DCMAKE_BUILD_TYPE=Release .
86-
cmake --build . --target install
87-
cd ..
85+
-DCMAKE_BUILD_TYPE=Release
86+
cmake --build build --target install
87+
rm -rf build
8888

8989
if [ -d "install/lib" ]
9090
then

configure.ucrt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`
66
export CC CFLAGS CPPFLAGS LDFLAGS
77

88
echo "Compiling 'libfswatch' from source..."
9-
cd fswatch
10-
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../install \
9+
cmake -S src/fswatch -B build -G "Unix Makefiles" \
10+
-DCMAKE_INSTALL_PREFIX=install \
1111
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
1212
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
13-
-DCMAKE_BUILD_TYPE=Release .
14-
cmake --build . --target install
15-
cd ..
13+
-DCMAKE_BUILD_TYPE=Release
14+
cmake --build build --target install
15+
rm -rf build
1616

1717
# Success
1818
exit 0

configure.win

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ for ARCH in x64 i386; do
99

1010
echo "Compiling 'libfswatch' from source for ${ARCH} ..."
1111

12-
cd fswatch
13-
mkdir ${ARCH}
14-
cd ${ARCH}
15-
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../../install/${ARCH} \
12+
cmake -S src/fswatch -B build -G "Unix Makefiles" \
13+
-DCMAKE_INSTALL_PREFIX=install/${ARCH} \
1614
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
1715
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
18-
-DCMAKE_BUILD_TYPE=Release ..
19-
cmake --build . --target install
20-
cd ../..
16+
-DCMAKE_BUILD_TYPE=Release
17+
cmake --build build --target install
18+
rm -rf build
2119

2220
else
2321
echo "Note: ${ARCH} not installed, skipping ..."

0 commit comments

Comments
 (0)