File tree 1 file changed +5
-10
lines changed
1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,13 @@ _ov_gtest_filter_install_interface(gmock gmock)
39
39
_ov_gtest_filter_install_interface(gmock_main gmock)
40
40
41
41
foreach (target gtest gtest_main gmock gmock_main)
42
- # If we have specified /Z7 option, remove -Zi option which comes from gtest
43
- if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
44
- get_target_property (_target_cxx_flags ${target} COMPILE_OPTIONS)
42
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
43
+ get_target_property (_target_cxx_flags ${target} COMPILE_FLAGS )
45
44
if (_target_cxx_flags)
46
- if (CMAKE_CXX_FLAGS_DEBUG MATCHES ".+/Z7.+" OR CMAKE_CXX_FLAGS_RELWITHDEBINFO MATCHES ".+/Z7.+" )
47
- string (REPLACE "-Zi" " " _target_cxx_flags ${_target_cxx_flags} )
48
- message (STATUS "Removing -Zi flag from target " ${target} )
49
- set_target_properties (${target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags} " )
50
- endif ()
45
+ string (REPLACE "-Zi" " " _target_cxx_flags ${_target_cxx_flags} )
46
+ set_target_properties (${target} PROPERTIES COMPILE_FLAGS "${_target_cxx_flags} " )
51
47
endif ()
52
- elseif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$" OR
53
- CMAKE_CXX_COMPILER_ID STREQUAL "Intel" )
48
+ elseif (CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel" )
54
49
target_compile_options (${target} PRIVATE -Wno-undef)
55
50
if (CMAKE_COMPILER_IS_GNUCXX)
56
51
target_compile_options (${target} PRIVATE -Wno-deprecated-copy)
You can’t perform that action at this time.
0 commit comments