Commit d781fc0c authored by Alexander Danilov's avatar Alexander Danilov

Fix FindPETSc.cmake

Handle trailing '\n' and empty variables on Linux
parent 0ec97c28
......@@ -158,8 +158,10 @@ show :
OUTPUT_VARIABLE ${var}
RESULT_VARIABLE petsc_return)
# message(STATUS "returned")
# remove trailing '\n'
string(STRIP "${${var}}" ${var})
# protect backslashed spaces from disappearing
string(REGEX REPLACE "\\\\ " "?space?" ${var} ${${var}})
string(REGEX REPLACE "\\\\ " "?space?" ${var} "${${var}}")
# foreach(D ${${var}})
# message("${D}")
# endforeach()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment