Skip to content

Commit

Permalink
add debug statements for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
pachadotdev committed Dec 17, 2024
1 parent 6ed06b5 commit 0a131b8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@
CXX=`${R_HOME}/bin/R CMD config CXX`
R_INCLUDE_PATH=`${R_HOME}/bin/R CMD config --cppflags`
CPP11_INCLUDE_PATH=`${R_HOME}/bin/Rscript -e "cat(system.file('include', package = 'cpp11'))"`

# Check if CPP11_INCLUDE_PATH is empty
if [ -z "$CPP11_INCLUDE_PATH" ]; then
echo "Error: cpp11 include path is empty. Please ensure the cpp11 package is installed."
exit 1
fi

PKG_CFLAGS="-I./inst/include ${R_INCLUDE_PATH} -I${CPP11_INCLUDE_PATH}"

# Debugging: Print the values of the variables
echo "CXX: ${CXX}"
echo "R_INCLUDE_PATH: ${R_INCLUDE_PATH}"
echo "CPP11_INCLUDE_PATH: ${CPP11_INCLUDE_PATH}"
echo "PKG_CFLAGS: ${PKG_CFLAGS}"

# Create a temporary C++ file to test the compatibility with Armadillo
cat <<EOF> conftest.cpp
#include <armadillo.hpp>
Expand Down

0 comments on commit 0a131b8

Please sign in to comment.