Commit d2ab797 1 parent b26c533 commit d2ab797 Copy full SHA for d2ab797
File tree 2 files changed +23
-3
lines changed
2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ endif()
92
92
if (NOT OV_LIBC_VERSION VERSION_EQUAL 0.0)
93
93
message (STATUS "LIBC_VERSION .......................... " ${OV_LIBC_VERSION} )
94
94
endif ()
95
+ if (DEFINED OPENVINO_STDLIB)
96
+ message (STATUS "STDLIB ................................ " ${OPENVINO_STDLIB} )
97
+ endif ()
95
98
96
99
# remove file with exported targets to force its regeneration
97
100
file (REMOVE "${CMAKE_BINARY_DIR} /OpenVINOTargets.cmake" )
Original file line number Diff line number Diff line change @@ -119,6 +119,23 @@ get_property(OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG
119
119
120
120
function (ov_detect_libc_type)
121
121
include (CheckCXXSourceCompiles)
122
+ check_cxx_source_compiles("
123
+ # include <string>
124
+ # ifndef _GLIBCXX_USE_CXX11_ABI
125
+ # error \" GlibCXX ABI is not defined\"
126
+ # endif
127
+
128
+ int main() {
129
+ return 0;
130
+ }"
131
+ OPENVINO_STDLIB_GNU)
132
+
133
+ if (OPENVINO_STDLIB_GNU)
134
+ set (OPENVINO_STDLIB "GNU" PARENT_SCOPE)
135
+ else ()
136
+ set (OPENVINO_STDLIB "CPP" PARENT_SCOPE)
137
+ endif ()
138
+
122
139
check_cxx_source_compiles("
123
140
# ifndef _GNU_SOURCE
124
141
# define _GNU_SOURCE
@@ -140,9 +157,9 @@ function(ov_detect_libc_type)
140
157
int main() {
141
158
return 0;
142
159
}"
143
- OPENVINO_MUSL_LIBC )
160
+ OPENVINO_GLIBC_MUSL )
144
161
145
- if (OPENVINO_MUSL_LIBC )
162
+ if (OPENVINO_GLIBC_MUSL )
146
163
set (OPENVINO_MUSL_LIBC ON PARENT_SCOPE)
147
164
else ()
148
165
set (OPENVINO_GNU_LIBC ON PARENT_SCOPE)
@@ -213,7 +230,7 @@ ov_libc_version()
213
230
# Detects default value for _GLIBCXX_USE_CXX11_ABI for current compiler
214
231
#
215
232
macro (ov_get_glibcxx_use_cxx11_abi)
216
- if (LINUX)
233
+ if (LINUX AND OPENVINO_STDLIB STREQUAL "GNU" )
217
234
ov_get_compiler_definition("_GLIBCXX_USE_CXX11_ABI" OV_GLIBCXX_USE_CXX11_ABI)
218
235
endif ()
219
236
endmacro ()
You can’t perform that action at this time.
0 commit comments