JayBeams  0.1
Another project to have fun coding.
show_compile_info.cpp
Go to the documentation of this file.
2 
3 #include <cstdio>
4 #include <iostream>
5 #include <stdexcept>
6 
7 int main(int argc, char* argv[]) try {
8  std::cout << "uname_a: " << jb::testing::uname_a;
9  std::cout << "\n\ncompiler: " << jb::testing::compiler;
10  std::cout << "\n\ncompiler_flags: " << jb::testing::compiler_flags;
11  std::cout << "\n\nlinker: " << jb::testing::linker;
12  std::cout << "\n\ngitrev: " << jb::testing::gitrev;
13 #ifdef __GLIBCPP__
14  std::cout << "\n\nlibstdc++ GLIBCPP: " << __GLIBCPP__;
15 #endif // __GLIBCPP__
16 #ifdef __GLIBCXX__
17  std::cout << "\n\nlibstdc++ GLIBCXX: " << __GLIBCXX__;
18 #endif // __GLIBCXX__
19 #ifdef _GXX_ABI_VERSION
20  std::cout << "\n\nlibstdc++ GXX_ABI_VERSION: " << _GXX_ABI_VERSION;
21 #endif // _GXX_ABI_VERSION
22 #ifdef _GLIBCXX_RELEASE
23  std::cout << "\n\nlibstdc++ GLIBCXX_RELEASE: " << _GLIBCXX_RELEASE;
24 #endif // _GLIBCXX_RELEASE
25  std::cout << "\n";
26  return 0;
27 } catch (std::exception const& ex) {
28  std::cerr << "standard exception raised: " << ex.what() << std::endl;
29  return 1;
30 } catch (...) {
31  std::cerr << "unknown exception raised" << std::endl;
32  return 1;
33 }
int main(int argc, char *argv[])
char const gitrev[]
The git revision at compile time.
char const uname_a[]
The kernel version, release, machine hardware, etc.
char const compiler_flags[]
The compiler flags.
char const compiler[]
The compiler version.
char const linker[]
The linker version.