2018-07-09 11:54:39 +00:00
|
|
|
# This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc REQUIRED )
|
|
|
|
|
2019-01-08 05:42:50 +00:00
|
|
|
set( common_srcs
|
2018-09-27 14:48:52 +00:00
|
|
|
# This is needed for the global mock objects
|
|
|
|
common_mocks.cpp
|
|
|
|
|
|
|
|
# The main test entry points
|
2018-07-09 11:54:39 +00:00
|
|
|
test_module.cpp
|
2018-09-25 12:41:20 +00:00
|
|
|
|
2018-10-05 16:17:54 +00:00
|
|
|
# stuff from common due to...units?
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/eda_text.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/common/base_units.cpp
|
2018-10-05 16:17:54 +00:00
|
|
|
|
|
|
|
# stuff from common which is needed...why?
|
2020-01-22 23:27:20 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/common/colors.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/common/observable.cpp
|
2018-10-05 16:17:54 +00:00
|
|
|
|
2019-04-24 15:35:01 +00:00
|
|
|
wximage_test_utils.cpp
|
|
|
|
|
2019-05-15 10:47:45 +00:00
|
|
|
test_array_axis.cpp
|
2019-01-24 18:15:21 +00:00
|
|
|
test_array_options.cpp
|
2019-04-24 15:35:01 +00:00
|
|
|
test_bitmap_base.cpp
|
2018-11-07 13:55:20 +00:00
|
|
|
test_color4d.cpp
|
2019-01-23 12:31:53 +00:00
|
|
|
test_coroutine.cpp
|
2019-01-04 16:01:41 +00:00
|
|
|
test_format_units.cpp
|
2019-02-03 11:44:52 +00:00
|
|
|
test_lib_table.cpp
|
2019-01-29 10:15:44 +00:00
|
|
|
test_kicad_string.cpp
|
2019-01-29 10:50:50 +00:00
|
|
|
test_refdes_utils.cpp
|
2018-10-05 16:17:54 +00:00
|
|
|
test_title_block.cpp
|
2018-09-25 12:41:20 +00:00
|
|
|
test_utf8.cpp
|
2019-01-04 16:01:41 +00:00
|
|
|
test_wildcards_and_files_ext.cpp
|
2019-02-25 10:40:00 +00:00
|
|
|
test_wx_filename.cpp
|
2018-09-25 12:41:20 +00:00
|
|
|
|
2018-11-28 12:48:45 +00:00
|
|
|
libeval/test_numeric_evaluator.cpp
|
|
|
|
|
2018-09-25 11:11:10 +00:00
|
|
|
geometry/test_fillet.cpp
|
2019-01-24 13:19:23 +00:00
|
|
|
geometry/test_segment.cpp
|
2019-01-08 17:10:14 +00:00
|
|
|
geometry/test_shape_arc.cpp
|
2019-01-24 13:19:23 +00:00
|
|
|
geometry/test_shape_poly_set_collision.cpp
|
2019-01-28 10:28:02 +00:00
|
|
|
geometry/test_shape_poly_set_distance.cpp
|
2019-01-24 13:19:23 +00:00
|
|
|
geometry/test_shape_poly_set_iterator.cpp
|
2019-05-17 00:13:21 +00:00
|
|
|
geometry/test_shape_line_chain.cpp
|
2018-11-22 16:24:17 +00:00
|
|
|
|
|
|
|
view/test_zoom_controller.cpp
|
2018-07-09 11:54:39 +00:00
|
|
|
)
|
|
|
|
|
2019-01-24 13:19:23 +00:00
|
|
|
set( common_libs
|
2018-07-09 11:54:39 +00:00
|
|
|
common
|
2018-10-05 16:17:54 +00:00
|
|
|
gal
|
2018-11-07 13:55:20 +00:00
|
|
|
qa_utils
|
|
|
|
unit_test_utils
|
2018-07-09 11:54:39 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2019-01-08 05:42:50 +00:00
|
|
|
|
|
|
|
# Use code with GERBVIEW defines in place (primarily IU difference)
|
|
|
|
add_executable( qa_common_gerbview ${common_srcs} )
|
|
|
|
target_link_libraries( qa_common_gerbview ${common_libs} )
|
|
|
|
target_compile_definitions( qa_common_gerbview PRIVATE GERBVIEW )
|
2019-12-28 18:17:55 +00:00
|
|
|
target_include_directories( qa_common_gerbview PRIVATE
|
|
|
|
$<TARGET_PROPERTY:libcontext,INTERFACE_INCLUDE_DIRECTORIES>
|
|
|
|
)
|
2019-01-08 05:42:50 +00:00
|
|
|
|
|
|
|
# Use code with PCBNEW defines in place
|
|
|
|
add_executable( qa_common_pcbnew ${common_srcs} )
|
|
|
|
target_link_libraries( qa_common_pcbnew ${common_libs} )
|
|
|
|
target_compile_definitions( qa_common_pcbnew PRIVATE PCBNEW )
|
2019-12-28 18:17:55 +00:00
|
|
|
target_include_directories( qa_common_pcbnew PRIVATE
|
|
|
|
$<TARGET_PROPERTY:libcontext,INTERFACE_INCLUDE_DIRECTORIES>
|
|
|
|
)
|
2019-01-08 05:42:50 +00:00
|
|
|
|
|
|
|
# Use code with EESCHEMA defines in place
|
|
|
|
add_executable( qa_common_eeschema ${common_srcs} )
|
|
|
|
target_link_libraries( qa_common_eeschema ${common_libs} )
|
|
|
|
target_compile_definitions( qa_common_eeschema PRIVATE EESCHEMA )
|
2019-12-28 18:17:55 +00:00
|
|
|
target_include_directories( qa_common_eeschema PRIVATE
|
|
|
|
$<TARGET_PROPERTY:libcontext,INTERFACE_INCLUDE_DIRECTORIES>
|
|
|
|
)
|
2019-01-08 05:42:50 +00:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2019-04-17 11:41:15 +00:00
|
|
|
kicad_add_boost_test( qa_common_eeschema common_eeschema )
|
|
|
|
kicad_add_boost_test( qa_common_pcbnew common_pcbnew )
|
2019-12-28 18:17:55 +00:00
|
|
|
kicad_add_boost_test( qa_common_gerbview qa_common_gerbview )
|