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

Brad King brad.king at kitware.com
Mon Mar 23 10:33:29 EDT 2015


On 03/23/2015 04:37 AM, Steven Vancoillie wrote:
> I've included a candidate patch for this refactoring.

Thanks.  I split out the -KPIE removal:

 SunPro: Drop non-existent -KPIE flag
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=209c142f

Please rebase the revisions below on that.

> I also noticed the follow variables are set for C, CXX, and ASM:
> 
>   set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Bstatic")
>   set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Bdynamic")
> 
> I could add these for Fortran as well and move it also to the
> macro in SunPro.cmake. However, since this only seems to be there
> for SunPro, I wondered if these are used at all? These options are
> just passed to ld, so they are not sun-specific.

They are set for other compilers over in the Modules/Platform
directory.  We should preserve them as-is.  This patch should
be pure refactoring and make no functional changes.

The current patch does not account for differences in the
flags for each language:

* The _VERBOSE_FLAG is -v for most languages and -# for ASM.
* The _CREATE_PREPROCESSED_SOURCE rule for Fortran uses -F
  instead of -E.

Please revise the patch accordingly and check that the values
set after refactoring match those from before.  It is okay for
flags that are not shared by all languages to be set as they
are now or overridden after the macro call.

Thanks,
-Brad



More information about the cmake-developers mailing list