Skip to content

Commit b232947

Browse files
authored
cmake: Print error output when failing to fetch emcc version information. (#18183)
1 parent d39013e commit b232947

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ set(CMAKE_CXX_COMPILER_RANLIB "${CMAKE_RANLIB}" CACHE FILEPATH "Emscripten ranli
100100
if (NOT EMSCRIPTEN_VERSION)
101101
execute_process(COMMAND "${CMAKE_C_COMPILER}" "-v" RESULT_VARIABLE _cmake_compiler_result ERROR_VARIABLE _cmake_compiler_output OUTPUT_QUIET)
102102
if (NOT _cmake_compiler_result EQUAL 0)
103-
message(FATAL_ERROR "Failed to fetch Emscripten version information with command \"'${CMAKE_C_COMPILER}' -v\"! Process returned with error code ${_cmake_compiler_result}.")
103+
message(FATAL_ERROR "Failed to fetch Emscripten version information with command \"'${CMAKE_C_COMPILER}' -v\"!\n"
104+
"Process returned with error code ${_cmake_compiler_result}.\n"
105+
"Output:\n${_cmake_compiler_output}")
104106
endif()
105107
string(REGEX MATCH "emcc \\(.*\\) ([0-9\\.]+)" _dummy_unused "${_cmake_compiler_output}")
106108
if (NOT CMAKE_MATCH_1)

0 commit comments

Comments
 (0)