aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-08-04 17:05:58 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-08-04 17:05:58 +0200
commitd50e9c531df310cf91c98f2768892291de781ada (patch)
treef6f98e3ce2e8c83ca75f05f6626cdbce88502ae7 /cmake
parent331becba428d0ad33a13d97aa9b1406deb701eb8 (diff)
downloadkicad-utils-d50e9c531df310cf91c98f2768892291de781ada.tar.gz
kicad-utils-d50e9c531df310cf91c98f2768892291de781ada.tar.bz2
kicad-utils-d50e9c531df310cf91c98f2768892291de781ada.tar.xz
kicad-utils-d50e9c531df310cf91c98f2768892291de781ada.zip
o Better error message when Python fails.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/kicad_gerber.cmake10
1 files changed, 5 insertions, 5 deletions
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}