[CMake] unknown cmake command
Eric Noulard
eric.noulard at gmail.com
Sun Sep 9 07:28:52 EDT 2018
Le dim. 9 sept. 2018 à 06:52, Robert Finch <robfi680 at gmail.com> a écrit :
> Hi, cmake is new to me. I’m attempting to use cmake to build a backend for
> LLVM. CMake fails with an ‘unknown cmake command’ error. It doesn’t seem to
> be able to find or execute modules or macros. I tried setting the
> CMAKE_MODULE_PATH, LLVM_CMAKE_DIR, LLVM_DIR, and LLVM_TABLEGEN variables. I
> wonder if this would be a problem spawning executables ? Security ? Nothing
> is written to the log file. tablegen is in the path and can be run
> manually, but cmake fails to run it. Cmake successfully built and installed
> LLVM. The file cmake fails with is Cmakelists.txt. The OS is Windows 10
> pro build 1803.
>
If the project is public is would be easier to help you if you point out
the repo of the project.
You should at least provide the full CMake error message your are getting
along with CMake version and CMake generator you use (VIsual Studio,
etc...)
I do build LLVM/clang and some tooling which are not bundled with it like
IWYU (https://include-what-you-use.org/) it appears that LLVM has specific
CMake macros that ought to be used in the right way. e.g. for IWYU
something different is done if it's built in-source (along with LLVM+clang
source tree) or out-of-source.You may have a look at:
https://github.com/include-what-you-use/include-what-you-use/blob/master/CMakeLists.txt
to see what they do for that.
However from (https://llvm.org/docs/WritingAnLLVMBackend.html#preliminaries)
I bet that building a backend is very different from building a clang-based
extra tool.
Did you get in touch on some LLVM mailing list about that?
I bet your issue may be more related on "how to use LLVM cmake build
system" than a generic CMake issue.
--
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180909/107d9c06/attachment.html>
More information about the CMake
mailing list