View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008408CMakeCMakepublic2009-01-20 11:102009-02-24 15:40
ReporterMatthew West 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008408: /usr/include should not be omitted from include_directories() with gfortran
Descriptiongfortran does not automatically search /usr/include for .mod module files, but trying to add /usr/include to the include path with include_directories(/usr/include) does not do so because it is automatically excluded.

At the moment I'm doing an unconditional add_definitions(-I/usr/include) but this is a bit of a hack.

For a discussion of the issue from the gfortran side see:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35707 [^]

The code that should work is:

FIND_PATH(NETCDF_INCLUDE_DIR netcdf.mod
  DOC "NetCDF include directory"
  PATHS
  /usr/include
  /usr/include/netcdf-3)
INCLUDE_DIRECTORIES(${NETCDF_INCLUDE_DIR})

which works fine if netcdf.mod is installed in /usr/include/netcdf-3 but fails if netcdf.mod is installed in /usr/include (because gfortran needs the explicit -I/usr/include).
TagsNo tags attached.
Attached Files

 Relationships
child of 0008598closedBrad King implicit include directory suppression may be outdated 

  Notes
(0015342)
Brad King (manager)
2009-02-24 15:40

I've removed include dir suppression outright. See issue 0008598.

 Issue History
Date Modified Username Field Change
2009-01-20 11:10 Matthew West New Issue
2009-02-24 10:19 Bill Hoffman Status new => assigned
2009-02-24 10:19 Bill Hoffman Assigned To => Brad King
2009-02-24 15:24 Brad King Relationship added child of 0008598
2009-02-24 15:40 Brad King Note Added: 0015342
2009-02-24 15:40 Brad King Status assigned => closed
2009-02-24 15:40 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team