Skip to content
Snippets Groups Projects
Commit 04937db1 authored by Yoshinori Tahara's avatar Yoshinori Tahara Committed by Brad King
Browse files

CSharp: Fix compiler version detection in non-English languages


When we run `csc.exe /help` we look for "Version" in the output.
Explicitly ask for the output in English.

Reported-by: default avatar <guttally@users.noreply.github.com>
parent a91eb5e4
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ if(NOT CMAKE_CSharp_COMPILER_ID_RUN)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CSharp CSFLAGS CMakeCSharpCompilerId.cs)
execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help" OUTPUT_VARIABLE output)
execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help /preferreduilang:en-US" OUTPUT_VARIABLE output)
string(REPLACE "\n" ";" output "${output}")
foreach(line ${output})
string(TOUPPER ${line} line)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment