From d50e9c531df310cf91c98f2768892291de781ada Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 4 Aug 2017 17:05:58 +0200 Subject: o Better error message when Python fails. --- cmake/kicad_gerber.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmake') diff --git a/cmake/kicad_gerber.cmake b/cmake/kicad_gerber.cmake index 5391414..8c189c6 100644 --- a/cmake/kicad_gerber.cmake +++ b/cmake/kicad_gerber.cmake @@ -51,17 +51,17 @@ function(kicad_gerber) COMMAND "${KicadUtilsPyDir}/kicad_gerber.py" --pcb "${pcb_file}" --output-directory "${out_dir}" ${protel} ${uppercase_extensions} ${les} --detect-files-only OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt OUTPUT_VARIABLE out - ERROR_VARIABLE err + ERROR_VARIABLE out RESULT_VARIABLE res) - file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt outputs) - list(SORT outputs) - if (NOT res EQUAL 0) - message(SEND_ERROR "kicad_gerber.py failed: ${out} ${err}") + message(SEND_ERROR "kicad_gerber.py failed. Output ${out}") return() endif () + file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt outputs) + list(SORT outputs) + message("outputs=${outputs}") add_custom_command( OUTPUT ${outputs} -- cgit v1.2.3