Skip to content

Commit

Permalink
cmake: LLVM 14 requires C as a project language
Browse files Browse the repository at this point in the history
... due to a bug.

See: llvm/llvm-project#53950
Fixes:
CMake Error at /usr/local/share/cmake-3.22/Modules/Internal/CheckSourceCompiles.cmake:44 (message):
  check_source_compiles: C: needs to be enabled before use.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.22/Modules/CheckCSourceCompiles.cmake:76 (cmake_check_source_compiles)
  /usr/lib/llvm-14/lib/cmake/llvm/FindFFI.cmake:44 (check_c_source_compiles)
  /usr/lib/llvm-14/lib/cmake/llvm/LLVMConfig.cmake:242 (find_package)
  CMakeLists.txt:31 (find_package)
  • Loading branch information
lzaoral committed Jun 15, 2022
1 parent b6041a6 commit c096893
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion passes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required (VERSION 3.0)
project (passes CXX)

# FIXME: Unfortunately, C is (at least temporarily) required due to a bug
# in LLVM 14. See https://github.com/llvm/llvm-project/issues/53950.
project (passes LANGUAGES C CXX)

# uncomment this on Darwin if linking the plug-ins fails on undefined references
if(APPLE)
Expand Down

0 comments on commit c096893

Please sign in to comment.