#52205 closed enhancement (wontfix)
CMake PortGroup: set compiler explicitly
Reported by: | RJVB (René Bertin) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | mojca (Mojca Miklavec) |
Port: | cmake |
Description
A recent CMake update changed the way the compiler choice is cached in the cmake build directory. Before it was possible to force a compiler change during an incremental build simply by removing CMakeCache.txt from build.dir; this would cause CMake to heed any changed changes in the CC and CXX env. variables.
To achieve the same thing it is now required to add something like the following to the PortGroup:
# force newer CMake versions to take a change in compiler choice into account # even if it is invoked in a build.dir that was configured before. if {${configure.cc} ne ""} { configure.args-append \ -DCMAKE_C_COMPILER=${configure.cc} } if {${configure.cxx} ne ""} { configure.args-append \ -DCMAKE_CXX_COMPILER=${configure.cxx} }
I'm attaching the complete diff of the stock cmake PortGroup vs. mine.
Attachments (1)
Change History (6)
Changed 8 years ago by RJVB (René Bertin)
Attachment: | cmake-1.0.diff added |
---|
comment:1 Changed 8 years ago by mf2k (Frank Schima)
Cc: | michaelld@… removed |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
comment:2 Changed 8 years ago by larryv (Lawrence Velázquez)
comment:3 Changed 8 years ago by RJVB (René Bertin)
Agreed they shouldn't ever be empty, but aren't they?
I have a recollection encountering a related variable (cflags?) that shouldn't be assumed to bet set. I can't seem to find the example right now :-/
comment:4 Changed 8 years ago by mojca (Mojca Miklavec)
Cc: | mojca added |
---|
comment:5 Changed 6 years ago by mf2k (Frank Schima)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We have moved on to the cmake 1.1 portgroup which already has all or most of these changes.
Might as well just set them unconditionally. I don’t think
configure.cc
andconfigure.cxx
should ever be empty.