[geos-commits] r2862 - in trunk: . capi src tests tests/unit
tests/unit/tut
svn_geos at osgeo.org
svn_geos at osgeo.org
Sat Jan 16 22:00:27 EST 2010
Author: mloskot
Date: 2010-01-16 22:00:26 -0500 (Sat, 16 Jan 2010)
New Revision: 2862
Added:
trunk/tests/CMakeLists.txt
trunk/tests/unit/CMakeLists.txt
Modified:
trunk/CMakeLists.txt
trunk/capi/CMakeLists.txt
trunk/src/CMakeLists.txt
trunk/tests/unit/tut/tut_console_reporter.hpp
trunk/tests/unit/tut/tut_reporter.hpp
Log:
Updated CMake configuration (#317): CMake generates config headers in build tree. Added generation of geos-config script. Refined include directories settings. Added unit tests package to the configuration. Status: GEOS core + GEOS C library + unit tests build and run successfully.
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2010-01-17 02:07:10 UTC (rev 2861)
+++ trunk/CMakeLists.txt 2010-01-17 03:00:26 UTC (rev 2862)
@@ -106,25 +106,37 @@
# Setup include directories
#################################################################################
-# for including build-specific version.h and platform.h
+# for including GEOS C++ API headers
+include_directories(${CMAKE_SOURCE_DIR}/include)
+
+# for including build-specific version.h, platform.h and geos_c.h
include_directories(${CMAKE_BINARY_DIR}/include)
#################################################################################
-# Setup checks and generate config headers
+# Setup checks and generate config headers and geos-config tool
#################################################################################
+# TODO: output to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_SOURCE_DIR
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.cmake
- ${CMAKE_SOURCE_DIR}/include/geos/platform.h)
+ ${CMAKE_CURRENT_BINARY_DIR}/include/geos/platform.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/geos/version.h.in
- ${CMAKE_SOURCE_DIR}/include/geos/version.h @ONLY)
+ ${CMAKE_CURRENT_BINARY_DIR}/include/geos/version.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/capi/geos_c.h.in
- ${CMAKE_SOURCE_DIR}/capi/geos_c.h @ONLY)
+ ${CMAKE_CURRENT_BINARY_DIR}/capi/geos_c.h @ONLY)
+if(UNIX)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/geos-config.in
+ ${CMAKE_CURRENT_BINARY_DIR}/tools/geos-config @ONLY)
+endif()
+
#################################################################################
# Configure subdirectories
#################################################################################
add_subdirectory(src)
add_subdirectory(capi)
+add_subdirectory(tests)
+
Modified: trunk/capi/CMakeLists.txt
===================================================================
--- trunk/capi/CMakeLists.txt 2010-01-17 02:07:10 UTC (rev 2861)
+++ trunk/capi/CMakeLists.txt 2010-01-17 03:00:26 UTC (rev 2862)
@@ -11,7 +11,6 @@
# See the COPYING file for more information.
#
#################################################################################
-include_directories(${CMAKE_SOURCE_DIR}/include)
set(geos_c_SOURCES
geos_c.cpp
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2010-01-17 02:07:10 UTC (rev 2861)
+++ trunk/src/CMakeLists.txt 2010-01-17 03:00:26 UTC (rev 2862)
@@ -11,7 +11,6 @@
# See the COPYING file for more information.
#
#################################################################################
-include_directories(${CMAKE_SOURCE_DIR}/include)
file(GLOB_RECURSE geos_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
Added: trunk/tests/CMakeLists.txt
===================================================================
--- trunk/tests/CMakeLists.txt (rev 0)
+++ trunk/tests/CMakeLists.txt 2010-01-17 03:00:26 UTC (rev 2862)
@@ -0,0 +1,15 @@
+#################################################################################
+# $Id$
+#
+# GEOS tests build configuration for CMake build system
+#
+# Copyright (C) 2009 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation.
+# See the COPYING file for more information.
+#
+#################################################################################
+
+add_subdirectory(unit)
\ No newline at end of file
Added: trunk/tests/unit/CMakeLists.txt
===================================================================
--- trunk/tests/unit/CMakeLists.txt (rev 0)
+++ trunk/tests/unit/CMakeLists.txt 2010-01-17 03:00:26 UTC (rev 2862)
@@ -0,0 +1,23 @@
+#################################################################################
+# $Id$
+#
+# GEOS unit tests build configuration for CMake build system
+#
+# Copyright (C) 2009 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation.
+# See the COPYING file for more information.
+#
+#################################################################################
+
+include_directories(${CMAKE_SOURCE_DIR}/capi)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tut)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+file(GLOB_RECURSE geos_unit_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
+
+add_executable(geos_unit ${geos_unit_SOURCES})
+
+target_link_libraries(geos_unit geos geos_c)
Modified: trunk/tests/unit/tut/tut_console_reporter.hpp
===================================================================
--- trunk/tests/unit/tut/tut_console_reporter.hpp 2010-01-17 02:07:10 UTC (rev 2861)
+++ trunk/tests/unit/tut/tut_console_reporter.hpp 2010-01-17 03:00:26 UTC (rev 2862)
@@ -1,7 +1,7 @@
#ifndef TUT_CONSOLE_REPORTER
#define TUT_CONSOLE_REPORTER
-#include <tut/tut.hpp>
+#include <tut.hpp>
#include <cassert>
/**
Modified: trunk/tests/unit/tut/tut_reporter.hpp
===================================================================
--- trunk/tests/unit/tut/tut_reporter.hpp 2010-01-17 02:07:10 UTC (rev 2861)
+++ trunk/tests/unit/tut/tut_reporter.hpp 2010-01-17 03:00:26 UTC (rev 2862)
@@ -1,7 +1,7 @@
#ifndef TUT_REPORTER
#define TUT_REPORTER
-#include <tut/tut_console_reporter.hpp>
+#include <tut_console_reporter.hpp>
namespace tut
{
More information about the geos-commits
mailing list