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.

119 lines
3.9 KiB

  1. #
  2. # This program source code file is part of KiCad, a free EDA CAD application.
  3. #
  4. # Copyright (C) 2017 CERN
  5. # @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
  6. #
  7. # This program is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU General Public License
  9. # as published by the Free Software Foundation; either version 2
  10. # of the License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, you may find one here:
  19. # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. # or you may search the http://www.gnu.org website for the version 2 license,
  21. # or you may write to the Free Software Foundation, Inc.,
  22. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. find_package(Boost COMPONENTS unit_test_framework REQUIRED)
  24. find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc REQUIRED )
  25. add_definitions(-DBOOST_TEST_DYN_LINK -DPCBNEW -DTEST_APP_GUI)
  26. add_executable( test_pns
  27. ../../pcbnew/drc/drc_rule.cpp
  28. ../../pcbnew/drc/drc_rule_condition.cpp
  29. ../../pcbnew/drc/drc_rule_parser.cpp
  30. ../../pcbnew/drc/drc_test_provider.cpp
  31. ../../pcbnew/drc/drc_test_provider_copper_clearance.cpp
  32. ../../pcbnew/drc/drc_test_provider_hole_to_hole.cpp
  33. ../../pcbnew/drc/drc_test_provider_edge_clearance.cpp
  34. ../../pcbnew/drc/drc_test_provider_hole_size.cpp
  35. ../../pcbnew/drc/drc_test_provider_disallow.cpp
  36. ../../pcbnew/drc/drc_test_provider_track_width.cpp
  37. ../../pcbnew/drc/drc_test_provider_annular_width.cpp
  38. ../../pcbnew/drc/drc_test_provider_connectivity.cpp
  39. ../../pcbnew/drc/drc_test_provider_courtyard_clearance.cpp
  40. ../../pcbnew/drc/drc_test_provider_via_diameter.cpp
  41. ../../pcbnew/drc/drc_test_provider_lvs.cpp
  42. ../../pcbnew/drc/drc_test_provider_misc.cpp
  43. ../../pcbnew/drc/drc_test_provider_silk_to_mask.cpp
  44. ../../pcbnew/drc/drc_test_provider_silk_clearance.cpp
  45. ../../pcbnew/drc/drc_test_provider_matched_length.cpp
  46. ../../pcbnew/drc/drc_test_provider_diff_pair_coupling.cpp
  47. ../../pcbnew/drc/drc_engine.cpp
  48. ../../pcbnew/drc/drc_item.cpp
  49. pns_log.cpp
  50. pns_log_viewer.cpp
  51. pns_log_viewer_frame_base.cpp
  52. ../qa_utils/pcb_test_frame.cpp
  53. ../qa_utils/test_app_main.cpp
  54. ../qa_utils/utility_program.cpp
  55. ../qa_utils/mocks.cpp
  56. ../../common/base_units.cpp
  57. playground.cpp
  58. )
  59. # Pcbnew tests, so pretend to be pcbnew (for units, etc)
  60. target_compile_definitions( test_pns
  61. PRIVATE PCBNEW
  62. )
  63. # Anytime we link to the kiface_objects, we have to add a dependency on the last object
  64. # to ensure that the generated lexer files are finished being used before the qa runs in a
  65. # multi-threaded build
  66. add_dependencies( test_pns pcbnew )
  67. target_link_libraries( test_pns
  68. qa_pcbnew_utils
  69. connectivity
  70. pcbcommon
  71. pnsrouter
  72. gal
  73. common
  74. gal
  75. qa_utils
  76. dxflib_qcad
  77. tinyspline_lib
  78. nanosvg
  79. idf3
  80. pcbcommon
  81. 3d-viewer
  82. ${PCBNEW_IO_LIBRARIES}
  83. ${wxWidgets_LIBRARIES}
  84. ${GDI_PLUS_LIBRARIES}
  85. ${PYTHON_LIBRARIES}
  86. ${Boost_LIBRARIES}
  87. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  88. )
  89. include_directories( BEFORE ${INC_BEFORE} )
  90. include_directories(
  91. ${CMAKE_SOURCE_DIR}
  92. ${CMAKE_SOURCE_DIR}/include
  93. ${CMAKE_SOURCE_DIR}/3d-viewer
  94. ${CMAKE_SOURCE_DIR}/common
  95. ${CMAKE_SOURCE_DIR}/pcbnew
  96. ${CMAKE_SOURCE_DIR}/pcbnew/router
  97. ${CMAKE_SOURCE_DIR}/pcbnew/tools
  98. ${CMAKE_SOURCE_DIR}/pcbnew/dialogs
  99. ${CMAKE_SOURCE_DIR}/polygon
  100. ${CMAKE_SOURCE_DIR}/common/geometry
  101. ${CMAKE_SOURCE_DIR}/qa/common
  102. ${CMAKE_SOURCE_DIR}/qa/qa_utils
  103. ${CMAKE_SOURCE_DIR}/qa/qa_utils/include
  104. ${Boost_INCLUDE_DIR}
  105. ${INC_AFTER}
  106. )