Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindPETSc: failure on PETSC_ARCH with ^ character #36

Open
nwukie opened this issue Nov 18, 2019 · 1 comment
Open

FindPETSc: failure on PETSC_ARCH with ^ character #36

nwukie opened this issue Nov 18, 2019 · 1 comment

Comments

@nwukie
Copy link

nwukie commented Nov 18, 2019

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.

@jedbrown
Copy link
Owner

I think this solution is good. Would you be willing to make a pull request to make this change?

nwukie pushed a commit to nwukie/cmake-modules that referenced this issue Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants