[Liblas-commits] hg: 3 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Oct 2 19:27:51 EDT 2009
changeset ccdc1ec53425 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=ccdc1ec53425
summary: Updated dot-hgignore file
changeset bda24d7e6383 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=bda24d7e6383
summary: [cmake] Added unit test suite to CMake configuration (Ticket #52)
changeset 9110441400b4 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=9110441400b4
summary: Fixed bug of GDAL calls not guarded with HAVE_GDAL (Ticket #150)
diffstat:
.hgignore | 17 +++++++++--------
CMakeLists.txt | 5 +++++
src/detail/writer.cpp | 8 ++++----
test/CMakeLists.txt | 9 ++++++---
test/unit/CMakeLists.txt | 26 +++++++++++++-------------
5 files changed, 37 insertions(+), 28 deletions(-)
diffs (169 lines):
diff -r f3bde1e79871 -r 9110441400b4 .hgignore
--- a/.hgignore Fri Oct 02 09:26:16 2009 -0500
+++ b/.hgignore Sat Oct 03 00:27:40 2009 +0100
@@ -1,15 +1,17 @@
syntax: glob
+.deps
+.libs
+*.dll
+*.exe
+*.exp
*.la
+*.lib
*.lo
*.o
*.obj
-.deps
-.libs
-*.exe
-*.exp
-*.lib
+*.pyc
*.res
-*.dll
+*.swp
aclocal.m4
apps/las2las
apps/las2txt
@@ -41,9 +43,8 @@
python/build/*
python/dist/*
python/libLAS.egg-info/*
-*.pyc
src/CMakeFiles
CMakeFiles
CMakeCache.txt
cmake_install.cmake
-src/liblas.a
\ No newline at end of file
+src/liblas.a
diff -r f3bde1e79871 -r 9110441400b4 CMakeLists.txt
--- a/CMakeLists.txt Fri Oct 02 09:26:16 2009 -0500
+++ b/CMakeLists.txt Sat Oct 03 00:27:40 2009 +0100
@@ -18,6 +18,9 @@
# Name of C library
SET(LIBLAS_C_LIB_NAME las_c)
+# Name of test suite runner
+SET(LIBLAS_UNIT_TEST liblas_test)
+
# Choose package components
SET(WITH_UTILITIES TRUE CACHE BOOL "Choose if libLAS utilities should be built")
SET(WITH_TESTS FALSE CACHE BOOL "Choose if libLAS unit tests should be built")
@@ -228,9 +231,11 @@
ADD_SUBDIRECTORY(src)
IF(WITH_UTILITIES)
+ MESSAGE(STATUS "Adding libLAS utilities to build - done")
ADD_SUBDIRECTORY(apps)
ENDIF()
IF(WITH_TESTS)
+ MESSAGE(STATUS "Adding libLAS unit test suite to build - done")
ADD_SUBDIRECTORY(test)
ENDIF()
diff -r f3bde1e79871 -r 9110441400b4 src/detail/writer.cpp
--- a/src/detail/writer.cpp Fri Oct 02 09:26:16 2009 -0500
+++ b/src/detail/writer.cpp Sat Oct 03 00:27:40 2009 +0100
@@ -180,8 +180,9 @@
m_in_srs = srs;
}
-void Writer::CreateTransform(){
-
+void Writer::CreateTransform()
+{
+#ifdef HAVE_GDAL
if (m_transform)
{
OCTDestroyCoordinateTransformation(m_transform);
@@ -195,7 +196,6 @@
OSRDestroySpatialReference(m_out_ref);
}
-#ifdef HAVE_GDAL
m_in_ref = OSRNewSpatialReference(0);
m_out_ref = OSRNewSpatialReference(0);
@@ -218,7 +218,6 @@
}
m_transform = OCTNewCoordinateTransformation( m_in_ref, m_out_ref);
-
#endif
}
@@ -247,6 +246,7 @@
detail::ignore_unused_variable_warning(p);
#endif
}
+
Writer* WriterFactory::Create(std::ostream& ofs, LASHeader const& header)
{
if (!ofs)
diff -r f3bde1e79871 -r 9110441400b4 test/CMakeLists.txt
--- a/test/CMakeLists.txt Fri Oct 02 09:26:16 2009 -0500
+++ b/test/CMakeLists.txt Sat Oct 03 00:27:40 2009 +0100
@@ -1,5 +1,8 @@
-# $Id$
+###############################################################################
#
-# List of test and sample programs subprojects
+# test/CMakeLists.txt controls building of libLAS tests
#
-SUBDIRS( unit )
+# Copyright (c) 2009 Mateusz Loskot <mateusz at loskot.net>
+#
+###############################################################################
+SUBDIRS(unit)
diff -r f3bde1e79871 -r 9110441400b4 test/unit/CMakeLists.txt
--- a/test/unit/CMakeLists.txt Fri Oct 02 09:26:16 2009 -0500
+++ b/test/unit/CMakeLists.txt Sat Oct 03 00:27:40 2009 +0100
@@ -1,10 +1,13 @@
-# $Id$
+###############################################################################
#
-# Build libLAS unit test suite
+# test/unit/CMakeLists.txt controls building of libLAS unit tests suite
#
-SET( LIBLAS_TEST liblas_test )
+# Copyright (c) 2009 Mateusz Loskot <mateusz at loskot.net>
+#
+###############################################################################
+SET(LIBLAS_UNIT_TEST liblas_test)
-SET( LIBLAS_TEST_SRC
+SET(LIBLAS_UNIT_TEST_SRC
common.cpp
guid_test.cpp
laserror_test.cpp
@@ -16,23 +19,20 @@
lasspatialreference_test.cpp
lasvariablerecord_test.cpp
laswriter_test.cpp
- liblas_test_suite.cpp
-)
+ liblas_test_suite.cpp)
INCLUDE_DIRECTORIES(
.
../../include
${GDAL_INCLUDE_DIR}
- ${GEOTIFF_INCLUDE_DIR}
-)
+ ${GEOTIFF_INCLUDE_DIR})
-ADD_EXECUTABLE( ${LIBLAS_TEST} ${LIBLAS_TEST_SRC} )
+ADD_EXECUTABLE(${LIBLAS_UNIT_TEST} ${LIBLAS_UNIT_TEST_SRC})
-TARGET_LINK_LIBRARIES( ${LIBLAS_TEST}
+TARGET_LINK_LIBRARIES(${LIBLAS_UNIT_TEST}
${LIBLAS_LIB_NAME}
${GDAL_LIBRARY}
- ${GEOTIFF_LIBRARY}
-)
+ ${GEOTIFF_LIBRARY})
# TODO: Needs to tweak the executable path
-ADD_TEST(liblas_test ${EXECUTABLE_OUTPUT_PATH}/liblas_test)
+ADD_TEST(liblas_test ${EXECUTABLE_OUTPUT_PATH}/liblas_test ${CMAKE_SOURCE_DIR}/test/data)
More information about the Liblas-commits
mailing list