source: issm/oecreview/Archive/24684-25833/ISSM-25665-25666.diff@ 25834

Last change on this file since 25834 was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 2.5 KB
RevLine 
[25834]1Index: ../trunk-jpl/src/c/main/issm_dakota.cpp
2===================================================================
3--- ../trunk-jpl/src/c/main/issm_dakota.cpp (revision 25665)
4+++ ../trunk-jpl/src/c/main/issm_dakota.cpp (revision 25666)
5@@ -40,7 +40,7 @@
6 sprintf(dakota_error_file,"%s/%s%s",argv[2],argv[3],".qmu.err");
7
8 /*Create directory structure for model outputs:*/
9- #ifdef _SYSTEM_FMEMOPEN_
10+ #if _SYSTEM_HAS_FMEMOPEN_ == 1
11 statistics=DakotaDirStructure(argc,argv);
12 #endif
13
14@@ -89,7 +89,7 @@
15 env.execute();
16
17 /* Run statistics if requested:*/
18- #ifdef _SYSTEM_FMEMOPEN_
19+ #if _SYSTEM_HAS_FMEMOPEN_ == 1
20 if(statistics)DakotaStatistics(argc,argv);
21 #endif
22
23Index: ../trunk-jpl/src/c/Makefile.am
24===================================================================
25--- ../trunk-jpl/src/c/Makefile.am (revision 25665)
26+++ ../trunk-jpl/src/c/Makefile.am (revision 25666)
27@@ -353,10 +353,10 @@
28 ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp \
29 ./modules/ModelProcessorx/Dakota/UpdateElementsAndMaterialsDakota.cpp \
30 ./cores/dakota_core.cpp
31- if SYSTEM_FMEMOPEN
32- issm_sources += ./modules/QmuStatisticsx/QmuStatisticsx.cpp
33- fi
34+if SYSTEM_HAS_FMEMOPEN
35+issm_sources += ./modules/QmuStatisticsx/QmuStatisticsx.cpp
36 endif
37+endif
38 #}}}
39 #Petsc sources {{{
40 if PETSC
41Index: ../trunk-jpl/m4/issm_options.m4
42===================================================================
43--- ../trunk-jpl/m4/issm_options.m4 (revision 25665)
44+++ ../trunk-jpl/m4/issm_options.m4 (revision 25666)
45@@ -206,6 +206,7 @@
46
47 dnl If macOS, check if system copy of libc has fmemopen (if it is not
48 dnl macOS, we do not check, but still must set SYSTEM_HAS_FMEMOPEN)
49+ AC_MSG_CHECKING([if system copy of libc has fmemopen])
50 SYSTEM_FMEMOPEN=1
51 if test "${IS_MAC}" == "yes"; then
52 if [[ $(system_profiler SPSoftwareDataType | $(which grep) "System Version:" | sed -e "s/[[:space:]]*System Version: macOS //" | cut -d "." -f 2) -lt 13 ]]; then
53@@ -212,8 +213,13 @@
54 SYSTEM_FMEMOPEN=0
55 fi
56 fi
57- AC_DEFINE(_SYSTEM_FMEMOPEN_, ${SYSTEM_FMEMOPEN}, [does system libc have fmemopen])
58- AM_CONDITIONAL([SYSTEM_HAS_FMEMOPEN], [test ${SYSTEM_FMEMOPEN} == 1])
59+ if test "${SYSTEM_FMEMOPEN}" == "1"; then
60+ AC_MSG_RESULT([yes])
61+ else
62+ AC_MSG_RESULT([no])
63+ fi
64+ AC_DEFINE_UNQUOTED([_SYSTEM_HAS_FMEMOPEN_], $SYSTEM_FMEMOPEN, [does system copy of libc have fmemopen])
65+ AM_CONDITIONAL([SYSTEM_HAS_FMEMOPEN], [test "${SYSTEM_FMEMOPEN}" == "1"])
66
67 IS_WINDOWS=no
68 AC_MSG_CHECKING([for vendor compilers])
Note: See TracBrowser for help on using the repository browser.