Skip to content

FindPETSc: failure on PETSC_ARCH with ^ character #36

Description

@nwukie

I have a petsc build on OSX with PETSC_ARCH=gcc-9.2.0^openmpi-3.1.1. The '^' character in the folder name seems to cause a call to echo in ${petsc_config_makefile} return bad data. Investigating a little more, it seems the behavior of 'echo' is notoriously non-portable, especially when used with flags and variables that contain dashes.

Problem in FindPETSc.cmake Line 159:
\t-@echo -n ${${VARIABLE}}

Proposed solution:
\t-@printf '%s' ${${VARIABLE}}

The proposed solution solves my build error, I just wasn't sure if it would cause any issues with other build configurations.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions