2017-02-27 10:07:52 +00:00
|
|
|
#
|
|
|
|
# This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2017 CERN
|
|
|
|
# @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, you may find one here:
|
|
|
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
# or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
# or you may write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
|
2019-01-09 14:35:42 +00:00
|
|
|
|
2017-02-27 10:07:52 +00:00
|
|
|
include_directories( BEFORE ${INC_BEFORE} )
|
|
|
|
|
2020-05-19 02:40:13 +00:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew
|
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2020-04-17 23:46:01 +00:00
|
|
|
set( QA_EESCHEMA_SRCS
|
2019-04-23 08:18:15 +00:00
|
|
|
# need the mock Pgm for many functions
|
|
|
|
mocks_eeschema.cpp
|
|
|
|
|
2019-04-02 15:35:25 +00:00
|
|
|
eeschema_test_utils.cpp
|
2020-02-28 21:55:51 +00:00
|
|
|
uuid_test_utils.cpp
|
2019-04-02 15:35:25 +00:00
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
# The main test entry points
|
2020-11-14 22:00:12 +00:00
|
|
|
test_module.cpp
|
2019-04-02 12:36:12 +00:00
|
|
|
|
2019-12-30 18:28:00 +00:00
|
|
|
# Base internal units (1=100nm) testing.
|
|
|
|
test_sch_biu.cpp
|
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
# Shared between programs, but dependent on the BIU
|
|
|
|
${CMAKE_SOURCE_DIR}/qa/common/test_format_units.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/qa/common/test_array_options.cpp
|
|
|
|
|
2021-02-04 19:16:34 +00:00
|
|
|
sch_plugins/altium/test_altium_parser_sch.cpp
|
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
test_eagle_plugin.cpp
|
2020-03-10 15:04:05 +00:00
|
|
|
test_lib_arc.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_lib_part.cpp
|
2020-05-19 02:40:13 +00:00
|
|
|
test_netlists.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_sch_pin.cpp
|
2019-06-25 23:39:58 +00:00
|
|
|
test_sch_rtree.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_sch_sheet.cpp
|
|
|
|
test_sch_sheet_path.cpp
|
2020-10-18 20:30:37 +00:00
|
|
|
test_sch_sheet_list.cpp
|
2020-04-16 16:43:50 +00:00
|
|
|
test_sch_symbol.cpp
|
2020-04-17 23:46:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Spice specific testing routine
|
|
|
|
if( KICAD_SPICE )
|
|
|
|
set( QA_EESCHEMA_SRCS
|
|
|
|
${QA_EESCHEMA_SRCS}
|
|
|
|
# Simulation tests
|
|
|
|
sim/test_netlist_exporter_pspice_sim.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable( qa_eeschema
|
|
|
|
${QA_EESCHEMA_SRCS}
|
2021-02-09 23:46:13 +00:00
|
|
|
|
|
|
|
# Older CMakes cannot link OBJECT libraries
|
|
|
|
# https://cmake.org/pipermail/cmake/2013-November/056263.html
|
|
|
|
$<TARGET_OBJECTS:eeschema_kiface_objects>
|
2019-04-02 12:36:12 +00:00
|
|
|
)
|
|
|
|
|
2021-02-09 23:46:13 +00:00
|
|
|
# Anytime we link to the kiface_objects, we have to add a dependency on the last object
|
|
|
|
# to ensure that the generated lexer files are finished being used before the qa runs in a
|
|
|
|
# multi-threaded build
|
|
|
|
add_dependencies( qa_eeschema eeschema )
|
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
target_link_libraries( qa_eeschema
|
|
|
|
common
|
2020-05-19 02:40:13 +00:00
|
|
|
pcbcommon
|
2021-03-18 13:28:04 +00:00
|
|
|
scripting
|
2020-03-10 15:04:05 +00:00
|
|
|
kimath
|
2019-04-02 12:36:12 +00:00
|
|
|
qa_utils
|
2019-12-29 13:07:17 +00:00
|
|
|
markdown_lib
|
2019-04-02 12:36:12 +00:00
|
|
|
${GDI_PLUS_LIBRARIES}
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2021-02-09 23:46:13 +00:00
|
|
|
target_include_directories( qa_eeschema PUBLIC
|
|
|
|
# Paths for eeschema lib usage (should really be in eeschema/common
|
|
|
|
# target_include_directories and made PUBLIC)
|
|
|
|
$<TARGET_PROPERTY:eeschema_kiface_objects,INCLUDE_DIRECTORIES>
|
|
|
|
)
|
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
# Eeschema tests, so pretend to be eeschema (for units, etc)
|
|
|
|
target_compile_definitions( qa_eeschema
|
|
|
|
PUBLIC EESCHEMA
|
2019-04-02 15:35:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Pass in the default data location
|
|
|
|
set_source_files_properties( eeschema_test_utils.cpp PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS "QA_EESCHEMA_DATA_LOCATION=(\"${CMAKE_CURRENT_SOURCE_DIR}/data\")"
|
2019-04-17 11:41:15 +00:00
|
|
|
)
|
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
kicad_add_boost_test( qa_eeschema qa_eeschema )
|
2020-04-19 20:13:21 +00:00
|
|
|
|