Skip to content

Commit

Permalink
Add /MT[d] to CMAKE_LANG_FLAGS_CONFIG_INIT (openvinotoolkit#27173)
Browse files Browse the repository at this point in the history
### Details:
Add /MT[d] to CMAKE_LANG_FLAGS_CONFIG_INIT to avoid the missing of 
/O2 /Ob2 /DNDEBUG flags in CMAKE_LANG_FLAGS_CONFIG


### Tickets:
 - *152927*

Signed-off-by: Kang Wenjing <wenjing.kang@intel.com>
  • Loading branch information
WenjingKangIntel authored Oct 31, 2024
1 parent 9ec63be commit f60b9c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/toolchains/mt.runtime.win32.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ if(use_static_runtime)
foreach(build_type "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
set(flag_var "CMAKE_${lang}_FLAGS${build_type}_INIT")
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
if (build_type STREQUAL "_DEBUG")
set(${flag_var} "${${flag_var}} /MTd")
else()
set(${flag_var} "${${flag_var}} /MT")
endif()
endforeach()
endforeach()
endif()
Expand Down

0 comments on commit f60b9c4

Please sign in to comment.