|
沙发
楼主 |
发表于 2018-4-18 11:03:09
|
只看该作者
本帖最后由 wdy 于 2018-4-18 11:05 编辑
下面这段是从Plplot源目录bindings\fortran\Cmakelists.txt文件中摘录的:
if(ENABLE_fortran)
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)
这段代码似乎是针对gfortran编译器的,接下来提到的ivf也是包含在if(win32)条件语句中,是不是只能用32位的编译器?下载的Plplot版本是最新的5.13.0,不应该是这样的啊~~!
|
|