From 3c0aab7a55f0fe2d76e56bd14c4bd34f1d8c5d1d Mon Sep 17 00:00:00 2001 From: "Nathan A. Wukie" Date: Tue, 19 Nov 2019 09:58:22 -0500 Subject: [PATCH 1/2] Issue #36: Changed an 'echo' to 'printf' for portability and robustness. --- FindPETSc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FindPETSc.cmake b/FindPETSc.cmake index 41e02d9..4f5b623 100644 --- a/FindPETSc.cmake +++ b/FindPETSc.cmake @@ -156,7 +156,7 @@ if (petsc_conf_rules AND petsc_conf_variables AND NOT petsc_config_current) include ${petsc_conf_rules} include ${petsc_conf_variables} show : -\t-@echo -n \${\${VARIABLE}} +\t-@printf '%s' \${\${VARIABLE}} ") macro (PETSC_GET_VARIABLE name var) From 3e5637553041205dc61b5e517ab1f08b1d6cf7c1 Mon Sep 17 00:00:00 2001 From: "Nathan A. Wukie" Date: Tue, 19 Nov 2019 13:21:16 -0500 Subject: [PATCH 2/2] Added extra quotes to printf statement to preserve separate include paths. --- FindPETSc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FindPETSc.cmake b/FindPETSc.cmake index 4f5b623..301d15b 100644 --- a/FindPETSc.cmake +++ b/FindPETSc.cmake @@ -156,7 +156,7 @@ if (petsc_conf_rules AND petsc_conf_variables AND NOT petsc_config_current) include ${petsc_conf_rules} include ${petsc_conf_variables} show : -\t-@printf '%s' \${\${VARIABLE}} +\t-@printf '%s' \"\${\${VARIABLE}}\" ") macro (PETSC_GET_VARIABLE name var)