mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce and use SWIFT_HAVE_LIBEDIT
This commit is contained in:
@@ -13,6 +13,7 @@ set_property(GLOBAL PROPERTY JOB_POOL_LINK local_jobs)
|
||||
|
||||
# First include general CMake utilities.
|
||||
include(SwiftUtils)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
#
|
||||
# User-configurable options that control the inclusion and default build
|
||||
@@ -805,6 +806,8 @@ if(LIBXML2_FOUND)
|
||||
set(SWIFT_HAVE_LIBXML 1)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT)
|
||||
|
||||
if (LLVM_ENABLE_DOXYGEN)
|
||||
message(STATUS "Doxygen: enabled")
|
||||
endif()
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
include(CheckSymbolExists)
|
||||
|
||||
check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT)
|
||||
|
||||
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
|
||||
ESCAPE_QUOTES @ONLY)
|
||||
|
||||
|
||||
@@ -6,5 +6,7 @@ include_directories(
|
||||
|
||||
add_swift_lib_subdirectory(sourcekitd)
|
||||
add_swift_tool_subdirectory(sourcekitd-test)
|
||||
add_swift_tool_subdirectory(sourcekitd-repl)
|
||||
if(HAVE_UNICODE_LIBEDIT)
|
||||
add_swift_tool_subdirectory(sourcekitd-repl)
|
||||
endif()
|
||||
add_swift_tool_subdirectory(complete-test)
|
||||
|
||||
@@ -12,7 +12,9 @@ add_swift_host_tool(swift
|
||||
SWIFT_COMPONENT compiler
|
||||
)
|
||||
|
||||
target_link_libraries(swift edit)
|
||||
if(HAVE_UNICODE_LIBEDIT)
|
||||
target_link_libraries(swift edit)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET swift POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "swift" "swiftc"
|
||||
|
||||
@@ -7,7 +7,9 @@ add_swift_host_tool(swift-remoteast-test
|
||||
)
|
||||
|
||||
set_target_properties(swift-remoteast-test PROPERTIES ENABLE_EXPORTS 1)
|
||||
target_link_libraries(swift-remoteast-test edit)
|
||||
if(HAVE_UNICODE_LIBEDIT)
|
||||
target_link_libraries(swift-remoteast-test edit)
|
||||
endif()
|
||||
|
||||
# If building as part of clang, make sure the headers are installed.
|
||||
if(NOT SWIFT_BUILT_STANDALONE)
|
||||
|
||||
Reference in New Issue
Block a user