Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: macos-latest, r: 'oldrel-3'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-2'}
- {os: windows-latest, r: 'oldrel-4'}
Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ Suggests:
testthat (>= 3.0.0)
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Biarch: true
Config/testthat/edition: 3
Config/Needs/website: tidyverse/tidytemplate
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# watcher (development version)

* `watcher()` now accepts a vector for the `path` argument to monitor multiple files or directories (#16).
* Fixes Windows bi-arch source builds for R <= 4.1 using rtools40 and earlier (#19).

# watcher 0.1.2

Expand Down
20 changes: 20 additions & 0 deletions configure.ucrt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Upstream SHA of emcrisostomo/fswatch
LIB_VER="5c443d2"

# Find compiler and export flags
CC=`"${R_HOME}/bin/R" CMD config CC`
export CC

echo "Compiling 'libfswatch' from source..."
gzip -dc src/fswatch-$LIB_VER.tar.gz | tar -xf -
cd fswatch-$LIB_VER
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../install \
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
-DCMAKE_BUILD_TYPE=Release .
cmake --build . --target install
cd ..
rm -rf fswatch-$LIB_VER

# Success
exit 0
38 changes: 26 additions & 12 deletions configure.win
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
# Upstream SHA of emcrisostomo/fswatch
LIB_VER="5c443d2"

# Find compiler and export flags
CC=`"${R_HOME}/bin/R" CMD config CC`
export CC

echo "Compiling 'libfswatch' from source..."
gzip -dc src/fswatch-$LIB_VER.tar.gz | tar -xf -
cd fswatch-$LIB_VER
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../install \
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
-DCMAKE_BUILD_TYPE=Release .
cmake --build . --target install
cd ..

for ARCH in x64 i386; do

if [ -e "${R_HOME}/bin/${ARCH}/R" ]; then
CC=`"${R_HOME}/bin/${ARCH}/R" CMD config CC`
export CC

echo "Compiling 'libfswatch' from source..."

cd fswatch-$LIB_VER
mkdir ${ARCH}
cd ${ARCH}
echo "Compiling 'libfswatch' from source for ${ARCH} ..."
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../../install/${ARCH} \
-DBUILD_LIBS_ONLY=1 -DUSE_NLS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DCMAKE_COLOR_MAKEFILE=0 -DCMAKE_INSTALL_MESSAGE=NEVER \
-DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target install
cd ../..

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

done

rm -rf fswatch-$LIB_VER

# Success
Expand Down
4 changes: 2 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PKG_CFLAGS=-I../install/include $(C_VISIBILITY)
PKG_LIBS=../install/lib/libfswatch.b -pthread -lstdc++fs
PKG_CFLAGS=-I../install${R_ARCH}/include $(C_VISIBILITY)
PKG_LIBS=../install${R_ARCH}/lib/libfswatch.b -pthread -lstdc++fs
Loading