Skip to content

Commit

Permalink
Fix handling of backslash-newline sequences in environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Mar 29, 2016
1 parent 22582f3 commit ea11f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions support/cmake/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ if (MP_WINSDK)
execute_process(COMMAND ${run_setenv} "${MP_SETENV}" "${setenv_arg}"
OUTPUT_VARIABLE out ERROR_VARIABLE err)
string(REPLACE ";" "\;" out "${out}")
string(REGEX MATCHALL "[^\n]+" out "${out}")
string(REGEX MATCHALL "[^\n]+\n" out "${out}")
foreach (env ${out})
if (env MATCHES "([^=]+)=(.*)")
if (env MATCHES "([^=]+)=(.*)\n")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif ()
endforeach ()
Expand Down

0 comments on commit ea11f81

Please sign in to comment.