Advertisement
justin_hanekom

Ada test GPRbuild

Nov 30th, 2018
1,552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 3.33 KB | None | 0 0
  1. --  File: test_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 Test_FizzBuzz is
  23.  
  24.    for Languages use ("Ada");
  25.    for Main use ("test_runner.adb");
  26.    for Source_Dirs use ("src/test/ada");
  27.    for Exec_Dir use "target";
  28.    for Object_Dir use "target/test/ada";
  29.  
  30.    package Compiler is
  31.       for Default_Switches ("ada") use
  32.         ("-C",                  --  use mapping file
  33.         "-E",                   --  store call stack exceptions
  34.         "-gnat2012",            --  enforce Ada 2012 restrictions
  35.         "-gnata",               --  assertions enabled
  36.         "-gnatF",               --  external names are folded to all uppercase
  37.         "-gnatn",               --  activate inlining for subroutines with pragma inline
  38.         "-gnatwae",             --  turn on most warnings and treat warnings as errors
  39.         "-gnatwl",              --  activate warnings for missing elaboration pragmas
  40.         "-Isrc/main/ada",       --  specify include directories
  41.         "-Isrc/test/ada",
  42.         "-I/usr/include/aunit",
  43.         "-I/GNAT/2018/include/aunit",
  44.         "-L/usr/lib/aunit",     --  specify library directories
  45.         "-L/GNAT/2018/lib/aunit",
  46.         "-O2",                  --  control optimization level
  47.         "-s",                   --  recompile if switches changed
  48.         "-gnaty-o",             --  do not check order of subprogram bodies
  49.         "-gnatyx3abcefhiIklM78nprStux"    --  enable built-in style checks
  50.         );
  51.    end Compiler;
  52.  
  53.    package Binder is
  54.       for Default_Switches ("ada") use
  55.         ("-E",              --  store call stack exceptions
  56.         "-shared"           --  link with shared Ada library
  57.         );
  58.    end Binder;
  59.  
  60.    package Builder is
  61.       for Executable ("test_runner.adb") use "test_fizzbuzz";
  62.    end Builder;
  63.  
  64.    package Linker is
  65.         for Default_Switches ("ada") use
  66.         ("-g",            -- generate debugging information
  67.         "-I/usr/include/aunit",             --  specify include directories
  68.         "-I/GNAT/2018/include/aunit",
  69.         "-Isrc/main/ada",
  70.         "-L/usr/lib/aunit",                 --  specify library directories
  71.         "-L/GNAT/2018/lib/aunit",
  72.         "-launit"
  73.         );
  74.    end Linker;
  75. end Test_FizzBuzz;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement