<div dir="ltr"><div>Ok, I just figured out why you probably can't reproduce the issue: you need to use clang as a compiler.<br></div><div>If you use `CXX=clang++-14 cmake [...]` as a configure command line you'll likely trigger the error.</div><div><br></div><div>And the required package providing OpenMP for clang must match the clang version used: if I install libomp-13-dev while using clang++-14 for example I'll still get the error.</div><div><br></div><div>With this additional info I get that the issue is triggered with a non-default setup, so I'm not sure how or even if it can be fixed correctly. Especially given that the proper dependency is heavily dependent on the clang version used/installed.</div><div>Given that understanding I'd be fine with leaving things as is. And maybe it's the upstream MathGL2Config.cmake that needs a rework to deal more easily with various setups.</div><div><br></div><div>Anyway, thanks for taking a look.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 31 août 2022 à 10:03, Sylvain Joubert <<a href="mailto:joubert.sy@gmail.com">joubert.sy@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>Here is the minimal CMakeLists.txt that reproduces the issue:</div><div><br></div><div>cmake_minimum_required(VERSION 3.22.0)<br>project(mgl_test LANGUAGES CXX)<br>find_package(MathGL2 REQUIRED)</div><div><br></div><div>If the packages libomp-dev and libomp-XX-dev that it drags (libomp-11-dev on stable, libomp-14-dev on my testing setup) are not installed I get the initial reported error.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 30 août 2022 à 22:03, Rafael Laboissière <<a href="mailto:rafael@debian.org" target="_blank">rafael@debian.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Control: tags -1 moreinfo<br>
<br>
* Sylvain Joubert <<a href="mailto:joubert.sy@gmail.com" target="_blank">joubert.sy@gmail.com</a>> [2022-03-02 11:17]:<br>
<br>
>  Package: libmgl-dev<br>
>  Version: 8.0.1-1<br>
>  Severity: normal<br>
><br>
> Dear Maintainer,<br>
><br>
> Trying to use libmgl-dev through find_package(MathGL2) in CMake I'm facing the <br>
> following error:<br>
><br>
>  CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230<br>
>  (message): Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)<br>
>  Call Stack (most recent call first):<br>
>  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594<br>
>  (_FPHSA_FAILURE_MESSAGE)<br>
>   /usr/share/cmake-3.22/Modules/FindOpenMP.cmake:544<br>
>  (find_package_handle_standard_args)<br>
>   /usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47<br>
>  (find_package)<br>
>   /usr/lib/cmake/mathgl2/MathGL2Config.cmake:22 (find_dependency)<br>
>  [...]<br>
><br>
> It appears the libmgl-dev package is missing a dependency on an OpenMP <br>
> related package. Installing libomp-dev fixes the issue though I'm not <br>
> sure this is the correct package to depend on.<br>
<br>
Thank you for the bug report.<br>
<br>
Could you please provide an example that trigger the bug? For <br>
inspiration, look at Bug #1004218 [1] or #1004219 [2].<br>
<br>
Best,<br>
<br>
Rafael Laboissière<br>
<br>
  [1] <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004218" rel="noreferrer" target="_blank">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004218</a><br>
  [2] <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004219" rel="noreferrer" target="_blank">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004219</a><br>
</blockquote></div>
</blockquote></div>