unknown cmake command

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

unknown cmake command

Robert Finch

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.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: unknown cmake command

Eric Noulard


Le dim. 9 sept. 2018 à 06:52, Robert Finch <[hidden email]> 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

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake