Files
openvino/cmake/toolchains/mt.runtime.win32.toolchain.cmake
Ilya Lavrenov 51b9dff1bc Windows static (#8578)
* Enable LTO for oneDNN GPU

* Use importer target for onednn_gpu

* Fixed install of OpenCL, ittapi

* Try to enable samples build

* Fixed ie_wheel build

* Disabled samples

* Fixed incorrect install of pugixml in dynamic build

* Fixed clDNN_unit_tests64 link

* Minimized a number of hardcoded paths

* Switched off ITT

* Disable TBBBind for static Windows

* Fixed link on Windows

* Fixes

* Static build for Window

* Disable unit-tests

* Disabled TF

* Fixed add dependency for PDPD unit tests

* Disabled GNA

* Enabled ngraph test utils

* Fixes

* Fixes

* Disable clDNN for static build on Windows

* Dynamic MCVS runtime for OpenCL

* Disable ITT traces for static libs

* Ability to switch TBBBind_2_5 OFF

* Disabled GPU on Windows build

* Fixed libGNA link

* Disabled some GNA tests

* Fixed multiple definitions issue

* Hide FrontEnd::load in DLL

* Install libGNAStubs

* Trying to fix Windows

* Trying to fix frontends

* Passed compilation on Windows

* Updated install rules for ngraph backends

* Try CPU, TEMPLATE tests

* Enabled unit-tests

* Enabled ngraph tests

* Try to fix unit-test

* Fixed unit-test on Linux

* Fixed compilation with ENABLE_IR_V7_READER=OFF

* Fixed tests on Linux

* Enable cpuFuncTests only in static build

* Try to fix testMockPluginFrontEnd test

* Try to enable TF

* Fixed python tests

* Partial revert

* Removed OV_FRONTEND_PATH
2021-11-17 01:22:04 +03:00

42 lines
1.0 KiB
CMake

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# Flags for 3rd party projects
#
set(use_static_runtime ON)
if(use_static_runtime)
foreach(lang C CXX)
foreach(build_type "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
set(flag_var "CMAKE_${lang}_FLAGS${build_type}")
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
endforeach()
endif()
function(onecoreuap_set_runtime var)
set(${var} ${use_static_runtime} CACHE BOOL "" FORCE)
endfunction()
# ONNX
onecoreuap_set_runtime(ONNX_USE_MSVC_STATIC_RUNTIME)
# pugixml
onecoreuap_set_runtime(STATIC_CRT)
# protobuf
onecoreuap_set_runtime(protobuf_MSVC_STATIC_RUNTIME)
# clDNN
onecoreuap_set_runtime(CLDNN__COMPILE_LINK_USE_STATIC_RUNTIME)
# OpenCL
onecoreuap_set_runtime(USE_DYNAMIC_VCXX_RUNTIME)
# google-test
if(use_static_runtime)
set(gtest_force_shared_crt OFF CACHE BOOL "" FORCE)
else()
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()
unset(use_static_runtime)