yodamaster / include-what-you-use

Automatically exported from code.google.com/p/include-what-you-use
Other
0 stars 0 forks source link

Install IWYU alongside other Clang tools #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, then I build CMake's INSTALL target, it installs clang, clang++ all 
all the other LLVM executables to the directory specified by 
CMAKE_INSTALL_PREFIX. It doesn't do this for the include-what-you-use 
executable however, so I have to remember to manually copy this across when 
installing.

This small patch registers IWYU so that it's installed along with everything 
else.

Is it ok to apply?

Original issue reported on code.google.com by paul.hol...@gmail.com on 22 May 2011 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good to me.  Feel free to apply.

I don't know very much about the clang build system.  Is there a similar change 
we can/should be making to the Makefile?

Original comment by csilv...@gmail.com on 24 May 2011 at 3:26

GoogleCodeExporter commented 9 years ago
Applied in r245.

Whilst I know my way around the CMake build system I've never built via the 
Makefiles. I had a quick look and it looks like everything to do with 
installation is handled by the root-level LLVM Makefile. 

There's this comment:

# Use NO_INSTALL define of the Makefile of each directory for deciding
# if the directory is installed or not
ifeq ($(MAKECMDGOALS),install)
  OPTIONAL_DIRS := $(filter bindings, $(OPTIONAL_DIRS))
endif

I suspect the corresponding change would be to remove 'NO_INSTALL = 1' from 
IWYU's Makefile, but I'm not in a position to test this.

Original comment by paul.hol...@gmail.com on 24 May 2011 at 6:38

GoogleCodeExporter commented 9 years ago
Yes, my understanding is that in Makefile-land, to compile iwyu you need to 
modify a Makefile outside the include-what-you-use directory.  I had assumed 
this was true with cmake as well; I'm a bit surprised that's not true.  But 
it's nice for us.

I'm a bit sad to have cmakefile diverge from makefile.  May be good to comment 
that fact (or comment in the Makefile how to modify the top-level Makefile to 
build clang).  But I'm happy to close this bug.

Original comment by csilv...@gmail.com on 24 May 2011 at 6:47