Page MenuHomeHEPForge

No OneTemporary

diff --git a/cmake/Templates/rHEJ-config.cc.in b/cmake/Templates/rHEJ-config.cc.in
index f7948ec..f6844c0 100644
--- a/cmake/Templates/rHEJ-config.cc.in
+++ b/cmake/Templates/rHEJ-config.cc.in
@@ -1,42 +1,44 @@
#include <iostream>
#include "cxxopts.hpp"
int main(int argc, char** argv) {
cxxopts::Options options{
"rHEJ-config",
"Configuration of the reversed HEJ (rHEJ) installation"
};
options.add_options()
("h,help", "show this help message and exit")
("prefix", "show rHEJ installation prefix")
("includedir", "show the path with the installed rHEJ header files")
("bindir", "show the path with the installed rHEJ executable")
("libdir", "show the path with the installed rHEJ library file")
("libs", "show flags for linking the rHEJ library")
("cxx", "show the compiler used to build rHEJ")
("version", "show the installed rHEJ version")
+ ("revision", "show the hash of the installed rHEJ git revision")
;
if(argc == 1) {
std::cout << options.help();
return EXIT_SUCCESS;
}
try {
const auto opts = options.parse(argc, argv);
if(opts.count("help")) {
std::cout << options.help();
return EXIT_SUCCESS;
}
if(opts.count("prefix")) std::cout << "@CMAKE_INSTALL_PREFIX@\n";
if(opts.count("includedir")) std::cout << "@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDE_DIR@\n";
if(opts.count("bindir")) std::cout << "@CMAKE_INSTALL_PREFIX@/@INSTALL_BIN_DIR@\n";
if(opts.count("libdir")) std::cout << "@CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@\n";
if(opts.count("libs")) std::cout << "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@ -lrhej\n";
if(opts.count("cxx")) std::cout << "@CMAKE_CXX_COMPILER@\n";
if(opts.count("version")) std::cout << "@PROJECT_VERSION@\n";
+ if(opts.count("revision")) std::cout << "@PROJECT_GIT_REVISION@\n";
}
catch(cxxopts::OptionException const &) {
std::cout << options.help();
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 21, 1:43 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4243483
Default Alt Text
(1 KB)

Event Timeline