diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml index e501009..1462c2c 100644 --- a/.github/workflows/package-build.yml +++ b/.github/workflows/package-build.yml @@ -19,7 +19,7 @@ jobs: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) strategy: - fail-fast: true + fail-fast: false matrix: config: - { os: ubuntu-latest, r: "release" } diff --git a/configure b/configure index 1a1cd49..0b04492 100755 --- a/configure +++ b/configure @@ -5,8 +5,9 @@ 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)'` +osx_sysroot="" if [[ `uname` == 'Darwin' ]] ; then - compflags=" ${compflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ " + osx_sysroot=$(xcrun --show-sdk-path) 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("")'` @@ -50,7 +51,7 @@ fi echo $OSTYPE $needVCL_CAN_STATIC_CONST_INIT_FLOAT if [[ `uname` == 'Darwin' ]] ; then - PKG_CPPFLAGS="${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"" + PKG_CPPFLAGS="${PKG_CPPFLAGS} -isysroot${osx_sysroot}" fi echo "PKG_CPPFLAGS=${PKG_CPPFLAGS} -I\${ITK} -I\${PWD} -I\${myantssource}/Examples/include/ \ @@ -68,6 +69,8 @@ echo "libants=\`find \${myantslib} -name \"lib*.a\"\`" >> Makevars # echo "libitk=\`find \\\`\$(R_HOME)/bin/Rscript -e 'ITKR:::itkLibs()'\\\` -name \"lib*.a\"\` " >> Makevars echo "libitk=\`find ${ITKRLIB} -name \"lib*.a\"\`" >> Makevars +# Duplicate libants and libitk to avoid issues with the order of the libraries. This isn't a good solution but +# cmake's suggested ordering didn't work either echo "PKG_LIBS=${PKG_LIBS} \${libants} \${libitk} \${libants} \${libitk} \ \${libants} \${libitk} \${libants} \${libitk} \${libants} \${libitk}" >> Makevars @@ -89,8 +92,7 @@ ThresholdImage LabelClustersUniquely SurfaceBasedSmoothing" >> Makevars # get / set up ANTs code antsgit=https://github.com/ANTsX/ANTs.git -antstag=d87f266dffdbcef00407d260eab20f4738a98825 # with itk v5.3rc04 2023 nov 25 -antstag=1892feff83b792b563500f379fff7733da5465a6 +antstag=fc0589fd23826e53d51e67eb8a3f9a3d63e63a14 # 2025-02-26, label geometry measures antsrtag=`git log --pretty=format:'%H' -n 1` if [[ ! -s ants/CMakeLists.txt ]] ; then git clone $antsbranch $antsgit ants @@ -121,6 +123,7 @@ cd ./antb cmake -DITK_DIR:PATH=${ITKDIR} \ -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${compflags} -DNDEBUG "\ -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} ${compflags} -DNDEBUG "\ + -DCMAKE_OSX_SYSROOT="${osx_sysroot}" \ -DBUILD_SHARED_LIBS=OFF \ -DANTS_INSTALL_LIBS_ONLY=ON \ -DBUILD_ALL_ANTS_APPS=OFF \