]> https://gitweb.dealii.org/ - candi.git/commitdiff
mac osx support 24/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 1 May 2017 15:00:22 +0000 (11:00 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 1 May 2017 15:00:22 +0000 (11:00 -0400)
candi.sh
deal.II-toolchain/platforms/supported/macosx.platform [new file with mode: 0644]

index 528fb5e9576f5e448f0aee47a84f189fcb7f60f1..5585b30ed87f290b1bf2bb2bf23b01950b3a52be 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -35,7 +35,7 @@ else
     DATE_CMD=$(which date)
 fi
 # Start global timer
-TIC_GLOBAL="$(${DATE_CMD} +%s%N)"
+TIC_GLOBAL="$(${DATE_CMD} +%s)"
 
 ################################################################################
 # Parse command line input parameters
@@ -551,6 +551,9 @@ guess_platform() {
     if [ -f /usr/bin/cygwin1.dll ]; then
         echo cygwin
     
+    elif [[ "$OSTYPE" == "darwin"* ]]; then
+       echo macosx
+
     elif [ -f /etc/fedora-release ]; then
         local FEDORANAME=`gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' /etc/fedora-release`
         case ${FEDORANAME} in
@@ -957,7 +960,7 @@ TIMINGS=""
 # Fetch and build individual packages
 for PACKAGE in ${PACKAGES[@]}; do
     # Start timer
-    TIC="$(${DATE_CMD} +%s%N)"
+    TIC="$(${DATE_CMD} +%s)"
     
     # Return to the original CANDI directory
     cd ${ORIG_DIR}
@@ -1059,8 +1062,8 @@ for PACKAGE in ${PACKAGES[@]}; do
     package_conf
     
     # Store timing
-    TOC="$(($(${DATE_CMD} +%s%N)-TIC))"
-    TIMINGS="$TIMINGS"$"\n""$PACKAGE: ""$((TOC/1000000000)) s"
+    TOC="$(($(${DATE_CMD} +%s)-TIC))"
+    TIMINGS="$TIMINGS"$"\n""$PACKAGE: ""$((TOC)) s"
 done
 
 # print information about enable.sh
@@ -1071,11 +1074,11 @@ cecho ${GOOD} "    source ${CONFIGURATION_PATH}/enable.sh"
 echo
 
 # Stop global timer
-TOC_GLOBAL="$(($(${DATE_CMD} +%s%N)-TIC_GLOBAL))"
+TOC_GLOBAL="$(($(${DATE_CMD} +%s)-TIC_GLOBAL))"
 
 # Display a summary
 echo
-cecho ${GOOD} "Build finished in $((TOC_GLOBAL/1000000000)) seconds."
+cecho ${GOOD} "Build finished in $((TOC_GLOBAL)) seconds."
 echo
 echo "Summary of timings:"
 echo -e "$TIMINGS"
diff --git a/deal.II-toolchain/platforms/supported/macosx.platform b/deal.II-toolchain/platforms/supported/macosx.platform
new file mode 100644 (file)
index 0000000..075bb6e
--- /dev/null
@@ -0,0 +1,8 @@
+# Mac OSX
+#
+# Mac support is experimental and requires:
+# - a recent version of xcode with command line tools
+# - openmpi (ideally with gcc) installed using homebrew
+# - cmake
+#
+##

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.