[CXX-675] Support for environment variables CC, CXX, CFLAGS, CXXFLAGS, LD, CPP, ... Created: 24/Sep/15 Updated: 23/Feb/16 Resolved: 23/Feb/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Karolin Varner | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The standard environment variables should be used when compiling; at the moment those variables are disregarded and one needs to specify -DCMAKE_CXX_COMPILER explicitly |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 23/Feb/16 ] |
|
The CMake way is the correct way to handle this. |
| Comment by Githook User [ 24/Sep/15 ] |
|
Author: {u'username': u'koraa', u'name': u'Karolin Varner', u'email': u'karo@cupdev.net'}Message: |
| Comment by Andrew Morrow (Inactive) [ 24/Sep/15 ] |
|
We will consider it, but for now I don't think we want to change this. Perhaps later we can add a build flag that will allow opt-in to populating the CMake variables from the analogous shell variables, but given that there is an easy workaround (cmake -DCMAKE_C_COMPILER=$CC) I don't think this is a priority for us. |
| Comment by Karolin Varner [ 24/Sep/15 ] |
|
I am aware that it is pretty common for cmake projects to ignore these, which in my opinion is pretty terrible. Neither are those variables autoconf specific. They provide a generic non-tool-specific way of setting those variables and they have been around for a long time. The argument for not supporting them normally is around the lines, that one wants a clean, reproducible build on all systems. |
| Comment by Andrew Morrow (Inactive) [ 24/Sep/15 ] |
|
karo - I think that is actually pretty standard for CMake based projects. You are expected to set the CMake variables on the command line, not the autoconf style ones. |