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 @@ -29,8 +29,10 @@ endif()
29
29
30
30
add_dependencies (FoundationEssentials FoundationMacros )
31
31
32
- if (CMAKE_SYSTEM_NAME STREQUAL Linux )
33
- target_compile_options (FoundationEssentials PRIVATE "-D_GNU_SOURCE" )
32
+ if (CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL Android )
33
+ target_compile_options (FoundationEssentials PRIVATE
34
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -Xcc -Xfrontend -D_GNU_SOURCE>" )
35
+ list (APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
34
36
endif ()
35
37
36
38
target_compile_options (FoundationEssentials PRIVATE
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ FetchContent_MakeAvailable(SwiftSyntax)
44
44
45
45
# Link against SwiftSyntax
46
46
target_compile_options (FoundationMacros PRIVATE -parse-as-library )
47
+ target_compile_options (FoundationMacros PRIVATE
48
+ "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-experimental-feature -Xfrontend AccessLevelOnImport>" )
47
49
target_link_libraries (FoundationMacros
48
50
SwiftSyntax
49
51
SwiftSyntaxMacros
You can’t perform that action at this time.
0 commit comments