Opened 8 years ago
Last modified 3 years ago
#53615 assigned defect
cmake : ignore policy CMP0025
Reported by: | RJVB (René Bertin) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | cooljeanius (Eric Gallager) |
Port: | cmake |
Description
CMake has a policy (number 25) under which it considers that only Apple's clang can provide information on the features it supports. Depending on how the CMake file is configured this can lead to the following vague error (printed *after* the whole configure process has been completed), when using a clang version from MacPorts:
-- Configuring done CMake Error in CMakeLists.txt: No known features for CXX compiler "Clang" version 3.9.0.
There are ways around this by patching the CMake file, and I have seen some limited success in adding a default cmake argument (-DCMAKE_POLICY_DEFAULT_CMP0025=NEW
) but ultimately this depends on a few rather silly checks that IMHO could just as well be disabled at the source. The attached patch does that.
NB: the CMake files affected by this aren't erroneous, in my opinion CMake is wrong in handling AppleClang differently
Attachments (1)
Change History (7)
Changed 8 years ago by RJVB (René Bertin)
Attachment: | patch-Modules-IgnorePolicy25.diff added |
---|
comment:1 Changed 8 years ago by mf2k (Frank Schima)
Cc: | michaelld removed |
---|---|
Owner: | set to michaelld |
Status: | new → assigned |
comment:2 Changed 4 years ago by michaelld (Michael Dickens)
comment:4 Changed 3 years ago by cooljeanius (Eric Gallager)
comment:5 Changed 3 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
comment:6 Changed 3 years ago by RJVB (René Bertin)
Yes, it seems they could (into this one as it appears to be the more generic of the two).
Is this still an issue for CMake 3.18.0?