<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le dim. 9 sept. 2018 à 06:52, Robert Finch <<a href="mailto:robfi680@gmail.com">robfi680@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">
<p style="margin:0px"><span style="margin:0px;color:black;line-height:115%;font-family:Verdana,sans-serif;font-size:9pt">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. <span style="margin:0px"> </span>The file cmake fails with is Cmakelists.txt.
The OS is Windows 10 pro build 1803.</span></p></div></div></blockquote><div><br></div><div>If the project is public is would be easier to help you if you point out the repo of the project.</div><div>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...) </div><div><br></div><div>I do build LLVM/clang and some tooling which are not bundled with it like IWYU (<a href="https://include-what-you-use.org/">https://include-what-you-use.org/</a>) 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: <a href="https://github.com/include-what-you-use/include-what-you-use/blob/master/CMakeLists.txt">https://github.com/include-what-you-use/include-what-you-use/blob/master/CMakeLists.txt</a> to see what they do for that.</div><div><br></div><div>However from (<a href="https://llvm.org/docs/WritingAnLLVMBackend.html#preliminaries">https://llvm.org/docs/WritingAnLLVMBackend.html#preliminaries</a>) I bet that building a backend is very different from building a clang-based extra tool.</div><div>Did you get in touch on some LLVM mailing list about that?</div><div><br></div><div>I bet your issue may be more related on "how to use LLVM cmake build system" than a generic CMake issue.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div></div></div></div>