You probably want to use the execute_process() on "llvm-config --cppflags", then "llvm-config --ldflags", etc. and store each into a variable using a regular expression if necessary to parse the output. From there you can call include_directories(), add_definitions(), and target_link_libraries() as needed.<br>
<br>You might be able to adapt FindPkgConfig.cmake for your purposes (having it call llvm-config instead)?<br>You might also have a look at FindXMLRPC.cmake as it does similar parsing to what you would need.<br><br>This assumes that you want CMake to work with the output of any llvm-config. If you don't need this level of detail you can probably cut corners just to get it working.<br>
<br><div class="gmail_quote">On Sat, Jul 18, 2009 at 1:11 AM, Carter Cheng <span dir="ltr"><<a href="mailto:carter_cheng@yahoo.com">carter_cheng@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I am having some difficulties determining how to work with a back quoted arguments generator using CMake. I.e. something like this-<br>
<br>
g++ -g -c Exp.cpp `llvm-config --cppflags --ldflags --libs core jit native`<br>
<br>
Any advice/tips would be appreciated.<br>
<br>
Thanks in advance,<br>
<br>
Carter.<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br>