[Liblas-commits] libpc: copied from liblas
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Feb 9 23:14:57 EST 2011
details: http://hg.liblas.orglibpc/rev/d440e67b1c4b
changeset: 23:d440e67b1c4b
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 19:08:06 2011 -0800
description:
copied from liblas
Subject: libpc: obsolete
details: http://hg.liblas.orglibpc/rev/9a232f70e1a8
changeset: 24:9a232f70e1a8
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 19:49:50 2011 -0800
description:
obsolete
Subject: libpc: starting to turn on cmake builds
details: http://hg.liblas.orglibpc/rev/3bacf3c7db9e
changeset: 25:3bacf3c7db9e
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 20:07:18 2011 -0800
description:
starting to turn on cmake builds
Subject: libpc: unix name fix
details: http://hg.liblas.orglibpc/rev/67e919879ba4
changeset: 26:67e919879ba4
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 20:14:17 2011 -0800
description:
unix name fix
Subject: libpc: comment everything out for now
details: http://hg.liblas.orglibpc/rev/c60e5261cfc2
changeset: 27:c60e5261cfc2
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 20:14:32 2011 -0800
description:
comment everything out for now
diffstat:
.hgignore | 11 +
CMakeLists.txt | 856 ++++++++++++++++----------------
apps/CMakeLists.txt | 133 +++++
apps/pc2pc.cpp | 387 ++++++++++++++
apps/pcinfo.cpp | 302 +++++++++++
mpg-config.bat | 38 +-
prototype.sln | 25 -
src/CMakeLists.txt | 127 ++++
src/PointLayout.cpp | 6 +-
src/main.cpp | 92 ---
test/CMakeLists.txt | 8 +
test/data/1.2-with-color.las | 0
test/data/1.2-with-color.laz | 0
test/unit/CMakeLists.txt | 32 +
test/unit/libpc_test.hpp | 18 +
test/unit/libpc_test_suite.cpp | 53 ++
test/unit/tut/README | 516 +++++++++++++++++++
test/unit/tut/tut.hpp | 572 ++++++++++++++++++++++
test/unit/tut/tut_assert.hpp | 306 +++++++++++
test/unit/tut/tut_config.hpp | 6 +
test/unit/tut/tut_console_reporter.hpp | 274 ++++++++++
test/unit/tut/tut_exception.hpp | 237 +++++++++
test/unit/tut/tut_posix.hpp | 485 ++++++++++++++++++
test/unit/tut/tut_reporter.hpp | 11 +
test/unit/tut/tut_restartable.hpp | 410 +++++++++++++++
test/unit/tut/tut_result.hpp | 174 ++++++
test/unit/tut/tut_runner.hpp | 388 ++++++++++++++
test/unit/zipreader_test.cpp | 38 +
28 files changed, 4925 insertions(+), 580 deletions(-)
diffs (truncated from 5660 to 300 lines):
diff -r 615db25be65b -r c60e5261cfc2 .hgignore
--- a/.hgignore Wed Feb 09 12:33:36 2011 -0800
+++ b/.hgignore Wed Feb 09 20:14:32 2011 -0800
@@ -3,11 +3,22 @@
# rst outputs
*.pdf
+# cmake stuff
+CMakeCache.txt
+CMakeFiles/
+CPackConfig.cmake
+CPackSourceConfig.cmake
+cmake_install.cmake
+CTestTestfile.cmake
+
# visual studio cruft
Debug/
ipch/
+*.sln
+*.vcxproj
*.vcxproj.filters
*.vcxproj.user
+*.vcproj.*.user
*.sdf
*.suo
*.opensdf
diff -r 615db25be65b -r c60e5261cfc2 CMakeLists.txt
--- a/CMakeLists.txt Wed Feb 09 12:33:36 2011 -0800
+++ b/CMakeLists.txt Wed Feb 09 20:14:32 2011 -0800
@@ -1,438 +1,418 @@
-###############################################################################
-# Main CMake configuration file for libLAS
-#
-# Author: Mateusz Loskot <mateusz at loskot.net>
-#
-#
-###############################################################################
-# libLAS general settings
-project(libLAS)
-
-
-SET(LIBLAS_VERSION_MAJOR "1")
-SET(LIBLAS_VERSION_MINOR "6")
-SET(LIBLAS_VERSION_PATCH "0")
-set(VERSION "${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}")
-SET(LIBLAS_LIB_SOVERSION "2.0.0")
-SET(LIBLAS_C_LIB_SOVERSION "2.0.0")
-SET(OSGEO4W_UPSTREAM_RELEASE "1")
-
-if(WIN32)
- # Name of C++ library
- set(LIBLAS_LIB_NAME liblas)
-
- # Name of C library
- set(LIBLAS_C_LIB_NAME liblas_c)
-
- # Name of Chipper library
- set(LASCHIP_LIB_NAME liblas_chipper )
-
- # Name of Kernel libray
- set(LASKERNEL_LIB_NAME liblas_kernel )
-
-else()
- # Name of C++ library
- set(LIBLAS_LIB_NAME las)
-
- # Name of C library
- set(LIBLAS_C_LIB_NAME las_c)
-
- # Name of Chipper library
- set(LASCHIP_LIB_NAME las_chipper )
-
- # Name of Kernel libray
- set(LASKERNEL_LIB_NAME las_kernel )
-endif()
-
-# Name of test suite runner
-set(LIBLAS_UNIT_TEST liblas_test)
-
-set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
-
-# Choose package components
-set(WITH_UTILITIES TRUE CACHE BOOL "Choose if libLAS utilities should be built")
-set(WITH_TESTS TRUE CACHE BOOL "Choose if libLAS unit tests should be built")
-
-# Choose to use pkg-config or not
-set(WITH_PKGCONFIG FALSE CACHE BOOL
- "Choose whether a pkgconfig file (libLAS.pc) should be installed")
-
-set(WITH_ENDIANAWARE FALSE CACHE BOOL "Choose whether or not libLAS should do runtime endianness switching. Note that this can slow things down considerably if enabled by default")
-
-# Enable CTest and submissions to libLAS dashboard at CDash
-# http://my.cdash.org/index.php?project=libLAS
-set(ENABLE_CTEST FALSE CACHE BOOL
- "Enable CTest to support submissions of results to CDash at http://cdash.org")
-
-###############################################################################
-# CMake settings
-cmake_minimum_required(VERSION 2.6.0)
-
-set(CMAKE_COLOR_MAKEFILE ON)
-
-# Allow advanced users to generate Makefiles printing detailed commands
-mark_as_advanced(CMAKE_VERBOSE_MAKEFILE)
-
-# Path to additional CMake modules
-set(CMAKE_MODULE_PATH ${libLAS_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
-
-###############################################################################
-# General build settings
-
-# Default to debug mode until final 1.6.0 release
-if(NOT MSVC_IDE)
- if(NOT CMAKE_BUILD_TYPE)
-
- set(CMAKE_BUILD_TYPE Debug CACHE STRING
- "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE)
- endif()
- message(STATUS "Setting libLAS build type - ${CMAKE_BUILD_TYPE}")
-endif()
-
-# TODO: Still testing the output paths --mloskot
-set(LIBLAS_BUILD_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
-
-# Output directory in which to build RUNTIME target files.
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
-
-# Output directory in which to build LIBRARY target files
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
-
-# Output directory in which to build ARCHIVE target files.
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
-
-file(READ "doc/index.txt" README )
-file(WRITE "README.txt" "${README}")
-
-###############################################################################
-# Platform and compiler specific settings
-
-if(WIN32)
- if (MSVC)
- if (MSVC80 OR MSVC90 OR MSVC10)
- add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
- add_definitions(-D_CRT_NONSTDC_NO_WARNING)
- add_definitions(-D_SCL_SECURE_NO_WARNINGS)
- endif()
-
- if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
- string(REGEX REPLACE "/W[0-4]" "/W4"
- CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
- endif()
-
- # Generate dot-user file with user-specific settings for
- # Visual Studio project
- set(MSVC_ENVIRONMENT_PATH "" CACHE STRING
- "Custom PATH for Environment property in Visual Studio for project")
- mark_as_advanced(MSVC_ENVIRONMENT_PATH)
- set(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG "${ENVIRONMENT_PATH}")
- mark_as_advanced(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG)
-
- endif()
-
- set(CMAKE_INCLUDE_PATH c:/osgeo4w/include;$ENV{CMAKE_INCLUDE_PATH})
- set(CMAKE_LIBRARY_PATH c:/osgeo4w/lib;$ENV{CMAKE_LIBRARY_PATH})
-else()
-
- # Recommended C++ compilation flags
- # -Weffc++
- set(LIBLAS_COMMON_CXX_FLAGS
- "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
-
- if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
- if (CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
- endif()
-
- elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
- endif()
-endif(WIN32)
-
-if (APPLE)
- set(SO_EXT dylib)
- set(CMAKE_FIND_FRAMEWORK "LAST")
-elseif(WIN32)
- set(SO_EXT dll)
-else()
- set(SO_EXT so)
-endif(APPLE)
-
-###############################################################################
-# Search for dependencies
-
-# Boost C++ Libraries support - required
-message(STATUS "Searching for Boost 1.38+ - done")
-
-# Default to using static, multithreaded libraries for
-# linking under MSVC. This is because we show users how to
-# use boostpro.com installer and install those options when linking
-# on windows in the compilation documentation.
-if(WIN32)
- if (MSVC)
- set(Boost_USE_STATIC_LIBS ON)
- set(Boost_USE_MULTITHREADED ON)
- endif(MSVC)
-endif(WIN32)
-
-# NOTE: Add iostreams to COMPONENTS list to enable bigfile_boost_iostreams_test
-find_package(Boost 1.38 COMPONENTS program_options thread REQUIRED)
-
-if(Boost_FOUND AND Boost_PROGRAM_OPTIONS_FOUND)
- include_directories(${Boost_INCLUDE_DIRS})
-endif()
-
-# make these available for the user to set.
-mark_as_advanced(CLEAR Boost_INCLUDE_DIR)
-mark_as_advanced(CLEAR Boost_LIBRARY_DIRS)
-link_directories(${Boost_LIBRARY_DIRS})
-
-
-
-# libxml2 support - optional, default=ON
-set(WITH_LIBXML2 FALSE CACHE BOOL "Choose if libxml2 support should be built ")
-
-if(WITH_LIBXML2)
- find_package(LibXml2)
- mark_as_advanced(CLEAR LIBXML2_INCLUDE_DIR)
- mark_as_advanced(CLEAR LIBXML2_LIBRARIES)
- if(LIBXML2_FOUND)
- include_directories(${LIBXML2_INCLUDE_DIR})
- add_definitions(-DHAVE_LIBXML2=1)
- endif()
-endif()
-
-# GDAL/OGR support - optional, default=OFF
-set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
-
-if(WITH_GDAL)
-
- find_package(GDAL 1.6.0)
-
- # if(GDAL_FOUND)
- # # Confirm required API is available
- # include(CheckFunctionExists)
- # set(CMAKE_REQUIRED_LIBRARIES ${GDAL_LIBRARY})
- # check_function_exists(OSRSetEquirectangular2 HAVE_OSRSETEQUIRECTANGULAR2)
- #
- # if(NOT HAVE_OSRSETEQUIRECTANGULAR2)
- # # Reset to NOT found for GDAL/OGR
- # set(GDAL_FOUND)
- # message(FATAL_ERROR
- # "Unable to find OSRSetEquirectangular2 within GDAL library at ${GDAL_INCLUDE_DIR} ${GDAL_LIBRARY}")
- # else()
- include_directories(${GDAL_INCLUDE_DIR})
- add_definitions(-DHAVE_GDAL=1)
- # endif()
- # endif()
-
- mark_as_advanced(CLEAR GDAL_INCLUDE_DIR)
- mark_as_advanced(CLEAR GDAL_LIBRARY)
-
-endif()
-
-# GeoTIFF support - optional, default=OFF
-set(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
-
-if(WITH_GEOTIFF)
- find_package(GeoTIFF 1.2.5)
-
- if(GEOTIFF_FOUND)
-
- # Confirm required API is available
- include(CheckFunctionExists)
- set(CMAKE_REQUIRED_LIBRARIES ${GEOTIFF_LIBRARY})
- # check_function_exists(ST_Create HAVE_ST_CREATE)
-
- # if(NOT HAVE_ST_CREATE)
- # set(GEOTIFF_FOUND) # Reset to NOT found for GeoTIFF
- # message(FATAL_ERROR "GeoTIFF support requires libgeotiff 1.2.5 or newer.")
- # else()
- include_directories(${GEOTIFF_INCLUDE_DIR})
- add_definitions(-DHAVE_LIBGEOTIFF=1)
- # endif()
- endif()
-
- # Determine libTIFF availability, required
- if (GEOTIFF_FOUND)
-
- mark_as_advanced(CLEAR TIFF_INCLUDE_DIR)
- mark_as_advanced(CLEAR TIFF_LIBRARY)
- if (WIN32)
- set(TIFF_NAMES libtiff_i)
- endif(WIN32)
- find_package(TIFF)
- if (TIFF_FOUND)
More information about the Liblas-commits
mailing list