You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1 KiB

  1. # This program source code file is part of KiCad, a free EDA CAD application.
  2. #
  3. # Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU General Public License
  7. # as published by the Free Software Foundation; either version 2
  8. # of the License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, you may find one here:
  17. # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  18. # or you may search the http://www.gnu.org website for the version 2 license,
  19. # or you may write to the Free Software Foundation, Inc.,
  20. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  21. set( QA_UTIL_COMMON_SRC
  22. stdstream_line_reader.cpp
  23. utility_program.cpp
  24. uuid_test_utils.cpp
  25. geometry/line_chain_construction.cpp
  26. geometry/poly_set_construction.cpp
  27. geometry/seg_construction.cpp
  28. wx_utils/unit_test_utils.cpp
  29. wx_utils/wx_assert.cpp
  30. )
  31. # A generic library of useful functions for various testing purposes
  32. add_library( qa_utils STATIC
  33. ${QA_UTIL_COMMON_SRC}
  34. )
  35. include_directories( BEFORE ${INC_BEFORE} )
  36. # for some obscure reason, on mingw/msys2 Boost::unit_test_framework does not work
  37. # So use the actual lib filename:
  38. if( MINGW )
  39. set( LIBBOOST_UNIT_TEST_LIB libboost_unit_test_framework-mt )
  40. endif()
  41. target_link_libraries( qa_utils
  42. common
  43. turtle
  44. Boost::headers
  45. Boost::unit_test_framework
  46. ${wxWidgets_LIBRARIES}
  47. ${LIBBOOST_UNIT_TEST_LIB}
  48. )
  49. # Pass in the default data location
  50. set_source_files_properties( wx_utils/unit_test_utils.cpp PROPERTIES
  51. COMPILE_DEFINITIONS "QA_EESCHEMA_DATA_LOCATION=(\"${CMAKE_SOURCE_DIR}/qa/data/eeschema\")"
  52. )
  53. target_include_directories( qa_utils PUBLIC
  54. include
  55. )
  56. target_compile_definitions( qa_utils PUBLIC
  57. BOOST_TEST_DYN_LINK
  58. )