From 0c788ed8a7ba94e630c5969911e9306d50333c43 Mon Sep 17 00:00:00 2001 From: Philip Cook Date: Mon, 25 Nov 2024 10:20:13 -0500 Subject: [PATCH] COMP: Extra flags only for Mac CXX --- configure | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index ff74fb6947..58f31259db 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ CXX_STD=CXX17 JTHREADS=4 -if [[ `uname` == 'Darwin' ]] ; then +if [[ `uname` -eq Darwin ]] ; then CMAKE_BUILD_TYPE=Release fi if [[ $TRAVIS -eq true ]] ; then @@ -56,9 +56,10 @@ echo "ITK;${itktag}" >> ../data/softwareVersions.csv echo "ITKURL;${itkgit}" >> ../data/softwareVersions.csv mkdir -p itkb cd itkb -compflags=" -fPIC -O2 -Wno-c++11-long-long " -if [[ `uname` == 'Darwin' ]] ; then - compflags=" ${compflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ " +compcflags=" -fPIC -O2 -Wno-c++11-long-long " +compcxxflags=" ${compcflags} " +if [[ `uname` -eq Darwin ]] ; then + compcxxflags=" ${compcflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ " fi cmaker=`${R_HOME}/bin/Rscript -e "x=Sys.which('cmake'); cat(x)"` if [[ -z "${cmaker}" ]]; then @@ -78,8 +79,8 @@ ${cmaker} \ -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \ -DCMAKE_CXX_STANDARD="17"\ -DCMAKE_CXX_STANDARD_REQUIRED="YES"\ - -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${compflags} -DNDEBUG "\ - -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} ${compflags} -DNDEBUG "\ + -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${compcflags} -DNDEBUG "\ + -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} ${compcxxflags} -DNDEBUG "\ -DITK_USE_GIT_PROTOCOL:BOOL=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_TESTING:BOOL=OFF \