#36975 closed enhancement (fixed)
PortGroup cmake: integration with muniversal portgroup
Reported by: | NicosPavlov | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | pixilla (Bradley Giesbrecht), ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description
In the present state, the cmake portgroup does not integrate well with the muniversal one, as it forces building multiple architectures together in case of +universal variant:
configure.universal_args-append \ -DCMAKE_OSX_ARCHITECTURES=\"[join ${configure.universal_archs} \;]\"
This code should be deactivated in case of muniversal portgroup to enable separate builds. Attached are patches in order to make it possible. The way may be naive as it requires adding a global variable to muniversal, but it works according to my tests.
My apologies if I cc'ed the wrong person, but I am not sure of who should be assigned in case of Portgroups.
Attachments (2)
Change History (8)
Changed 12 years ago by NicosPavlov
Attachment: | patch-cmake-1.0.diff added |
---|
Changed 12 years ago by NicosPavlov
Attachment: | patch-muniversal-1.0.diff added |
---|
comment:1 Changed 12 years ago by jmroot (Joshua Root)
comment:2 Changed 12 years ago by NicosPavlov
It indeed does not set it, but to my experience it does work. Other programs can build universal on top of it and link, for example. I assumed that without CMAKE_OSX_ARCHITECTURES, the build is falling back to -arch flag, which is properly set by muniversal.
However, as I said, I naively tried it, and saw that it appeared to work.
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Since we set CMAKE_OSX_ARCHITECTURES both for universal and non-universal builds now, it seems to me that we should continue to set it in all cases, since I don't know what the implications are of not doing so. Fixed in r99819.
Note that I didn't add a new global variable to the muniversal portgroup, but checked for the existence of an option it already defines.
comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
A further fix, to the muniversal portgroup, in r103445, to not add a --host
argument when using cmake.
Does this actually work? Doesn't it result in CMAKE_OSX_ARCHITECTURES not being set at all when using muniversal?