8000 FindPETSc: failure on PETSC_ARCH with ^ character · Issue #36 · jedbrown/cmake-modules · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
FindPETSc: failure on PETSC_ARCH with ^ character #36
Open
@nwukie

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.

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

      0