[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:20:20 PDT 2014


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


________________________________
 From: Zack Perry <zack.perry at sbcglobal.net>
To: "cfe-dev at cs.uiuc.edu" <cfe-dev at cs.uiuc.edu> 
Sent: Friday, March 14, 2014 4:13 PM
Subject: 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 :)

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/1b4fdc22/attachment.html>


More information about the cfe-dev mailing list