[cmake-developers] [CMake 0013932]: Invalid PIC option being passed to the NAG Fortran compiler
Mantis Bug Tracker
mantis at public.kitware.com
Mon Feb 18 11:57:40 EST 2013
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
======================================================================
More information about the cmake-developers
mailing list