View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015684CMakeCMakepublic2015-08-05 07:332016-01-04 11:52
ReporterRaul Laasner 
Assigned ToBrad King 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSArch LinuxOS Version
Product VersionCMake 3.3 
Target VersionCMake 3.3.1Fixed in VersionCMake 3.3.1 
Summary0015684: CMAKE_Fortran_COMPILER_VERSION becomes unset after second configuring
DescriptionCMAKE_Fortran_COMPILER_VERSION contains the correct version after the first configuring (first run of cmake), but becomes undefined after the second configuring. Is this normal behavior?
Steps To ReproduceTry, e.g.,

  message("test 1 " ${CMAKE_C_COMPILER_VERSION})
  message("test 2 " ${CMAKE_Fortran_COMPILER_VERSION})

The first time it prints

  test 1 5.2.0
  test 2 5.2.0

in my system, but after the second run of cmake it prints

  test 1 5.2.0
  test 2
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039239)
Kelly Thompson (reporter)
2015-08-05 10:09

I can reproduce this behavior for the Makefile Generator on RHEL6:
- with gcc and gfortran 4.8.1
- with icc and ifort 15.0.3

A possible workaround is to add a set command immediately after the project command:

project( myCF90project Fortran C )
set( CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION} CACHE STRING "Fortran compiler version string" FORCE )
(0039240)
Brad King (manager)
2015-08-05 10:45

Fixed:

 Fortran: Store detected compiler version persistently
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0609182 [^]

I've queued this for merge to the 'release' branch for inclusion in 3.3.1.
(0040106)
Robert Maynard (manager)
2016-01-04 11:52

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

 Issue History
Date Modified Username Field Change
2015-08-05 07:33 Raul Laasner New Issue
2015-08-05 10:09 Kelly Thompson Note Added: 0039239
2015-08-05 10:42 Brad King Assigned To => Brad King
2015-08-05 10:42 Brad King Status new => assigned
2015-08-05 10:42 Brad King Target Version => CMake 3.3.1
2015-08-05 10:45 Brad King Note Added: 0039240
2015-08-05 10:45 Brad King Status assigned => resolved
2015-08-05 10:45 Brad King Resolution open => fixed
2015-08-05 10:45 Brad King Fixed in Version => CMake 3.3.1
2016-01-04 11:52 Robert Maynard Note Added: 0040106
2016-01-04 11:52 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team