Fixed case when users explicitly pass different gcc ABI via cxx flags (#24274)

### Details:
- Should help with
https://github.com/conan-io/conan-center-index/pull/23754
 - Taken from https://github.com/openvinotoolkit/openvino/pull/23534
This commit is contained in:
Ilya Lavrenov 2024-04-27 17:00:20 +04:00 committed by GitHub
parent 768e4e1c6c
commit 3b0d2013b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ function(ov_get_compiler_definition definition var)
endif()
execute_process(COMMAND echo "#include <string>"
COMMAND "${CMAKE_CXX_COMPILER}" -x c++ - -E -dM
COMMAND "${CMAKE_CXX_COMPILER}" -x c++ - -E -dM ${CMAKE_CXX_FLAGS}
COMMAND grep -E "^#define ${definition} "
OUTPUT_VARIABLE output_value
ERROR_VARIABLE error_message