Advertisement
justin_hanekom

Ada GPRbuild

Nov 30th, 2018
1,614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 2.76 KB | None | 0 0
  1. --  File: fizzbuzz.gpr
  2. --  Copyright (c) 2018 Justin Hanekom <justin_hanekom@yahoo.com>
  3.  
  4. --  Permission is hereby granted, free of charge, to any person obtaining a
  5. --  copy of this software and associated documentation files (the "Software"),
  6. --  to deal in the Software without restriction, including without limitation
  7. --  the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. --  and/or sell copies of the Software, and to permit persons to whom the
  9. --  Software is furnished to do so, subject to the following conditions:
  10. --
  11. --  The above copyright notice and this permission notice shall be included in
  12. --  all copies or substantial portions of the Software.
  13. --
  14. --  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. --  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. --  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. --  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. --  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. --  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. --  DEALINGS IN THE SOFTWARE.
  21.  
  22. project FizzBuzz is
  23.  
  24.    for Languages use ("Ada");
  25.    for Main use ("main.adb");
  26.    for Source_Dirs use ("src/main/ada");
  27.    for Exec_Dir use "target";
  28.    for Object_Dir use "target/main/ada";
  29.  
  30.    package Compiler is
  31.       for Default_Switches ("ada") use
  32.         ("-C",              --  use mapping file
  33.         "-E",               --  store call stack exceptions
  34.         "-fstack-check",    --  perform stack checks
  35.         "-funroll-loops",   --  perform loop unrolling optimization
  36.         "-gnat2012",        --  enforce Ada 2012 restrictions
  37.         "-gnata",           --  assertions enabled
  38.         "-gnatF",           --  external names are folded to all uppercase
  39.         "-gnatn",           --  activate inlining for subroutines with pragma inline
  40.         "-gnatwae",         --  turn on most warnings and treat warnings as errors
  41.         "-gnatwl",          --  activate warnings for missing elaboration pragmas
  42.         "-Isrc/main/ada",   --  specify include directory
  43.         "-O2",              --  control optimization level
  44.         "-s",               --  recompile if switches changed
  45.         "-gnaty-o",         --  do not check order of subprogram bodies
  46.         "-gnatyx3abcefhiIklL5M78nprStux"    --  enable built-in style checks
  47.         );
  48.    end Compiler;
  49.  
  50.    package Binder is
  51.       for Default_Switches ("ada") use
  52.         ("-E",              --  store call stack exceptions
  53.         "-shared"           --  link with shared Ada library
  54.         );
  55.    end Binder;
  56.  
  57.    package Builder is
  58.       for Executable ("main.adb") use "fizzbuzz";
  59.    end Builder;
  60. end FizzBuzz;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement