[MacPorts] #53201: cmake, "compile features" and macports-clang

MacPorts noreply at macports.org
Wed May 24 09:54:13 UTC 2017


#53201: cmake, "compile features" and macports-clang
---------------------+-----------------
  Reporter:  RJVB    |      Owner:
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  cmake   |
---------------------+-----------------

Comment (by mojca):

 Replying to [comment:6 RJVB]:
 >
 > Bugs are reported on their mailing list, and I'm not yet seeing an
 archived version. The discussion thread subject is `COMPILE_FEATURES, Mac
 and non-Apple clang versions`.

 I now found an archived version:
 * http://public.kitware.com/pipermail/cmake-
 developers/2017-January/029720.html
 Maybe there's a lag in updating their mail archive.

 These are the relevant files:
 {{{
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-ASM.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-C-FeatureTests.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-C.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-CXX-
 FeatureTests.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-CXX.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/AppleClang-
 DetermineCompiler.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-ASM.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-C-FeatureTests.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-C.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-CXX-FeatureTests.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-CXX-
 TestableFeatures.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-CXX.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-DetermineCompiler.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang-
 DetermineCompilerInternal.cmake
 /opt/local/share/cmake-3.8/Modules/Compiler/Clang.cmake
 /opt/local/share/cmake-3.8/Modules/Platform/Darwin-AppleClang-C.cmake
 /opt/local/share/cmake-3.8/Modules/Platform/Darwin-AppleClang-CXX.cmake
 /opt/local/share/cmake-3.8/Modules/Platform/Darwin-Clang-C.cmake
 /opt/local/share/cmake-3.8/Modules/Platform/Darwin-Clang-CXX.cmake
 /opt/local/share/cmake-3.8/Modules/Platform/Darwin-Clang.cmake
 }}}
 My suggestion would be to come up with a set of **proper** patches for
 these files and submit the patches upstream.

 The problematic part seems to be
 {{{
 #!cmake
 cmake_policy(GET CMP0025 appleClangPolicy)
 if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW))
   return()
 endif()
 }}}
 and I guess that's because of Apple's confusing numbering. I guess all we
 need to do is distinguish between a stock and Apple clang and simply do
 the same thing as on any other Unix system when a stock Clang compiler is
 chosen.

--
Ticket URL: <https://trac.macports.org/ticket/53201#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list