Don't try to run pdal test if pdal not available

This commit is contained in:
Nyall Dawson 2025-09-17 15:57:34 +10:00
parent 8fa1f26ebc
commit 3ccec49421

View File

@ -16,6 +16,7 @@
#include "qgsproject.h"
#include "qgspointcloudlayer.h"
#include "qgspointcloudlayerexporter.h"
#include "qgsconfig.h"
class TestQgsPointCloudLayerExporter : public QObject
{
@ -40,8 +41,9 @@ class TestQgsPointCloudLayerExporter : public QObject
void testScratchLayerCrs();
void testScratchLayerSynthetic();
void testOgrFile();
#ifdef HAVE_PDAL_QGIS
void testPdalFile();
#endif
private:
std::unique_ptr<QgsProject> mProject;
QgsPointCloudLayer *mLayer;
@ -374,6 +376,7 @@ void TestQgsPointCloudLayerExporter::testOgrFile()
delete result;
}
#ifdef HAVE_PDAL_QGIS
void TestQgsPointCloudLayerExporter::testPdalFile()
{
const QString file = QDir::tempPath() + "/filename.laz";
@ -389,6 +392,7 @@ void TestQgsPointCloudLayerExporter::testPdalFile()
QCOMPARE( result->pointCount(), 134 );
delete result;
}
#endif
QGSTEST_MAIN( TestQgsPointCloudLayerExporter )
#include "testqgspointcloudlayerexporter.moc"