[Liblas-commits] libpc: non-ORA build fix

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Mar 11 12:22:04 EST 2011


details:   http://hg.liblas.orglibpc/rev/a3c016894566
changeset: 208:a3c016894566
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Fri Mar 11 09:21:59 2011 -0800
description:
non-ORA build fix

diffstat:

 apps/pc2pc.cpp |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 221d3a3d6a54 -r a3c016894566 apps/pc2pc.cpp
--- a/apps/pc2pc.cpp	Thu Mar 10 21:20:01 2011 -0600
+++ b/apps/pc2pc.cpp	Fri Mar 11 09:21:59 2011 -0800
@@ -12,7 +12,7 @@
 
 #include <iostream>
 
-//#include "libpc/exceptions.hpp"
+#include "libpc/exceptions.hpp"
 //#include "libpc/libpc_config.hpp"
 //#include "libpc/Bounds.hpp"
 //#include "libpc/Color.hpp"
@@ -31,7 +31,9 @@
 #include "libpc/../../src/drivers/liblas/writer.hpp"
 #include "libpc/../../src/drivers/liblas/reader.hpp"
 
+#ifdef HAVE_ORACLE
 #include "libpc/../../src/drivers/oci/writer.hpp"
+#endif
 
 #include "Application.hpp"
 
@@ -123,6 +125,7 @@
 
     else if (hasOption("oracle"))
     {
+#ifdef HAVE_ORACLE
         LasReader reader(*ifs);
         std::cout << "running oracle test" << std::endl;
         const boost::uint64_t numPoints = reader.getHeader().getNumPoints();
@@ -147,6 +150,9 @@
         size_t np = (size_t)numPoints;
         assert(numPoints == np); // BUG
          writer.write(np);
+#else
+        throw configuration_error("libPC not compiled with Oracle support");
+#endif
     }    
 
     else


More information about the Liblas-commits mailing list