How can I make clang's td file be aware of cmake variables?

Earlier this afternoon, I posted a question 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 :slight_smile:

I would like to know for clang 3.4, How can I make set cmake variables such as



be utilized by some td files such as the following two?

  • ${CMAKE_SOURCE_DIRECTORY}/include/clang/Driver/

  • ${CMAKE_SOURCE_DIRECTORY}/include/clang/Driver/

They both have a include statement:

// Include the common option parsing interfaces.

include “llvm/Option/”

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?

– Zack

I did some more digging, and ran into this LLVM online doc. But it says nullptr as to how to make it cmake variable aware x-(

– Zack