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..
This commit is contained in:
jean-pierre charras 2023-03-11 08:07:03 +01:00
parent b4bb1f4b46
commit 4737e3b8a7
3 changed files with 5 additions and 5 deletions

View File

@ -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} )
#

View File

@ -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 )

View File

@ -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()