Browse Source

QA tests: link unit_test_framework library only with QA tests.

It fixes a link issue on W10/msys2 when building some .exe files
not related to QA tests, but have the unit_test_framework library linked
without this change..
newinvert
jean-pierre charras 3 years ago
parent
commit
4737e3b8a7
  1. 3
      CMakeLists.txt
  2. 3
      qa/CMakeLists.txt
  3. 4
      qa/qa_utils/CMakeLists.txt

3
CMakeLists.txt

@ -775,9 +775,6 @@ include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} )
#
# Find Boost headers and libraries, required.
if( KICAD_BUILD_QA_TESTS )
list( APPEND BOOST_REQUESTED_COMPONENTS unit_test_framework system )
endif()
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
#

3
qa/CMakeLists.txt

@ -19,6 +19,9 @@
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
list( APPEND BOOST_REQUESTED_COMPONENTS unit_test_framework system )
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
include(KiCadQABuildUtils)
if( KICAD_TEST_XML_OUTPUT )

4
qa/qa_utils/CMakeLists.txt

@ -38,8 +38,8 @@ add_library( qa_utils STATIC
include_directories( BEFORE ${INC_BEFORE} )
# for some obscure reason, on mingw/msys2 ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} does not work
# So use the actual the lib filename:
# for some obscure reason, on mingw/msys2 Boost::unit_test_framework does not work
# So use the actual lib filename:
if( MINGW )
set( LIBBOOST_UNIT_TEST_LIB libboost_unit_test_framework-mt )
endif()

Loading…
Cancel
Save