Basis.pm
Go to the documentation of this file.
1 # ============================================================================
2 # Copyright (c) 2011-2012 University of Pennsylvania
3 # Copyright (c) 2013-2016 Andreas Schuh
4 # All rights reserved.
5 #
6 # See COPYING file for license information or visit
7 # https://cmake-basis.github.io/download.html#license
8 # ============================================================================
9 
10 ##############################################################################
11 # @file Basis.pm
12 # @brief BASIS utilities of BASIS package.
13 #
14 # @note The Basis.pm module was automatically created by BASIS from the
15 # template file Basis.pm.in which is part of BASIS.
16 #
17 # This module imports the modules of the BASIS utilities for Perl and exports
18 # these utility functions as part of its own package scope next to the functions
19 # defined by this module itself. Hence, it is sufficient to only use this module.
20 #
21 # @ingroup BasisPerlUtilities
22 ##############################################################################
23 
24 use strict;
25 use warnings;
26 
27 package BASIS::Basis;
28 {
29  $BASIS::Basis::VERSION = 3.03_00;
30 }
31 
32 
33 ## @addtogroup BasisPerlUtilities
34 # @{
35 
36 
37 # ============================================================================
38 # exports
39 # ============================================================================
40 
41 use BASIS::Sub::Exporter -setup => {
42  exports => [
43  qw(print_contact print_version targetuid istarget exepath exename
44  exedir tostring qsplit execute)],
45  groups => {
46  default => [qw(print_contact print_version exepath exename exedir execute)],
47  everything => [qw(print_contact print_version targetuid istarget
48  exepath exename exedir tostring qsplit execute)]
49  }
50 };
51 
52 # ============================================================================
53 # configuration
54 # ============================================================================
55 
56 ## @brief Project name.
57 use constant PROJECT => 'BASIS';
58 ## @brief Project release.
59 use constant RELEASE => 'v3.3 (71f5085)';
60 ## @brief Default copyright of executables.
61 use constant COPYRIGHT => '2011-12 University of Pennsylvania, 2013-14 Carnegie Mellon University, 2013-16 Andreas Schuh';
62 ## @brief Default license of executables.
63 use constant LICENSE => 'See https://cmake-basis.github.io/download.html#license or COPYING file.';
64 ## @brief Default contact to use for help output of executables.
65 use constant CONTACT => 'andreas.schuh.84@gmail.com';
66 
67 # ============================================================================
68 # custom utilities
69 # ============================================================================
70 
71 my ($_TARGET_PREFIX, %_EXECUTABLE_TARGETS, $_TARGETS_BASE);
72 
73 BEGIN {
74  use File::Basename qw(dirname);
75 
76  $_TARGET_PREFIX = 'basis';
77 
78  %_EXECUTABLE_TARGETS = (
79  'basis.basisproject' => '../../../bin/basisproject',
80  'basis.testdriver' => '../../testdriver',
81  'basis.basistest' => '../../../bin/basistest',
82  'basis.basistest-master' => '../../basistest-master',
83  'basis.basistest-slave' => '../../basistest-slave',
84  'basis.basistest-cron' => '../../basistest-cron',
85  'basis.basistest-svn' => '../../basistest-svn',
86  'basis.doxyfilter' => '../../doxyfilter',
87  'basis.doxyfilter-perl' => '../../doxyfilter-perl',
88  'basis.dummy_command' => '../../../bin/dummy_command',
89  'basis.test_future_statements' => '',
90  'basis.test_matlabtools' => '',
91  'basis.test_basisproject' => '',
92  'basis.test_os' => '../../../bin/test_os',
93  'basis.test_path' => '../../../bin/test_path',
94  'basis.test_subprocess' => '../../../bin/test_subprocess',
95  'basis.test_core' => '',
96  'basis.test_shutilities' => '',
97  'basis.test_shtap' => '',
98  'basis.parseargs' => '../../../bin/parseargs',
99  'basis.test_utilities' => ''
100  );
101 
102  $_TARGETS_BASE = dirname(__FILE__);
103 }
104 
105 use BASIS::Utilities qw(tostring qsplit),
106  print_contact => { contact => CONTACT },
107  print_version => { project => PROJECT, version => RELEASE, copyright => COPYRIGHT, license => LICENSE },
108  targetuid => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
109  istarget => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
110  exepath => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
111  exename => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
112  exedir => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
113  execute => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE };
114 
115 
116 ## @}
117 # end of Doxygen group
118 
119 
120 1; # indicate success of module loading