File: cmake_workaround.f

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (34 lines) | stat: -rw-r--r-- 1,851 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
c     This is now simply a file configured by CMake into plplot.mod.proxy
c     in the top-level build tree.  It turns out that any file with any
c     contents with that name is all that is required to work around the
c     CMake 2.4.3 bug described below.  So this file is no longer actually
c     compiled. Alan W. Irwin 2006-08-17.

c     This is a dummy fortran file needed to work around a bug in the
c     current (2.4.2) cmake code when compiling the fortran examples 
c     in the build tree. Once cmake is fixed this file and all
c     references to it should be removed.
c     The dependency checking code does not handle external modules 
c     correctly, even though they are correctly found when compiling.
c     To work round this we need to fool cmake into thinking that there
c     is a plplot module_ generated by the examples, but we don't
c     actually want such a module_ or it would clash with the real plplot
c     module_ generated in bindings/f95. To do this we use_ another
c     bug in cmake, namely that it doesn't handle fortran fixed form 
c     source code correctly. When scanning for included modules it
c     checks comments as well as the code. We can use_ this to fool cmake
c     without affecting compilation at all. This is also why the comments
c     contain a _ after certain fortran keywords - we don't want them to 
c     be picked up by cmake.
c     This is ugly - I know. It _only_ affects the building of the
c     examples in the build tree when testing is enabled. It does not
c     appear in the installed tree at all. Let's hope we can find a 
c     proper fix for cmake.
c     Andrew Ross 30/07/2006.

c     Following two lines are to fool cmake into handling the dependecy 
c     correctly for plplot.
c      module plplot
c      end module plplot
      subroutine dummy
      end subroutine dummy