[cfe-dev] How can I make clang's td file be aware of cmake variables?

Zack Perry zack.perry at sbcglobal.net
Fri Mar 14 16:13:05 PDT 2014


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 :)

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

	2. CLANG_PATH_TO_LLVM_BUILD

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

	* ${CMAKE_SOURCE_DIRECTORY}/include/clang/Driver/Options.td

	* ${CMAKE_SOURCE_DIRECTORY}/include/clang/Driver/CC1AsOptions.td

They both have a include statement:

// Include the common option parsing interfaces.
include "llvm/Option/OptParser.td"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140314/a8e25d09/attachment.html>


More information about the cfe-dev mailing list