Action_Thermostats
Add_AtomRandomPerturbation
Add_RotateAroundBondAction
Add_SelectAtomByNameAction
Adding_Graph_to_ChangeBondActions
Adding_MD_integration_tests
Adding_StructOpt_integration_tests
Automaking_mpqc_open
AutomationFragmentation_failures
Candidate_v1.6.0
Candidate_v1.6.1
ChangeBugEmailaddress
ChangingTestPorts
ChemicalSpaceEvaluator
Combining_Subpackages
Debian_Package_split
Debian_package_split_molecuildergui_only
Disabling_MemDebug
Docu_Python_wait
EmpiricalPotential_contain_HomologyGraph_documentation
Enable_parallel_make_install
Enhance_userguide
Enhanced_StructuralOptimization
Enhanced_StructuralOptimization_continued
Example_ManyWaysToTranslateAtom
Exclude_Hydrogens_annealWithBondGraph
FitPartialCharges_GlobalError
Fix_ChronosMutex
Fix_StatusMsg
Fix_StepWorldTime_single_argument
Fix_Verbose_Codepatterns
ForceAnnealing_goodresults
ForceAnnealing_oldresults
ForceAnnealing_tocheck
ForceAnnealing_with_BondGraph
ForceAnnealing_with_BondGraph_continued
ForceAnnealing_with_BondGraph_continued_betteresults
ForceAnnealing_with_BondGraph_contraction-expansion
GeometryObjects
Gui_displays_atomic_force_velocity
IndependentFragmentGrids_IntegrationTest
JobMarket_RobustOnKillsSegFaults
JobMarket_StableWorkerPool
JobMarket_unresolvable_hostname_fix
ODR_violation_mpqc_open
PartialCharges_OrthogonalSummation
PythonUI_with_named_parameters
QtGui_reactivate_TimeChanged_changes
Recreated_GuiChecks
RotateToPrincipalAxisSystem_UndoRedo
StoppableMakroAction
Subpackage_CodePatterns
Subpackage_JobMarket
Subpackage_levmar
Subpackage_mpqc_open
Subpackage_vmg
ThirdParty_MPQC_rebuilt_buildsystem
TremoloParser_IncreasedPrecision
TremoloParser_MultipleTimesteps
Ubuntu_1604_changes
stable
Line | |
---|
1 | // include config.h
|
---|
2 | #ifdef HAVE_CONFIG_H
|
---|
3 | #include <config.h>
|
---|
4 | #endif
|
---|
5 |
|
---|
6 | #include <iostream>
|
---|
7 | #include <boost/program_options.hpp>
|
---|
8 |
|
---|
9 | #include "codepatterns-config.hpp"
|
---|
10 | #include "version.hpp"
|
---|
11 |
|
---|
12 | namespace po = boost::program_options;
|
---|
13 |
|
---|
14 | /** If pkg-config fails on you, you can call codepatterns-config
|
---|
15 | * in order to retrieve information about how to compile with
|
---|
16 | * CodePatterns. The following options:
|
---|
17 | * -# cflags
|
---|
18 | * -# help
|
---|
19 | * -# ldflags
|
---|
20 | * -# lib
|
---|
21 | * -# version
|
---|
22 | * -# version-full
|
---|
23 | *
|
---|
24 | * @param argc
|
---|
25 | * @param argv
|
---|
26 | * @return
|
---|
27 | */
|
---|
28 | int main(int argc, char **argv)
|
---|
29 | {
|
---|
30 | // Declare the supported options.
|
---|
31 | po::options_description desc("Allowed options");
|
---|
32 | desc.add_options()
|
---|
33 | ("cflags", "give CFLAGS info")
|
---|
34 | ("ldflags", "give LDFLAGS info")
|
---|
35 | ("libs", "give LIBS info")
|
---|
36 | ("help", "give help")
|
---|
37 | ("version", "give version info")
|
---|
38 | ("version-full", "give fullversion info")
|
---|
39 | ;
|
---|
40 |
|
---|
41 | po::variables_map vm;
|
---|
42 | po::store(po::parse_command_line(argc, argv, desc), vm);
|
---|
43 | po::notify(vm);
|
---|
44 |
|
---|
45 | // exit right after help
|
---|
46 | if (vm.count("help")) {
|
---|
47 | std::cout << desc << "\n";
|
---|
48 | return 1;
|
---|
49 | }
|
---|
50 |
|
---|
51 | // exit right after info
|
---|
52 | if (vm.count("version")) {
|
---|
53 | std::cout << CODEPATTERNSVERSION << "\n";
|
---|
54 | return 0;
|
---|
55 | }
|
---|
56 | if (vm.count("version-full")) {
|
---|
57 | std::cout << CODEPATTERNSFULLVERSION << "\n";
|
---|
58 | return 0;
|
---|
59 | }
|
---|
60 |
|
---|
61 | // concatenate all info if desired
|
---|
62 | if (vm.count("cflags")) {
|
---|
63 | std::cout << CODEPATTERNSCFLAGS << " ";
|
---|
64 | }
|
---|
65 | if (vm.count("ldflags")) {
|
---|
66 | std::cout << CODEPATTERNSLDFLAGS << " ";
|
---|
67 | }
|
---|
68 | if (vm.count("libs")) {
|
---|
69 | std::cout << CODEPATTERNSLIBS << " ";
|
---|
70 | }
|
---|
71 | std::cout << "\n";
|
---|
72 |
|
---|
73 | return 0;
|
---|
74 | }
|
---|
75 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.