[cfe-dev] Question about a CMake macro in Clang repository

Stephane Rolland via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 21 17:15:14 PDT 2020

Hi, first message here, hope that's the right place to ask

I'm working on the packaging of an application (Cling++) which depends on
Clang and Llvm, for the NixOs operating system.
Currently my compilation fails at the Clang level with this error: Unknown
CMake command "find_first_existing_vc_file".

In the Clang repository there's:
7:find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
8:find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)

find_first_existing_vc_file does not seem to be defined with the macro
keyword nor included with the include keyword inside the Clang repository.

However we can have a definition for this macro inside the Llvm repository:
11:macro(find_first_existing_vc_file out_var path)
34:find_first_existing_vc_file(llvm_vc "${LLVM_MAIN_SRC_DIR}")

How, by which mechanism is Clang compilation supposed to use/include this
macro from LLVM ?

In my case, the compilation of Clang fails with this message:

CMake Error at lib/Basic/CMakeLists.txt:7 (find_first_existing_vc_file):
  Unknown CMake command "find_first_existing_vc_file".


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200822/15eb33ce/attachment.html>

More information about the cfe-dev mailing list