From de543c03088933fb4fc497e83ebc45484988358d Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Fri, 17 Apr 2020 09:54:01 -0700 Subject: [PATCH] Add SafeInt include to WinML targets (#3558) Fixing Windows builds on the ort_training branch in preparation for the merge to master. SafeInt (included via onnxruntime/core/common/safeint.h) was recently made a dependency of onnxruntime/core/framework/bfc_arena.h. That requires consumers of bfc_arena to compile with the SafeInt include directory. --- cmake/winml.cmake | 2 ++ cmake/winml_unittests.cmake | 1 + 2 files changed, 3 insertions(+) diff --git a/cmake/winml.cmake b/cmake/winml.cmake index 934caedaba..75111caaea 100644 --- a/cmake/winml.cmake +++ b/cmake/winml.cmake @@ -406,6 +406,7 @@ target_include_directories(winml_lib_api PRIVATE ${REPO_ROOT}/cmake/external/eig target_include_directories(winml_lib_api PRIVATE ${REPO_ROOT}/cmake/external/onnx) target_include_directories(winml_lib_api PRIVATE ${REPO_ROOT}/cmake/external/protobuf/src) target_include_directories(winml_lib_api PRIVATE ${REPO_ROOT}/cmake/external/gsl/include) +target_include_directories(winml_lib_api PRIVATE ${REPO_ROOT}/cmake/external/SafeInt) # Properties set_target_properties(winml_lib_api @@ -541,6 +542,7 @@ target_include_directories(winml_dll PRIVATE ${REPO_ROOT}/cmake/external/onnx) target_include_directories(winml_dll PRIVATE ${REPO_ROOT}/cmake/external/protobuf/src) target_include_directories(winml_dll PRIVATE ${REPO_ROOT}/cmake/external/gsl/include) target_include_directories(winml_dll PRIVATE ${REPO_ROOT}/cmake/external/eigen) +target_include_directories(winml_dll PRIVATE ${REPO_ROOT}/cmake/external/SafeInt) # Properties set_target_properties(winml_dll diff --git a/cmake/winml_unittests.cmake b/cmake/winml_unittests.cmake index 73d0ff7fde..2e9814da0a 100644 --- a/cmake/winml_unittests.cmake +++ b/cmake/winml_unittests.cmake @@ -10,6 +10,7 @@ set(WINML_TEST_INC_DIR ${REPO_ROOT}/cmake/external/googletest/googletest/include ${REPO_ROOT}/cmake/external/protobuf/src ${REPO_ROOT}/cmake/external/wil/include + ${REPO_ROOT}/cmake/external/SafeInt ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/winml_api ${CMAKE_CURRENT_BINARY_DIR}/winml_api/comp_generated