1 ////////////////////////////////////////////////////////////////////////////////
3 // Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez, 2020 Armaan Bhojwani.
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
12 // The above copyright notice and this permission notice shall be included
13 // in all copies or substantial portions of the Software.
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // http://www.opensource.org/licenses/mit-license.php
25 ////////////////////////////////////////////////////////////////////////////////
40 #include <readline/readline.h>
41 #include <readline/history.h>
44 ////////////////////////////////////////////////////////////////////////////////
50 << bold.colorize (PACKAGE_STRING)
52 << " " << "Platform: " << osName ()
56 std::cout << bold.colorize ("Compiler")
60 << __VERSION__ << "\n"
66 #ifdef __STDC_HOSTED__
69 #ifdef __STDC_VERSION__
70 << " +" << __STDC_VERSION__
73 << " +" << _POSIX_VERSION
75 #ifdef _POSIX2_C_VERSION
76 << " +" << _POSIX2_C_VERSION
84 << " +c" << 8 * sizeof (char)
85 << " +i" << 8 * sizeof (int)
86 << " +l" << 8 * sizeof (long)
87 << " +vp" << 8 * sizeof (void*)
88 << " +time_t" << 8 * sizeof (time_t)
91 // Compiler compliance level.
92 std::cout << " Compliance: "
96 std::cout << bold.colorize ("Build Features")
100 << " " << "Built: " << __DATE__ << " " << __TIME__ << "\n"
102 << " " << "Commit: " << COMMIT << "\n"
104 << " CMake: " << CMAKE_VERSION << "\n";
106 std::cout << "libreadline: "
108 #ifdef RL_VERSION_MAJOR
109 << RL_VERSION_MAJOR << "." << RL_VERSION_MINOR
110 #elif defined RL_READLINE_VERSION
111 << "0x" << std::hex << RL_READLINE_VERSION
118 std::cout << " Build type: "
119 #ifdef CMAKE_BUILD_TYPE
126 std::cout << bold.colorize ("Configuration")
129 auto env = getenv ("TASKRC");
130 std::cout << " TASKRC: "
134 env = getenv ("TASKDATA");
135 std::cout << " TASKDATA: "
140 ////////////////////////////////////////////////////////////////////////////////