if(CMAKE_Fortran_COMPILER MATCHES "gfortran")
message (STATUS
"WARNING concerning spurious warning messages generated by the gfortran compiler.
The new Fortran binding is known to generate some ~50 \"marked
PRIVATE\" warning messages when building the plplotfortran target with the
gfortran Fortran compiler. A typical example of such a warning
message is
Warning: Symbol 'interface_plcont' at (1) is marked PRIVATE but has been given the binding label 'c_plcont'
It appears these warnings (which do not occur if using the ifort or
nagfor Fortran compilers) are due to a gfortran bug (see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111> and
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64861>), i.e., they
are spurious warnings concerning completely valid use of the
private attribute for interface blocks describing C routines.
There appear to be no known negative consequences of this gfortran
bug other than the spurious warnings themselves. Until this gfortran
bug is fixed, these ~50 \"marked PRIVATE\" warnings should just be
ignored for those using gfortran."
)
endif(CMAKE_Fortran_COMPILER MATCHES "gfortran")
# Set the include path
include_directories(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/lib/qsastime
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
## Build C part of Fortran bindings
if(WIN32_OR_CYGWIN)
# Set the flags for the C compiler. The C stubs need to have the
# correct case and calling convention for the Fortran compiler
IF(TARGET_FORTRAN MATCHES "IVF")
SET(DEFFILE "_ifort")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DIVF")
ELSEIF(TARGET_FORTRAN MATCHES "CVF")
SET(DEFFILE "")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DCVF")
ENDIF(TARGET_FORTRAN MATCHES "IVF")
endif(WIN32_OR_CYGWIN)