Skip to content

Commit

Permalink
Only use CXX11 if supported
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 26, 2018
1 parent 3e272f1 commit c1a4e14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ echo "Using PKG_LIBS=$PKG_LIBS"

# Find compiler
CXXCPP=`${R_HOME}/bin/R CMD config CXXCPP`
CXXSTD=`${R_HOME}/bin/R CMD config CXX11STD`
CXXFLAGS=`${R_HOME}/bin/R CMD config CXXFLAGS`
CPPFLAGS=`${R_HOME}/bin/R CMD config CPPFLAGS`

# Tesseract 4 enforces C++11
CXXSTD=`${R_HOME}/bin/R CMD config CXX11STD`
if [ $? -ne 0 ]; then
unset CXXSTD
fi

# Test configuration
${CXXCPP} ${CXXSTD} ${CPPFLAGS} ${PKG_CFLAGS} ${CXXFLAGS} src/test.h >/dev/null 2>&1

Expand Down

0 comments on commit c1a4e14

Please sign in to comment.