REGRESSION: 3.14.0-rc1 Fortran: no "-I/usr/include" on Ubuntu 18.04
I have noticed switching from CMake 3.13.4 to 3.14.0-rc1 (downloaded Linux binary from Kitware) that -I/usr/include
is no longer added at the build stage, making numerous Fortran programs that worked with 3.13.4 suddenly stop compiling with missing headers error from gfortran. This is when /usr/include
is explicitly specified with target_include_directories()
This is for system Gfortran 7 with Ubuntu system libraries.
NOTE: Switching back to CMake 3.13.4 (downloaded from Kitware Github release) fixes this issue, so it seems to be a Cmake 3.14.0-rc1 issue
also broken: Cmake-dev version 3.13.20190204-g9f527 I didn't try other dev versions.
Because it requires a Fortran library with headers in /usr/include, not so many libraries have that, but libnetcdff-dev
does, for example: https://github.com/scivision/ncar-glow
Libs that have Fortran headers deeper under /usr/include work. For example /usr/include/mylib/mylib.h works, but /usr/include/mylib.h does not work.