The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13932 
====================================================================== 
Reported By:                Neil Carlson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13932
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-02-18 11:57 EST
Last Modified:              2013-02-18 11:57 EST
====================================================================== 
Summary:                    Invalid PIC option being passed to the NAG Fortran
compiler
Description: 
When building a shared library from Fortran source, the invalid option "-fPIC"
is being passed to the NAG Fortran compiler.  The correct option is "-PIC".  The
compiler version is 5.3.1.

Steps to Reproduce: 
Here's a sample CMakeLists.txt file.  myfun.F90 is file with arbitrary Fortran
source.

project(dll)
enable_language(Fortran)
add_library(mylib SHARED myfun.F90)


Additional Information: 
Adding the line
  set(CMAKE_Fortran_COMPILE_OPTIONS_PIC "-PIC")
to the end of Modules/Compiler/NAG-Fortran.cmake has the desired effect of
getting the proper option passed to the compiler, and everything apparently
works.  Whether this is the correct solution is another question.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-02-18 11:57 Neil Carlson   New Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to