Skip to content

Commit

Permalink
CMakeToolchain: Log output on compiler state failure
Browse files Browse the repository at this point in the history
  • Loading branch information
res2k authored and dcbaker committed Nov 4, 2024
1 parent b8cdd06 commit 040c8d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mesonbuild/cmake/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,15 @@ def update_cmake_compiler_state(self) -> None:
cmake_args += trace.trace_args()
cmake_args += cmake_get_generator_args(self.env)
cmake_args += [f'-DCMAKE_TOOLCHAIN_FILE={temp_toolchain_file.as_posix()}', '.']
rc, _, raw_trace = self.cmakebin.call(cmake_args, build_dir=build_dir, disable_cache=True)
rc, raw_stdout, raw_trace = self.cmakebin.call(cmake_args, build_dir=build_dir, disable_cache=True)

if rc != 0:
mlog.warning('CMake Toolchain: Failed to determine CMake compilers state')
mlog.debug(f' -- return code: {rc}')
for line in raw_stdout.split('\n'):
mlog.debug(f' -- stdout: {line.rstrip()}')
for line in raw_trace.split('\n'):
mlog.debug(f' -- stderr: {line.rstrip()}')
return

# Parse output
Expand Down

0 comments on commit 040c8d0

Please sign in to comment.