zeusdeux / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

CXX Makefile compliance #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set CXX to another c++ compiler
2. compile

What is the expected output? What do you see instead?
The Makefile use the CC variable as the c++ compiler. It should use the CXX 
variable. Furthermore, the Makefile has hardcoded "g++" calls (at the link 
stage for instance).

This makes things hard to use another compiler or to compile if g++ is not 
installed on the system.

What version of the product are you using? On what operating system?
FreeBSD 8-STABLE

Original issue reported on code.google.com by julien.laffaye on 20 Jun 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Hrm, I should have done this ages ago.

Here's a patch to implement it:
Makefile: Use CXX instead of CC and explicit g++.
Remove unecessary rules for building .c files (there aren't any).
Allows building with alternative C++ compilers.
Works for me with CXX=clang++

Original comment by stefano.rivera on 25 Jul 2011 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago
hg change doesn't seem to let me log in any more (2-step verification the 
problem?), thus the attached patch.

Original comment by stefano.rivera on 25 Jul 2011 at 7:11

GoogleCodeExporter commented 9 years ago
This issue was closed by revision bbf8cedc561c.

Original comment by rsc@swtch.com on 23 Oct 2011 at 9:48