Change linker flags to fix ngraph_obj build in Debug mode (#18922)

This commit is contained in:
Ilya Churaev 2023-08-02 13:51:01 +04:00 committed by GitHub
parent 9d27b34ce6
commit 0475c7270e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,14 @@ openvino_developer_export_targets(COMPONENT core TARGETS openvino::core::dev)
# Install interface libraries for case BUILD_SHARED_LIBS=OFF
ov_install_static_lib(ov_core_dev ${OV_CPACK_COMP_CORE})
# Fix error LNK1248: image size (...) exceeds maximum allowable size (FFFFFFFF)
# the symbolic debugging information will be stored in a separate .pdb file.
if(WIN32)
string(REPLACE "/Z7" "/Zi" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/Z7" "/Zi" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "/Z7" "/Zi" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Z7" "/Zi" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
#
# Create static or shared library depending on BUILD_SHARED_LIBS
#