From 39c9f98a5d85ebe6458fc2b01e75f1dfbb95e3ec Mon Sep 17 00:00:00 2001 From: Ryan Lai Date: Wed, 15 Jan 2020 12:45:34 -0800 Subject: [PATCH] Fix test build break since winml_lib_api needs to be statically linked to tests since winmlp::learningmodeldevice::iscpu() is being used in devicehelpers.cpp (#2837) --- cmake/winml_unittests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/winml_unittests.cmake b/cmake/winml_unittests.cmake index 4bdbb34432..bd91611a6d 100644 --- a/cmake/winml_unittests.cmake +++ b/cmake/winml_unittests.cmake @@ -44,7 +44,7 @@ function(add_winml_test) if (_UT_DEPENDS) add_dependencies(${_UT_TARGET} ${_UT_DEPENDS}) endif() - target_link_libraries(${_UT_TARGET} PRIVATE ${_UT_LIBS} gtest windowsapp winml_lib_image ${onnxruntime_EXTERNAL_LIBRARIES} winml_lib_telemetry) + target_link_libraries(${_UT_TARGET} PRIVATE ${_UT_LIBS} gtest windowsapp winml_lib_image ${onnxruntime_EXTERNAL_LIBRARIES} winml_lib_telemetry winml_lib_api onnxruntime) add_test(NAME ${_UT_TARGET} COMMAND ${_UT_TARGET}