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 \