File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
2
+ include (CheckSymbolExists )
3
+ check_symbol_exists (_LIBCPP_VERSION "version" HAVE_LIBCPP_VERSION )
4
+ check_symbol_exists (__GLIBCXX__ "version" HAVE___GLIBCXX__ )
5
+
2
6
if (NOT APPLE )
3
7
add_subdirectory (cxxshim )
4
8
endif ()
5
- if (LINUX )
9
+ if (HAVE___GLIBCXX__ )
6
10
add_subdirectory (libstdcxx )
7
11
endif ()
8
12
add_subdirectory (std )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ target_compile_options(swiftCxxStdlib PRIVATE
22
22
target_compile_options (swiftCxxStdlib PRIVATE
23
23
"$<$<PLATFORM_ID:Android>:SHELL:-Xcc --sysroot -Xcc ${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED} /sysroot>" )
24
24
target_link_libraries (swiftCxxStdlib PRIVATE
25
- $< $< PLATFORM_ID:Linux > :libstdcxx>
25
+ $< $< BOOL: ${HAVE___GLIBCXX__} > :libstdcxx>
26
26
$< $< NOT:$< PLATFORM_ID:Darwin> > :cxxshim>
27
27
swiftCxx
28
28
swiftCore
You can’t perform that action at this time.
0 commit comments