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:
parent
b4bb1f4b46
commit
4737e3b8a7
|
@ -775,9 +775,6 @@ include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} )
|
||||||
|
|
||||||
#
|
#
|
||||||
# Find Boost headers and libraries, required.
|
# 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} )
|
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
# or you may write to the Free Software Foundation, Inc.,
|
# or you may write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
# 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)
|
include(KiCadQABuildUtils)
|
||||||
|
|
||||||
if( KICAD_TEST_XML_OUTPUT )
|
if( KICAD_TEST_XML_OUTPUT )
|
||||||
|
|
|
@ -38,8 +38,8 @@ add_library( qa_utils STATIC
|
||||||
|
|
||||||
include_directories( BEFORE ${INC_BEFORE} )
|
include_directories( BEFORE ${INC_BEFORE} )
|
||||||
|
|
||||||
# for some obscure reason, on mingw/msys2 ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} does not work
|
# for some obscure reason, on mingw/msys2 Boost::unit_test_framework does not work
|
||||||
# So use the actual the lib filename:
|
# So use the actual lib filename:
|
||||||
if( MINGW )
|
if( MINGW )
|
||||||
set( LIBBOOST_UNIT_TEST_LIB libboost_unit_test_framework-mt )
|
set( LIBBOOST_UNIT_TEST_LIB libboost_unit_test_framework-mt )
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue