From 73931010bca7e6e885c6da1a115dcd7395b7df56 Mon Sep 17 00:00:00 2001 From: Rodney Lewis Date: Fri, 22 Nov 2024 16:31:31 +0000 Subject: [PATCH] Updated this if if [[ `uname` -eq Darwin ]] ; then compflags=" ${compflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ " fi to work with linux bash and not always default true, thus applying the flags. Created an if statement to prepend this PKG_CPPFLAGS=" ${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"" if the uname is Darwin so it will configure under linux. --- configure | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure b/configure index dde483d..1a1cd49 100755 --- a/configure +++ b/configure @@ -5,14 +5,14 @@ CXX_STD=CXX17 ITKRCMAKE=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkIncludes(); cat(a)'` ITKRLIB=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkLibs(); cat(a)'` compflags=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkCompileFlags(); cat(a)'` -if [[ `uname` -eq Darwin ]] ; then +if [[ `uname` == 'Darwin' ]] ; then compflags=" ${compflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ " fi ITKDIR=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkDir(); cat(a)'` ITKTAG=`${R_HOME}/bin/Rscript -e 'env = asNamespace("ITKR"); if ("itkTag" %in% names(env)) cat(ITKR::itkTag()) else cat("")'` -if [[ `uname` -eq Darwin ]] ; then +if [[ `uname` == 'Darwin' ]] ; then CMAKE_BUILD_TYPE=Release fi if [[ $TRAVIS -eq true ]] ; then @@ -48,7 +48,12 @@ else # just try gcc directly fi fi echo $OSTYPE $needVCL_CAN_STATIC_CONST_INIT_FLOAT -echo "PKG_CPPFLAGS= ${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1" -I\${ITK} -I\${PWD} -I\${myantssource}/Examples/include/ \ + +if [[ `uname` == 'Darwin' ]] ; then + PKG_CPPFLAGS="${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"" +fi + +echo "PKG_CPPFLAGS=${PKG_CPPFLAGS} -I\${ITK} -I\${PWD} -I\${myantssource}/Examples/include/ \ -I\${myantssource}/Utilities -I\${myantssource}/Examples/ -I../inst/include/ \ -I\${myantssource}/Tensor/ " >> Makevars