[MacPorts] #64040: vtk-m: upstream issues prevent using Xcode clang for +openmp variant

MacPorts noreply at macports.org
Tue Nov 23 07:18:58 UTC 2021


#64040: vtk-m: upstream issues prevent using Xcode clang for +openmp variant
--------------------------+------------------------
 Reporter:  chrstphrchvz  |      Owner:  reneeotten
     Type:  enhancement   |     Status:  assigned
 Priority:  Low           |  Milestone:
Component:  ports         |    Version:
 Keywords:                |       Port:  vtk-m
--------------------------+------------------------
 I am creating this ticket mainly to inform the port maintainer and anyone
 else who is curious. It may not require much (if any) action on MacPorts’
 end.

 I am interested in `compiler.openmp_version` allowing use of Xcode clang:
 [https://github.com/macports/macports-base/pull/247]. To get an idea of
 what issues a port may run into, I tried `vtk-m +openmp` as an example
 (after applying changes proposed in [https://github.com/macports/macports-
 ports/pull/13082] and [https://github.com/macports/macports-
 ports/pull/13093#issuecomment-976190084]).

 I believe I have identified a couple of issues in how VTK-m configures
 with OpenMP support. I would like to report and suggest fixes for them
 upstream.

 1. VTK-m does not use the `OpenMP_CXX_INCLUDE_DIRS` variable. This causes
 omp.h to not be found during build, even though the
 `OpenMP_CXX_INCLUDE_DIR` variable was specified (as a configure argument
 `-DOpenMP_CXX_INCLUDE_DIR=${prefix}/include/libomp`)

 2. VTK-m uses the space-separated `OpenMP_CXX_FLAGS` variable without
 converting it to a semicolon-separated list before appending it to the
 desired target property. This causes `-Xclang -fopenmp` to be treated as a
 single command line argument rather than two arguments, leading to
 warnings during build:
 {{{
 clang: warning: argument unused during compilation: '-Xclang -fopenmp'
 [-Wunused-command-line-argument]
 }}}

 I will attach a brief patch here containing possible fixes for these two
 issues.

-- 
Ticket URL: <https://trac.macports.org/ticket/64040>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list