File: ada.cmake

package info (click to toggle)
plplot 5.9.0-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 26,256 kB
  • ctags: 9,353
  • sloc: ansic: 64,079; xml: 22,799; cpp: 8,562; tcl: 8,314; perl: 4,872; python: 4,462; f90: 4,310; java: 4,090; sh: 1,481; makefile: 261; php: 102; fortran: 59; sed: 5
file content (53 lines) | stat: -rw-r--r-- 2,019 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# cmake/modules/ada.cmake
#
# Copyright (C) 2007 Alan W. Irwin
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# Module for determining Ada bindings configuration options

if(DEFAULT_NO_BINDINGS)
  option(ENABLE_ada "Enable Ada bindings" OFF)
else(DEFAULT_NO_BINDINGS)
  option(ENABLE_ada "Enable Ada bindings" OFF)
endif(DEFAULT_NO_BINDINGS)

if(ENABLE_ada)
  find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3)
  if(NOT GNAT_LIB)
    message(STATUS "WARNING: "
      "gnat library not found. Disabling ada bindings")
    set(ENABLE_ada OFF CACHE BOOL "Enable Ada bindings" FORCE)
  else(NOT GNAT_LIB)
    message(STATUS "FOUND gnat library ${GNAT_LIB}")
  endif(NOT GNAT_LIB)
endif(ENABLE_ada)

if(ENABLE_ada)
  enable_language(Ada)
endif(ENABLE_ada)



# New stuff by Jerry for source modifications for Ada 2007 or not Ada 2007.
option(HAVE_ADA_2007 "Ada 2007?" OFF)

if(HAVE_ADA_2007)
  set(Ada_Is_2007_With_and_Use_Numerics "    with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays;")
else(HAVE_ADA_2007)
  # Is there some way to put a line ending after the first semicolon in the quoted string? Not essential.
  set(Ada_Is_Not_2007_Vector_Matrix_Declarations "    type Real_Vector is array (Integer range <>) of Long_Float;    type Real_Matrix is array (Integer range <>, Integer range <>) of Long_Float;")
endif(HAVE_ADA_2007)