Skip to content

[CMake] Handle cases where Swift parser integration is disabled in Linux #68225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/Macros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ function(add_swift_macro_library name)
# Add the library.
add_pure_swift_host_library(${name} SHARED ${ASML_SOURCES})

# If we don't have the Swift swift parser, bail out, because the above
# add_pure_swift_host_library did nothing.
if (NOT SWIFT_SWIFT_PARSER)
return()
endif()

# Add rpath to 'lib/{platform}'
file(RELATIVE_PATH relpath_to_lib
"${SWIFT_HOST_PLUGINS_DEST_DIR}"
Expand All @@ -44,12 +50,6 @@ function(add_swift_macro_library name)
APPEND PROPERTY INSTALL_RPATH "$ORIGIN/..")
endif()

# If we don't have the Swift swift parser, bail out, because the above
# add_pure_swift_host_library did nothing.
if (NOT SWIFT_SWIFT_PARSER)
return()
endif()

# Install into the plugin directory.
set_target_properties(${name}
PROPERTIES
Expand Down