<br><div class="gmail_quote">On Fri, May 16, 2008 at 5:59 PM, Brad King <<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
</div>CMake has not been taught about this compiler before. I've just<br>
committed some changes to support the Portland Group Fortran compiler in<br>
CMake CVS.</blockquote><div><br>Thanks Brad, with the HEAD version the project configures and builds fine. <br><br>However the executables are invalid. The reason, which took me a while to figure out, is the use of shared libraries, which as I mentioned, is not allowed in the Catamount system. The front-end wrappers unfortunately do not automatically detect a possible misuse and proceed with linkage to any shared library which happens to be present on the linker command line. It turns out that the culprit was find_package(BLAS) in my CMakeLists.txt which detects a shared library (correct one for the front ends, invalid for Catamount). <br>
How can I implement, locally at least, workarounds for such issues? (such as say, prohibit finding and building shared library targets all together for this particular system only)<br><br>On a further note, in case you may want to expand definitions for this compiler, here are my suggestiong for a set of PGI flags for various build types (from user's guide - <a href="http://www.pgroup.com/doc/pgiug.pdf">http://www.pgroup.com/doc/pgiug.pdf</a>)<br>
<br>Fortran_FLAGS = -Mpreprocess -Kieee -fpic<br>Fortran_FLAGS_DEBUG = -g -O0 -Mbounds<br>Fortran_FLAGS_MINSIZEREL = -O2 -s <br>Fortran_FLAGS_RELEASE = -fast -O3 -Mipa=fast<br>Fortran_FLAGS_RELWITHDEB = -O2 -gopt<br>
<br>
Also, one particular weirdness using this compiler, as compared to Intel or GNU compiler, is that CMake is somehow unable to copy the generated module files to ${CMAKE_Fortran_MODULE_DIRECTORY}. It might be possible that the related flag is incompatible. It should be -module <dir> for the PGI compiler, as opposed to -M<dir> for GNU. <br>
<br>
cheers,<br>Levent<br><br></div></div>-- <br>Server Levent Yilmaz<br>Mechanical Engineering<br>University of Pittsburgh