[cfe-dev] Ubuntu install location fixes

Gonsolo gonsolo at gmail.com
Tue Feb 16 16:10:21 PST 2010


>> I think the best approach is to make this be a configure option at
>> clang build time.  Second to that, just making the code scan the
>> /usr/include/c++ dir and pick the latest revision available would
>> work.

I found a way to make it a cmake option which defaults to the latest 
revision available at compile time (which serves us lazy people who just 
want to do a "cd llvm/tools; ln -s ../../clang .; cd ..; mkdir build; cd 
build; cmake .."):

cat CMakeLists.txt:

...
FILE( GLOB cppdirs "/usr/include/c++/*" )
list( SORT cppdirs )
list( GET cppdirs -1 CXX_INCLUDE_DIRS)
MESSAGE( STATUS "CXX_INCLUDE_DIRS: ${CXX_INCLUDE_DIRS}" )
...

I am looking forward to implement this for clang. Would this be a 
preferred solution?

I also discovered C_INCLUDE_DIRS in the llvm CMakeLists.txt. Should I 
add my solution to llvm or clang?

g



More information about the cfe-dev mailing list