Skip to content

Commit fd7164a

Browse files
committed
Fix compiler errors when disabling program options
Fixes some compiler errors when --disable-boost-program-options was passed to configure.
1 parent ce13f84 commit fd7164a

14 files changed

+57
-7
lines changed

src/core/inc/Defines.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
// Use GSL inline functions
5555
#define HAVE_INLINE
5656

57+
// So we don't clash with other getpots
58+
#define GETPOT_NAMESPACE QUESO
59+
5760
// And only do GSL range-checking if we're really debugging
5861
#ifndef DEBUG
5962
#define GSL_RANGE_CHECK_OFF

src/core/inc/InfiniteDimensionalMCMCSamplerOptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
3030
#include <queso/BoostInputOptionsParser.h>
31+
#else
32+
#include <queso/getpot.h>
3133
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
3234

3335
namespace QUESO {

src/core/src/Environment.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Environment.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
2729
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2830

29-
#define GETPOT_NAMESPACE QUESO
3031
#include <queso/getpot.h>
3132

3233
#include <queso/config_queso.h>
33-
#include <queso/Environment.h>
3434
#include <queso/EnvironmentOptions.h>
3535
#include <queso/RngGsl.h>
3636
#include <queso/RngBoost.h>

src/core/src/EnvironmentOptions.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Defines.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
29+
#else
30+
#include <queso/getpot.h>
2731
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2832

2933
#include <queso/EnvironmentOptions.h>

src/core/src/OptimizerOptions.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@
2424

2525
#include <queso/Defines.h>
2626
#include <queso/Environment.h>
27+
28+
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2729
#include <queso/BoostInputOptionsParser.h>
30+
#else
31+
#include <queso/getpot.h>
32+
#endif
33+
2834
#include <queso/OptimizerOptions.h>
2935

3036
namespace QUESO {

src/gp/src/ExperimentModelOptions.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Defines.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
29+
#else
30+
#include <queso/getpot.h>
2731
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2832

2933
#include <queso/ExperimentModelOptions.h>

src/gp/src/GPMSAOptions.C

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Defines.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
29+
#else
30+
#include <queso/getpot.h>
2731
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2832

2933
#include <queso/GPMSAOptions.h>
@@ -56,9 +60,9 @@ GPMSAOptions::GPMSAOptions(
5660

5761
GPMSAOptions::GPMSAOptions()
5862
:
59-
m_env(NULL),
63+
m_env(NULL)
6064
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
61-
m_parser(new BoostInputOptionsParser())
65+
,m_parser(new BoostInputOptionsParser())
6266
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
6367
{
6468
this->set_defaults();

src/gp/src/GpmsaComputerModelOptions.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Defines.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
29+
#else
30+
#include <queso/getpot.h>
2731
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2832

2933
#include <queso/GpmsaComputerModelOptions.h>

src/gp/src/SimulationModelOptions.C

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
//
2323
//-----------------------------------------------------------------------el-
2424

25+
#include <queso/Defines.h>
26+
2527
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
2628
#include <boost/program_options.hpp>
29+
#else
30+
#include <queso/getpot.h>
2731
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
2832

2933
#include <queso/SimulationModelOptions.h>

src/stats/inc/MLSamplingLevelOptions.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929

3030
#include <queso/Environment.h>
3131
#include <queso/SequenceStatisticalOptions.h>
32+
33+
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
3234
#include <queso/BoostInputOptionsParser.h>
35+
#else
36+
#include <queso/getpot.h>
37+
#endif
38+
3339
#define UQ_ML_SAMPLING_L_FILENAME_FOR_NO_FILE "."
3440

3541
// _ODV = option default value

0 commit comments

Comments
 (0)