NCBI C++ ToolKit
grid_app_version_info.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: grid_app_version_info.hpp 89042 2020-02-14 14:59:07Z sadyrovr $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Dmitry Kazimirov
27  *
28  * File Description:
29  * Declaration of the application version info string.
30  *
31  */
32 
33 
34 #ifndef CONNECT_SERVICES__APP_VERSION_INFO_HPP
35 #define CONNECT_SERVICES__APP_VERSION_INFO_HPP
36 
37 #include <common/ncbi_source_ver.h>
39 
41 
42 #include <sstream>
43 
44 #if defined(NCBI_PACKAGE) && NCBI_PACKAGE
45 #define GRID_APP_VERSION "Grid " NCBI_PACKAGE_VERSION
46 #elif defined(NCBI_DEVELOPMENT_VER)
47 #define GRID_APP_VERSION "codebase version " \
48  NCBI_AS_STRING(NCBI_DEVELOPMENT_VER)
49 #else
50 #define GRID_APP_VERSION "development version"
51 #endif
52 
53 #define GRID_APP_VERSION_INFO GRID_APP_NAME ": " GRID_APP_VERSION \
54  " built on " __DATE__
55 
56 #define GRID_APP_CHECK_VERSION_ARGS() \
57  for (int i = argc; --i > 0; ) { \
58  if (NStr::CompareCase(argv[i], "-version") == 0 || \
59  NStr::CompareCase(argv[i], "-version-full") == 0 || \
60  NStr::CompareCase(argv[i], "--version") == 0) { \
61  puts(GRID_APP_VERSION_INFO); \
62  return 0; \
63  } \
64  }
65 
66 #endif // CONNECT_SERVICES__APP_VERSION_INFO_HPP
Modified on Wed May 08 12:05:52 2024 by modify_doxy.py rev. 669887