[cmake-developers] patch that adds -KPIC flag to SunPro Fortran compiler

Brad King brad.king at kitware.com
Fri Mar 20 13:08:18 EDT 2015


On 03/20/2015 04:23 AM, Steven Vancoillie wrote:
> I ran into a problem with SunPro Fortran compiler not being able to
> create a shared library since the -KPIC flag was missing. The patch
> that is attached fixes this. I didn't add a -KPIE as that doesn't
> exist for SunPro.

Applied, thanks:

 SunPro: Add position independent code flag for Fortran compiler
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3556fb1b

> Looking at other compiler configurations, it seems it might be better
> to have a SunPro.cmake module that combines flags that are independent
> of the language?

Yes.  This refactoring has simply not been done for this compiler.
If you want to work on it, please note that such a module is not
loaded automatically and must be included by the per-language
modules.  This pattern is visible in several other compiler modules.

Thanks,
-Brad



More information about the cmake-developers mailing list