Skip to content

Commit

Permalink
Implement #152, denoting whether or not boost is built embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jul 3, 2013
1 parent a179ee1 commit f89208c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/Application.cpp
Expand Up @@ -303,8 +303,8 @@ void Application::addPositionalSwitch(const char* name, int max_count)

void Application::outputDrivers()
{
pdal::StageFactory* factory = new pdal::StageFactory;
std::map<std::string, pdal::StageInfo> const& drivers = factory->getStageInfos();
pdal::StageFactory factory;
std::map<std::string, pdal::StageInfo> const& drivers = factory.getStageInfos();
typedef std::map<std::string, pdal::StageInfo>::const_iterator Iterator;

for (Iterator i = drivers.begin(); i != drivers.end(); ++i)
Expand Down
3 changes: 3 additions & 0 deletions include/pdal/pdal_config.hpp
Expand Up @@ -55,6 +55,7 @@ PDAL_DLL bool IsLibLASEnabled();
PDAL_DLL bool IsGDALEnabled();
PDAL_DLL bool IsLibGeoTIFFEnabled();
PDAL_DLL bool IsLasZipEnabled();
PDAL_DLL bool IsEmbeddedBoost();

PDAL_DLL std::string GetFullVersionString();
PDAL_DLL std::string GetVersionString();
Expand All @@ -63,6 +64,8 @@ PDAL_DLL int GetVersionMajor();
PDAL_DLL int GetVersionMinor();
PDAL_DLL int GetVersionPatch();



} // namespace pdal

#endif
15 changes: 14 additions & 1 deletion src/pdal_config.cpp
Expand Up @@ -92,6 +92,14 @@ bool IsLasZipEnabled()
#endif
}

bool IsEmbeddedBoost()
{
#ifdef PDAL_EMBED_BOOST
return true;
#else
return false;
#endif
}

int GetVersionMajor()
{
Expand Down Expand Up @@ -143,7 +151,12 @@ std::string GetFullVersionString()
<< LASZIP_VERSION_MINOR << "."
<< LASZIP_VERSION_REVISION;
#endif


if (IsEmbeddedBoost())
os << " Embed ";
else
os << " System ";

std::string info(os.str());
os.str("");
os << "PDAL " << PDAL_VERSION_STRING;
Expand Down

0 comments on commit f89208c

Please sign in to comment.