Re: [Plplot-devel] Patch for Intel Fotran 95 support

2007-03-22 Thread Arjen Markus
Jim Dishaw wrote:

Attached is a patch for fixing Fortran 95 support for Intel Fortran.
This patch applies changes that was previously applied to the f77
bindings.

On a related topic, to make the library more flexible on the Windows
platform, the /Zl option (no default library) should be specified
instead of /MD or /MDd.  The /Zl option cannot be applied globally
because it will break cmake (it will not be able to build a test
executable).  The /Zl option should be used when building the object
files in the library.

Also, if we specify the /Z7 option for C compiler and /nopdbfile for the
ifort compiler when building the debug version, the debugging
information will be embedded into the object files.  That will avoid
creating the pdb files and there will be one less file to muck around
with during install.

I've built two new windows/intel fortran binaries (for use with the
LIBCMTD.LIB and MSVCRTD.LIB libraries).  Depending on the interest, I
can build versions for use with other libraries.  This version should
correctly link with Intel Fortran projects that use the default calling
interface (/iface:default).  The files are located at
http://dishaw.org/plplot/
  

Hi Jim,

we will apply the patch asap, but could you explain a bit about the various
versions of the libraries you are able to build with the change in compiler
options? (Intel Fortran is relatively new to me - at work we are switching
to this compiler, but it comes with a bunch of new/different options and
a different IDE than the old and more familiar Compaq Visual Fortran
compiler and at the moment I have little experience with IVF).

Regards,

Arjen




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] Patch for Intel Fotran 95 support

2007-03-21 Thread Jim Dishaw
Attached is a patch for fixing Fortran 95 support for Intel Fortran.
This patch applies changes that was previously applied to the f77
bindings.

On a related topic, to make the library more flexible on the Windows
platform, the /Zl option (no default library) should be specified
instead of /MD or /MDd.  The /Zl option cannot be applied globally
because it will break cmake (it will not be able to build a test
executable).  The /Zl option should be used when building the object
files in the library.

Also, if we specify the /Z7 option for C compiler and /nopdbfile for the
ifort compiler when building the debug version, the debugging
information will be embedded into the object files.  That will avoid
creating the pdb files and there will be one less file to muck around
with during install.

I've built two new windows/intel fortran binaries (for use with the
LIBCMTD.LIB and MSVCRTD.LIB libraries).  Depending on the interest, I
can build versions for use with other libraries.  This version should
correctly link with Intel Fortran projects that use the default calling
interface (/iface:default).  The files are located at
http://dishaw.org/plplot/

Index: CMakeLists.txt
===
RCS file: /cvsroot/plplot/plplot/bindings/f95/CMakeLists.txt,v
retrieving revision 1.21
diff -c -r1.21 CMakeLists.txt
*** CMakeLists.txt	4 Feb 2007 23:26:46 -	1.21
--- CMakeLists.txt	22 Mar 2007 05:31:49 -
***
*** 44,49 
--- 44,59 
  set_source_files_properties(plflt.inc PROPERTIES GENERATED ON)
  
  ## Build C part of F95 bindings
+ if(WIN32)
+   # Set the flags for the C compiler. The C stubs need to have the
+   # correction case and calling convention for the Fortran compiler
+   IF(TARGET_FORTRAN MATCHES IVF)
+ SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} /DIVF)
+   ELSEIF(TARGET_FORTRAN MATCHES CVF)
+ SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} /DCVF)
+   ENDIF(TARGET_FORTRAN MATCHES IVF)
+ endif(WIN32)
+ 
  set(plplotf95c${LIB_TAG}_LIB_SRCS
  plstubs.h
  sc3d.c
Index: plstubs.h
===
RCS file: /cvsroot/plplot/plplot/bindings/f95/plstubs.h,v
retrieving revision 1.6
diff -c -r1.6 plstubs.h
*** plstubs.h	23 Oct 2006 19:56:05 -	1.6
--- plstubs.h	22 Mar 2007 05:31:50 -
***
*** 90,102 
  #endif
  #endif
  
! #ifdef WIN32/* MS-DOS based */
! #define STUB_LINKAGE STUB_WINFORTRAN
! #endif
! 
! #ifdef MSDOS/* MS-DOS based */
  #define STUB_LINKAGE STUB_FORTRAN
  #endif
  
  #ifndef STUB_LINKAGE			/* The default */
  #define STUB_LINKAGE STUB_LAU
--- 90,108 
  #endif
  #endif
  
! #ifdef WIN32/* Windows 32-bit */
! #ifdef IVF/* Intel Visual Fortran */
! #define STUB_LINKAGE STUB_U
! #elif defined(CVF)/* MSVC/CVF */
! #define STUB_LINKAGE STUB_U
! #elif defined(MSDOS)/* MS-DOS based */
  #define STUB_LINKAGE STUB_FORTRAN
+ #elif defined(_MSC_VER)
+ #define STUB_LINKAGE STUB_STDCALL
  #endif
+ #elif defined(MSDOS)/* MS-DOS based */
+ #define STUB_LINKAGE STUB_FORTRAN
+ #endif /* Windows 32-bit */
  
  #ifndef STUB_LINKAGE			/* The default */
  #define STUB_LINKAGE STUB_LAU
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel