From 4214437d181b43d3994a7ace1c713e10c5721591 Mon Sep 17 00:00:00 2001 From: John Beard Date: Thu, 18 Apr 2019 10:09:04 +0100 Subject: [PATCH] QA: Only build kicad2step tests if the lib exists If neither OCC or OCE is available, the kicad2step_lib target is not created, so the unit tests also cannot be built. Detect missing libs and abort the test target creation in that case. Reverts (and fixes): 3a8ffd66c --- qa/CMakeLists.txt | 2 +- qa/utils/kicad2step/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qa/CMakeLists.txt b/qa/CMakeLists.txt index 95419cd156..7ebada410a 100644 --- a/qa/CMakeLists.txt +++ b/qa/CMakeLists.txt @@ -46,7 +46,7 @@ add_subdirectory( pcbnew ) add_subdirectory( eeschema ) add_subdirectory( libs ) -# add_subdirectory( utils/kicad2step ) +add_subdirectory( utils/kicad2step ) # Utility/debugging/profiling programs add_subdirectory( common_tools ) diff --git a/qa/utils/kicad2step/CMakeLists.txt b/qa/utils/kicad2step/CMakeLists.txt index 84ee243c90..fa58e300b1 100644 --- a/qa/utils/kicad2step/CMakeLists.txt +++ b/qa/utils/kicad2step/CMakeLists.txt @@ -21,6 +21,11 @@ # kicad2step s-expr handling routines +if( NOT TARGET kicad2step_lib ) + # Can't build this test without the underlying library + return() +endif() + set( K2S_TEST_SRCS test_module.cpp