Skip to content

Commit 819d25c

Browse files
committed
Enable C language in CMakeList to avoid error finding LLVM
With the absortion of swiftlang/llvm-project@b663395 in stable/20220421, the LLVMConfig might try to execute C code if Terminfo library is found in the system. However the project line of XCTest does not enable the C language, and finding the package might fail in that case. This is not a problem in Swift CI because the CI machines does not seem to have the Terminfo library (as reported in their logs during the configuration of XCTest). This might only affect developers in their local machines.
1 parent b55f02f commit 819d25c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ set_target_properties(XCTest PROPERTIES
6969
if(ENABLE_TESTING)
7070
enable_testing()
7171

72+
enable_language(C)
7273
find_package(LLVM CONFIG)
7374
if(LLVM_FOUND)
7475
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")

0 commit comments

Comments
 (0)