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 )
|
|
|
|
|
2022-08-09 01:25:31 +00:00
|
|
|
set( QA_COMMON_SRCS
|
2018-09-27 14:48:52 +00:00
|
|
|
# This is needed for the global mock objects
|
2022-02-06 19:39:13 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/mocks/kicad/common_mocks.cpp
|
2018-09-27 14:48:52 +00:00
|
|
|
|
|
|
|
# The main test entry points
|
2018-07-09 11:54:39 +00:00
|
|
|
test_module.cpp
|
2018-09-25 12:41:20 +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-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
|
2023-01-29 12:21:45 +00:00
|
|
|
test_eda_shape.cpp
|
2019-02-03 11:44:52 +00:00
|
|
|
test_lib_table.cpp
|
2023-01-08 22:49:55 +00:00
|
|
|
test_markup_parser.cpp
|
2019-01-29 10:15:44 +00:00
|
|
|
test_kicad_string.cpp
|
2021-11-20 19:19:29 +00:00
|
|
|
test_kiid.cpp
|
2020-02-02 18:29:33 +00:00
|
|
|
test_property.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
|
2021-11-21 23:52:01 +00:00
|
|
|
test_types.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
|
|
|
|
|
2021-02-04 19:16:34 +00:00
|
|
|
plugins/altium/test_altium_parser.cpp
|
2021-03-14 15:40:36 +00:00
|
|
|
plugins/altium/test_altium_parser_utils.cpp
|
2021-01-31 12:50:17 +00:00
|
|
|
|
2021-11-29 20:33:07 +00:00
|
|
|
plugins/cadstar/test_cadstar_archive_parser.cpp
|
|
|
|
|
2018-11-22 16:24:17 +00:00
|
|
|
view/test_zoom_controller.cpp
|
2018-07-09 11:54:39 +00:00
|
|
|
)
|
|
|
|
|
2022-05-29 19:29:32 +00:00
|
|
|
if( KICAD_TEST_DATABASE_LIBRARIES )
|
|
|
|
set( QA_COMMON_SRCS ${QA_COMMON_SRCS} test_database.cpp )
|
|
|
|
endif()
|
|
|
|
|
2022-08-09 01:25:31 +00:00
|
|
|
set( QA_COMMON_LIBS
|
2018-07-09 11:54:39 +00:00
|
|
|
common
|
2022-01-02 02:21:49 +00:00
|
|
|
libcontext
|
2018-10-05 16:17:54 +00:00
|
|
|
gal
|
2018-11-07 13:55:20 +00:00
|
|
|
qa_utils
|
2018-07-09 11:54:39 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2022-08-09 01:25:31 +00:00
|
|
|
if( WIN32 )
|
|
|
|
# We want to declare a resource manifest on Windows to enable UTF8 mode
|
|
|
|
# Without UTF8 mode, some random IO tests may fail, we set the active code page on normal kicad to UTF8 as well
|
|
|
|
if( MINGW )
|
|
|
|
# QA_COMMON_RESOURCES variable is set by the macro.
|
|
|
|
mingw_resource_compiler( qa_common )
|
|
|
|
else()
|
|
|
|
set( QA_COMMON_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/qa_common.rc )
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-01-08 05:42:50 +00:00
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
# Test executable for non-program-specific code
|
2022-08-09 01:25:31 +00:00
|
|
|
add_executable( qa_common
|
|
|
|
${QA_COMMON_SRCS}
|
|
|
|
${QA_COMMON_RESOURCES} )
|
|
|
|
target_link_libraries( qa_common ${QA_COMMON_LIBS} )
|
2019-01-08 05:42:50 +00:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
2022-02-06 19:39:13 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/mocks/include
|
2019-01-08 05:42:50 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2022-05-29 19:29:32 +00:00
|
|
|
if( KICAD_TEST_DATABASE_LIBRARIES )
|
|
|
|
set_source_files_properties( test_database.cpp PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS "QA_DATABASE_FILE_LOCATION=(\"${CMAKE_SOURCE_DIR}/qa/data/dblib\")"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
kicad_add_boost_test( qa_common qa_common )
|