View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013932CMakeCMakepublic2013-02-18 11:572013-07-01 09:38
ReporterNeil Carlson 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformIntel x86_64OSLinuxOS VersionFedora 17
Product VersionCMake 2.8.10.2 
Target VersionCMake 2.8.11Fixed in VersionCMake 2.8.11 
Summary0013932: Invalid PIC option being passed to the NAG Fortran compiler
DescriptionWhen 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 ReproduceHere'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 InformationAdding 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.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0032336)
Brad King (manager)
2013-02-18 13:14

Yes, that is the correct fix. Patch applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c26ac223 [^]

Thanks!
(0033429)
Robert Maynard (manager)
2013-07-01 09:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-02-18 11:57 Neil Carlson New Issue
2013-02-18 13:14 Brad King Note Added: 0032336
2013-02-18 13:14 Brad King Assigned To => Brad King
2013-02-18 13:14 Brad King Status new => resolved
2013-02-18 13:14 Brad King Resolution open => fixed
2013-02-18 13:14 Brad King Fixed in Version => CMake 2.8.11
2013-02-18 13:14 Brad King Target Version => CMake 2.8.11
2013-07-01 09:38 Robert Maynard Note Added: 0033429
2013-07-01 09:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team