<div dir="ltr">This could be a case of needing to clear out an old CMake cache. That problem you mentioned was supposed to have been fixed already. You can find the updated discussion of the Mantis issue you linked to in gitlab <a href="https://gitlab.kitware.com/cmake/cmake/issues/11881">here</a> where someone else had a situation that sounds similar to yours.<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 12, 2018 at 7:16 AM, Andreas Naumann <span dir="ltr"><<a href="mailto:Andreas-Naumann@gmx.net" target="_blank">Andreas-Naumann@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
recently, I got a problem with FindMPI on our HPC systems. With cmake 3.10.2, I get an error about policy CMP0004. And I cannot set it to OLD anymore. Is this intended?<br>
<br>
Exactly the same error, together with a patch, is described in the bugtracker <a href="https://public.kitware.com/Bug/view.php?id=11881" rel="noreferrer" target="_blank">https://public.kitware.com/Bug<wbr>/view.php?id=11881</a><br>
<br>
I cannot reproduce the error easiliy. On my home system, it works. But on the hpc system, mpicc -showme:link returns<br>
-L<MPIDIR>/lib -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil -lm -ldl<br>
<br>
so, we have exactly one -Wl,<something> part and libraries otherwise. It looks to me, that the patch from the bugtracker should avoid the problem.<br>
Can somebody confirm this finding?<br>
<br>
The problem gets even worse with newercmake versions. With cmake 3.9, I can set policy cmp0004 to OLD, so FindMPI remains usable. With newer cmake versions, ie. 3.10.2, the policy setting seems to get deprecated. So, the user won't get any way to use newer cmake with such a bug.<br>
<br>
What is the preferred way to resolve such an issue, when the policy setting is not allowed anymore?<br>
<br>
Regards,<br>
Andreas<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/list<wbr>info/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div></div>