Question about a CMake macro in Clang repository

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about a CMake macro in Clang repository

Hubert Tong via cfe-dev
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:
lib/Basic/CMakeLists.txt
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:
llvm/include/llvm/Support/CMakeLists.txt
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:

-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Success
CMake Error at lib/Basic/CMakeLists.txt:7 (find_first_existing_vc_file):
  Unknown CMake command "find_first_existing_vc_file".

Regards

S.R.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question about a CMake macro in Clang repository

Hubert Tong via cfe-dev
El vie., 21 de ago. de 2020 a la(s) 21:15, Stephane Rolland via
cfe-dev ([hidden email]) escribió:

>
> 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:
> lib/Basic/CMakeLists.txt
> 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:
> llvm/include/llvm/Support/CMakeLists.txt
> 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:
>
> -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Success
> CMake Error at lib/Basic/CMakeLists.txt:7 (find_first_existing_vc_file):
>   Unknown CMake command "find_first_existing_vc_file".

What old version of LLVM are you building? The macro was moved from
llvm/Support/CMakeLists.txt into AddLLVM.cmake in 2017 (git
76d02cebab, SVN 312419).

--
Nicolás
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev