<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>I did some more digging, and ran into <a href="http://llvm.org/docs/TableGenFundamentals.html#file-inclusion">this LLVM online doc</a>.  But it says nullptr as to how to make it cmake variable aware x-(</span></div><div style="font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span>-- Zack</span></div><div style="font-family: arial, helvetica, sans-serif;"><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2"
 face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Zack Perry <zack.perry@sbcglobal.net><br> <b><span style="font-weight: bold;">To:</span></b> "cfe-dev@cs.uiuc.edu" <cfe-dev@cs.uiuc.edu> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, March 14, 2014 4:13 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> How can I make clang's td file be aware of cmake variables?<br> </font> </div> <div class="y_msg_container"><br>
<div id="yiv573319828"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-size:12pt;">Earlier this afternoon, I posted <a rel="nofollow" target="_blank" href="http://clang-developers.42468.n3.nabble.com/Help-with-compiling-clang-3-4-standalone-with-cmake-and-already-installed-LLVM-compiler-rt-3-4-td4038452.html">a question</a> regarding building clang 3.4 standalone, which I soon came up a quick and dirty get-around.  Now I would like fix it properly. I started studying cmake twp weeks ago but I am comfortable in reading/editing/creating listfiles.  No, I am not a compiler person, but I am an engineer (but not a software developer) and I read/write code :)</div><div style="font-size:12pt;"><br></div><div style="font-size: 16px; color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; background-color: transparent; font-style:
 normal;">I would like to know for clang 3.4, How can I make set cmake
 variables such as </div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; font-style: normal;"><ol style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal;" class="yiv573319828"><li><span style="background-color:transparent;">LLVM_MAIN_SRC_DIR</span><br></li><li><span style="background-color:transparent;">CLANG_PATH_TO_LLVM_BUILD</span><br></li></ol><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal;">be utilized by some td files such as the following two?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal;"><ul><li><span style="
background-color:transparent;">${CMAKE_SOURCE_DIRECTORY}/include/clang/Driver/Options.td</span><br></li><li><span style="background-color:transparent;">${CMAKE_SOURCE_DIRECTORY}/</span><span style="background-color:transparent;">include/clang/Driver/CC1AsOptions.td</span><br></li></ul><div>They both have a include statement:</div><div><br></div></div></div><div>// Include the common option parsing interfaces.</div><div><div><div>include "llvm/Option/OptParser.td"</div><div><br></div><div>which regardless which cmake variable that I set, they took no effect.  So far, I have been putting in the full path into said include statement, but this obviously is not ideal. Can anyone give me a hint as to how to make these td files cmake variable aware?</div><div><br></div><div>-- Zack</div><div><br></div></div></div></div></div></div><br><br></div> </div> </div>  </div></body></html>