File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,13 @@ if(${MAXSCALE_VERSION} MATCHES "-stable")
162
162
endif ()
163
163
endif ()
164
164
165
+ # Copy cmake_flags, JENKINS_BUILD_TAG, source and value evironmental variables
166
+ # into cmake variables. These are used by the build system to store information
167
+ # about the packages being built.
168
+ set (MAXSCALE_SOURCE "$ENV{source} $ENV{value} " )
169
+ set (MAXSCALE_CMAKE_FLAGS "$ENV{cmake_flags} " )
170
+ set (MAXSCALE_JENKINS_BUILD_TAG "$ENV{BUILD_TAG} " )
171
+
165
172
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR} /server/include )
166
173
configure_file (${CMAKE_SOURCE_DIR} /server/include /version .h.in ${CMAKE_BINARY_DIR} /server/include /version .h @ONLY)
167
174
configure_file (${CMAKE_SOURCE_DIR} /server/include /gwdirs.h.in ${CMAKE_BINARY_DIR} /server/include /gwdirs.h @ONLY)
Original file line number Diff line number Diff line change @@ -1341,6 +1341,18 @@ int main(int argc, char **argv)
1341
1341
case 'V' :
1342
1342
rc = EXIT_SUCCESS ;
1343
1343
printf ("MaxScale %s - %s\n" , MAXSCALE_VERSION , maxscale_commit );
1344
+ if (strcmp (MAXSCALE_SOURCE , " " ) != 0 )
1345
+ {
1346
+ printf ("Source: %s\n" , MAXSCALE_SOURCE );
1347
+ }
1348
+ if (strcmp (MAXSCALE_CMAKE_FLAGS , "" ) != 0 )
1349
+ {
1350
+ printf ("CMake flags: %s\n" , MAXSCALE_CMAKE_FLAGS );
1351
+ }
1352
+ if (strcmp (MAXSCALE_JENKINS_BUILD_TAG , "" ) != 0 )
1353
+ {
1354
+ printf ("Jenkins build: %s\n" , MAXSCALE_JENKINS_BUILD_TAG );
1355
+ }
1344
1356
goto return_main ;
1345
1357
1346
1358
case 'l' :
Original file line number Diff line number Diff line change 1
1
#define MAXSCALE_VERSION "@MAXSCALE_VERSION@"
2
2
#define MAXSCALE_COMMIT "@MAXSCALE_COMMIT@"
3
+ #define MAXSCALE_SOURCE "@MAXSCALE_SOURCE@"
4
+ #define MAXSCALE_CMAKE_FLAGS "@MAXSCALE_CMAKE_FLAGS@"
5
+ #define MAXSCALE_JENKINS_BUILD_TAG "@MAXSCALE_JENKINS_BUILD_TAG@"
You can’t perform that action at this time.
0 commit comments