diff --git a/include/pdal/GEOSUtils.hpp b/include/pdal/GEOSUtils.hpp index 070cf6e79b..8b91e0a3ca 100644 --- a/include/pdal/GEOSUtils.hpp +++ b/include/pdal/GEOSUtils.hpp @@ -83,7 +83,7 @@ class PDAL_DLL ErrorHandler char buf[1024]; vsnprintf(buf, sizeof(buf), message, args); - std::cout << "GEOS error: " << buf << std::endl; + std::cerr<< "GEOS error: " << buf << std::endl; va_end(args); @@ -110,7 +110,7 @@ class PDAL_DLL ErrorHandler char buf[1024]; vsnprintf(buf, sizeof(buf), message, args); - std::cout << "GEOS notice: " << buf << std::endl; + std::cerr<< "GEOS notice: " << buf << std::endl; va_end(args); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be444d1518..fe97b9c185 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -201,7 +201,7 @@ endif() # Targets installation # -# On Linux, we install a linker script as libpdalcpp.so. That file +# On Lixxxxxxxxxxxxxxxxxxnux, we install a linker script as libpdalcpp.so. That file # specifies linking in libpdal_base.so and libpdal_util.so. This allows # users to link a single library, libpdalcpp # @@ -213,4 +213,5 @@ endif() install(DIRECTORY "${PDAL_HEADERS_DIR}/" DESTINATION "${PDAL_INCLUDE_INSTALL_DIR}" - FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") + PATTERN "/CMakeFiles/*" EXCLUDE + ) diff --git a/src/GEOSUtils.cpp b/src/GEOSUtils.cpp index 8fdcab87e8..8984696322 100644 --- a/src/GEOSUtils.cpp +++ b/src/GEOSUtils.cpp @@ -67,13 +67,13 @@ ErrorHandler::ErrorHandler(bool isDebug, LogPtr log) #endif #ifdef GEOSContext_setErrorMessageHandler_r - GEOSContext_setErrorMessageHandler_r(ctx, &ErrorHandler::error_trampoline, &this); + GEOSContext_setErrorMessageHandler_r(ctx, &ErrorHandler::error_trampoline, this); #else GEOSContext_setErrorHandler_r(ctx, &ErrorHandler::error_trampoline); #endif #ifdef GEOSContext_setNoticeHandler_r - GEOSContext_setNoticeHandler_r(ctx, &ErrorHandler::notice_trampoline, &this); + GEOSContext_setNoticeHandler_r(ctx, &ErrorHandler::notice_trampoline, this); #else GEOSContext_setErrorHandler_r(ctx, &ErrorHandler::notice_trampoline); #endif @@ -82,26 +82,17 @@ ErrorHandler::ErrorHandler(bool isDebug, LogPtr log) void ErrorHandler::log(char const* msg) { std::ostringstream oss; - -// if (code == CE_Failure || code == CE_Fatal) -// error(code, num, msg); -// else if (code == CE_Debug) -// { -// oss << "GDAL debug: " << msg; -// if (m_log) -// m_log->get(LogLevel::Debug) << oss.str() << std::endl; -// } + oss << "GEOS debug: " << msg; + if (m_log) + m_log->get(LogLevel::Debug) << oss.str() << std::endl; } void ErrorHandler::error(char const* msg) { std::ostringstream oss; -// if (code == CE_Failure || code == CE_Fatal) -// { -// oss << "GDAL Failure number = " << num << ": " << msg; -// throw pdal_error(oss.str()); -// } + oss << "GEOS failure: '" << msg <<"'"; + throw pdal_error(oss.str()); }