[CMake] FindZLIB doesn't work for PGI compiler

李 三乎 lisanhu2014 at hotmail.com
Tue Jul 23 01:20:52 EDT 2019


[https://tr.cloudmagic.com/h/v6/emailtag/tag/2.0/1563859234/288db9ab62ba963e3c33af4ebd3cc1bc/11/be623dafddc53423015ac812773b3c39/19c8011ecf80ea93f8a632d2fbd6f857/b453bc4819eacec2a20aaea0348ea875/newton.gif]
Dear CMake Community,

I’m here to report an error occurred when using PGI compiler. The readme for CMake asks me to ask question first in the mailing list, and here I am.

I’ve installed zlib1g-dev to my system, but CMake cannot find the zlib library for me. Then I tested it on a singularity ubuntu image ( similar to docker image ), with the following settings:

Ubuntu 19.04 amd64
PGI compiler community edition 19.04
CMake 3.14

CMakeLists.txt
```
project( none C CXX)
find_package( ZLIB REQUIRED )
```

If I use gcc or clang, it would create the makefile successfully, but when I use PGI compiler (pgcc, pgc++), it would report not able to find zlib. I think there might be some problem with the FindZLIB.cmake file but I couldn’t find out where is the problem.

Also, when using CLion configured with PGI compiler, there would be a lot of error messages ( although we can still build the project ), the error messages are really annoying. I feel it’s because the support for PGI compiler is still not perfect yet. Really wish CMake would like to add more support for this compiler.

Thank you very much for reading. Have a great day!

—
Sanhu Li

via Newton Mail<https://cloudmagic.com/k/d/mailapp?ct=dx&cv=10.0.18&pv=10.14.5&source=email_footer_2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190723/ca847d2c/attachment.html>


More information about the CMake mailing list