grasp_compilation_information.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 CNRS & Universite Lille 1. All rights reserved.
3  *
4  * Licensed under the GRASP Open Source License V1.0 (see LICENSE file)
5  */
6 
7 /*
8  * File: grasp_compilation_information.h
9  * Author: fuertes
10  *
11  * Created on June 14, 2014, 9:46 PM
12  */
13 
14 #ifndef GRASP_COMPILATION_INFORMATION_H
15 #define GRASP_COMPILATION_INFORMATION_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <stdio.h>
22 #include <stdbool.h>
23 
24 #ifndef GRASP_VERSION
25 #define GRASP_VERSION "[undefined]"
26 #endif
27 
28 #ifndef GRASP_BRANCH_NAME
29 #define GRASP_BRANCH_NAME "[undefined]"
30 #endif
31 
32 #ifndef GRASP_COMMIT_REF
33 #define GRASP_COMMIT_REF "[undefined]"
34 #endif
35 
36 #ifndef GRASP_COMMIT_DATE
37 #define GRASP_COMMIT_DATE "[undefined]"
38 #endif
39 
40 #ifndef GRASP_COMPILATION_DATE
41 #define GRASP_COMPILATION_DATE "[undefined]"
42 #endif
43 
44 #ifndef GRASP_CONSTANTS_SET
45 #define GRASP_CONSTANTS_SET "[undefined]"
46 #endif
47 
48 #ifndef RESOURCES_PREFIX
49 #define RESOURCES_PREFIX "/usr/local/share/grasp/"
50 #endif
51 
52 #ifndef GRASP_CC_VERSION
53 #define GRASP_CC_VERSION "[undefined]"
54 #endif
55 
56 #ifndef GRASP_FC_VERSION
57 #define GRASP_FC_VERSION "[undefined]"
58 #endif
59 
60 #ifndef GRASP_BUILD_TYPE
61 #define GRASP_BUILD_TYPE "[undefined]"
62 #endif
63 
64 #ifndef GRASP_BUILD_SYSTEM
65 #define GRASP_BUILD_SYSTEM "[undefined]"
66 #endif
67 
68 #ifndef GRASP_SPARSE_SOLVER
69 #define GRASP_SPARSE_SOLVER "[undefined]"
70 #endif
71 
72 #ifndef GRASP_INPUT_DRIVERS
73 #define GRASP_INPUT_DRIVERS "no_input_drivers"
74 #endif
75 
76 #ifndef GRASP_INPUT_TRANSFORMERS
77 #define GRASP_INPUT_TRANSFORMERS "no_input_transformers"
78 #endif
79 
80 #ifndef GRASP_OUTPUT_SEGMENT_FUNCTIONS
81 #define GRASP_OUTPUT_SEGMENT_FUNCTIONS "no_output_segment_functions"
82 #endif
83 
84 #ifndef GRASP_OUTPUT_TILE_FUNCTIONS
85 #define GRASP_OUTPUT_TILE_FUNCTIONS "no_output_tile_functions"
86 #endif
87 
88 #ifndef GRASP_OUTPUT_CURRENT_FUNCTIONS
89 #define GRASP_OUTPUT_CURRENT_FUNCTIONS "no_output_current_functions"
90 #endif
91 
92 #ifndef GRASP_INPUT_DRIVER_VERSIONS
93 #define GRASP_INPUT_DRIVER_VERSIONS "no-defined"
94 #endif
95 
96 #ifndef GRASP_INPUT_TRANSFORMER_VERSIONS
97 #define GRASP_INPUT_TRANSFORMER_VERSIONS "no-defined"
98 #endif
99 
100 #ifndef GRASP_OUTPUT_SEGMENT_FUNCTION_VERSIONS
101 #define GRASP_OUTPUT_SEGMENT_FUNCTION_VERSIONS "no-defined"
102 #endif
103 
104 #ifndef GRASP_OUTPUT_TILE_FUNCTION_VERSIONS
105 #define GRASP_OUTPUT_TILE_FUNCTION_VERSIONS "no-defined"
106 #endif
107 
108 #ifndef GRASP_OUTPUT_CURRENT_FUNCTION_VERSIONS
109 #define GRASP_OUTPUT_CURRENT_FUNCTION_VERSIONS "no-defined"
110 #endif
111 
112 #ifndef GRASP_MODELS
113 #define GRASP_MODELS "no"
114 #endif
115 
116 #ifndef GRASP_PYTHON
117 #define GRASP_PYTHON "no"
118 #endif
119 
120 #ifdef USE_MPI
121 #define GRASP_MPI "yes"
122 #else
123 #define GRASP_MPI "no"
124 #endif
125 
126 // Function that return a char* with compilation information
128 
129 // Function that print in screen compilation information. f is output stream. argv0 is argv[0] in main function of application
131 
132 // return unixtimestamp of compilation time
134 
135 // This function will print GRASP code version information in a line
136 void grasp_version_print(FILE *f);
137 
138 // Return GRASP_INPUT_DRIVERS allocated
140 
141 // Return GRASP_INPUT_TRANSFORMERS allocated
143 
144 // Return GRASP_OUTPUT_SEGMENT_FUNCTIONS allocated
146 
147 // Return GRASP_OUTPUT_TILE_FUNCTIONS allocated
149 
150 // Return GRASP_OUTPUT_CURRENT_FUNCTIONS allocated
152 
153 // Return GRASP_INPUT_DRIVERS with version information allocated
155 
156 // Return version of a specific driver allocated
158 
159 // Return GRASP_INPUT_TRANSFORMERS with version information allocated
161 
162 // Return version of a specific transformer allocated
163 char *grasp_compilation_information_input_transformers_version(const char *transformer);
164 
165 // Return GRASP_OUTPUT_SEGMENT_FUNCTIONS with version information allocated
167 
168 // Return version of a specific segment function allocated
169 char *grasp_compilation_information_output_segment_functions_version(const char *segment_function);
170 
171 // Return GRASP_OUTPUT_TILE_FUNCTIONS with version information allocated
173 
174 // Return version of a specific tile function allocated
175 char *grasp_compilation_information_output_tile_functions_version(const char *tile_function);
176 
177 // Return GRASP_OUTPUT_CURRENT_FUNCTIONS with version information allocated
179 
180 // Return version of a specific current function allocated
181 char *grasp_compilation_information_output_current_functions_version(const char *current_function);
182 
183 // Return GRASP_VERSION allocated
185 
186 // Return an allocated string with GRASP_VERSION or commit name if GRASP_VERSION is 'undefined'
188 
189 // Return GRASP_BRANCH_NAME allocated
191 
192 // Return GRASP_COMMIT_REF allocated
194 
195 // Return GRASP_CONSTANTS_SET allocated
197 
198 // Return if GRASP_MODELS module is present or not
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* GRASP_COMPILATION_INFORMATION_H */
206 
char * grasp_compilation_information_input_drivers_versioned()
Definition: grasp_compilation_information.c:227
time_t get_compilation_timestamp()
Definition: grasp_compilation_information.c:91
char * grasp_compilation_information_input_transformers()
Definition: grasp_compilation_information.c:135
char * grasp_compilation_information_output_current_functions_version(const char *current_function)
Definition: grasp_compilation_information.c:377
char * grasp_compilation_information_input_drivers_version(const char *driver)
Definition: grasp_compilation_information.c:233
char * grasp_compilation_information_output_tile_functions_version(const char *tile_function)
Definition: grasp_compilation_information.c:341
char * grasp_compilation_information_branch_name()
Definition: grasp_compilation_information.c:431
char * grasp_compilation_information_commit_ref()
Definition: grasp_compilation_information.c:442
char * grasp_compilation_information_version_named()
Definition: grasp_compilation_information.c:418
char * grasp_compilation_information_output_tile_functions()
Definition: grasp_compilation_information.c:156
char * grasp_compilation_information_output_segment_functions_version(const char *segment_function)
Definition: grasp_compilation_information.c:305
char * grasp_compilation_information_input_transformers_versioned()
Definition: grasp_compilation_information.c:263
char * grasp_compilation_information_output_tile_functions_versioned()
Definition: grasp_compilation_information.c:335
char * grasp_compilation_information_output_segment_functions()
Definition: grasp_compilation_information.c:145
void grasp_version_print(FILE *f)
Definition: grasp_compilation_information.c:116
char * grasp_compilation_information_input_drivers()
Definition: grasp_compilation_information.c:124
char * grasp_compilation_information_input_transformers_version(const char *transformer)
Definition: grasp_compilation_information.c:269
char * grasp_compilation_information_version()
Definition: grasp_compilation_information.c:407
char * grasp_compilation_information_str()
Definition: grasp_compilation_information.c:19
char * grasp_compilation_information_output_segment_functions_versioned()
Definition: grasp_compilation_information.c:299
bool grasp_compilation_information_models_present()
Definition: grasp_compilation_information.c:464
char * grasp_compilation_information_output_current_functions_versioned()
Definition: grasp_compilation_information.c:371
void grasp_compilation_information_print(FILE *f)
Definition: grasp_compilation_information.c:110
char * grasp_compilation_information_constants_set()
Definition: grasp_compilation_information.c:453
char * grasp_compilation_information_output_current_functions()
Definition: grasp_compilation_information.c:167