[CMake] FindMPI & policy CMP0004

Andreas Naumann Andreas-Naumann at gmx.net
Mon Mar 12 03:15:50 EDT 2018


Thank you for the hint, and I run in a similiar problem. Building from 
scratch solved the issue.

Sorry for the noise.

Am 11.03.2018 um 23:07 schrieb Craig Scott:
> 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 here 
> <https://gitlab.kitware.com/cmake/cmake/issues/11881> where someone 
> else had a situation that sounds similar to yours.
>
>
> On Mon, Mar 12, 2018 at 7:16 AM, Andreas Naumann 
> <Andreas-Naumann at gmx.net <mailto:Andreas-Naumann at gmx.net>> wrote:
>
>     Dear all,
>
>     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?
>
>     Exactly the same error, together with a patch, is described in the
>     bugtracker https://public.kitware.com/Bug/view.php?id=11881
>     <https://public.kitware.com/Bug/view.php?id=11881>
>
>     I cannot reproduce the error easiliy. On my home system, it works.
>     But on the hpc system, mpicc -showme:link returns
>     -L<MPIDIR>/lib -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt
>     -lnsl -lutil -lm -ldl
>
>     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.
>     Can somebody confirm this finding?
>
>     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.
>
>     What is the preferred way to resolve such an issue, when the
>     policy setting is not allowed anymore?
>
>     Regards,
>     Andreas
>     -- 
>
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Please keep messages on-topic and check the CMake FAQ at:
>     http://www.cmake.org/Wiki/CMake_FAQ
>     <http://www.cmake.org/Wiki/CMake_FAQ>
>
>     Kitware offers various services to support the CMake community.
>     For more information on each offering, please visit:
>
>     CMake Support: http://cmake.org/cmake/help/support.html
>     <http://cmake.org/cmake/help/support.html>
>     CMake Consulting: http://cmake.org/cmake/help/consulting.html
>     <http://cmake.org/cmake/help/consulting.html>
>     CMake Training Courses: http://cmake.org/cmake/help/training.html
>     <http://cmake.org/cmake/help/training.html>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>     <http://www.kitware.com/opensource/opensource.html>
>
>     Follow this link to subscribe/unsubscribe:
>     https://cmake.org/mailman/listinfo/cmake
>     <https://cmake.org/mailman/listinfo/cmake>
>
>
>
>
> -- 
> Craig Scott
> Melbourne, Australia
> https://crascit.com



More information about the CMake mailing list