Skip to content

Commit 040c8d0

Browse files
res2kdcbaker
authored andcommitted
CMakeToolchain: Log output on compiler state failure
1 parent b8cdd06 commit 040c8d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mesonbuild/cmake/toolchain.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,15 @@ def update_cmake_compiler_state(self) -> None:
232232
cmake_args += trace.trace_args()
233233
cmake_args += cmake_get_generator_args(self.env)
234234
cmake_args += [f'-DCMAKE_TOOLCHAIN_FILE={temp_toolchain_file.as_posix()}', '.']
235-
rc, _, raw_trace = self.cmakebin.call(cmake_args, build_dir=build_dir, disable_cache=True)
235+
rc, raw_stdout, raw_trace = self.cmakebin.call(cmake_args, build_dir=build_dir, disable_cache=True)
236236

237237
if rc != 0:
238238
mlog.warning('CMake Toolchain: Failed to determine CMake compilers state')
239+
mlog.debug(f' -- return code: {rc}')
240+
for line in raw_stdout.split('\n'):
241+
mlog.debug(f' -- stdout: {line.rstrip()}')
242+
for line in raw_trace.split('\n'):
243+
mlog.debug(f' -- stderr: {line.rstrip()}')
239244
return
240245

241246
# Parse output

0 commit comments

Comments
 (0)