Fix regressions (#988)

* CMake uses C99 by default
* HYPRE_PRINT_INDENT works without a loop
This commit is contained in:
Victor A. P. Magri 2023-10-17 10:28:34 -04:00 committed by GitHub
parent 8ff65e8124
commit 14b5544d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

View File

@ -24,6 +24,9 @@ project(${PROJECT_NAME}
VERSION ${HYPRE_VERSION}
LANGUAGES C)
# We use C99 by default, but users are free to specify any newer standard version
set(CMAKE_C_STANDARD 99)
if (${HYPRE_SOURCE_DIR} STREQUAL ${HYPRE_BINARY_DIR})
message(FATAL_ERROR "In-place build not allowed! Please use a separate build directory. See the Users Manual or INSTALL file for details.")
endif ()

View File

@ -395,10 +395,8 @@ typedef struct hypre_MatrixStatsArray_struct
hypre_printf(" %s\n", msg);
#define HYPRE_PRINT_INDENT(n) \
for (HYPRE_Int __i = 0; __i < n; __i++) \
{ \
hypre_printf(" "); \
}
hypre_printf("%*s", (n > 0) ? n : 0, "");
#define HYPRE_PRINT_SHIFTED_PARAM(n, ...) \
HYPRE_PRINT_INDENT(n) \

View File

@ -118,10 +118,8 @@ typedef struct hypre_MatrixStatsArray_struct
hypre_printf(" %s\n", msg);
#define HYPRE_PRINT_INDENT(n) \
for (HYPRE_Int __i = 0; __i < n; __i++) \
{ \
hypre_printf(" "); \
}
hypre_printf("%*s", (n > 0) ? n : 0, "");
#define HYPRE_PRINT_SHIFTED_PARAM(n, ...) \
HYPRE_PRINT_INDENT(n) \