From 63d407011cc3eb1c1d76f7a405123912614714c9 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@c-s.fr>
Date: Tue, 28 Nov 2006 17:44:52 +0000
Subject: [PATCH] =?UTF-8?q?Pr=C3=A9paration=20de=20l'environnement=20du=20?=
 =?UTF-8?q?module=20SpatialReasoning.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Code/CMakeLists.txt                           |  2 +-
 Code/SpatialReasoning/CMakeLists.txt          |  9 ++++++
 Code/SpatialReasoning/toto.cxx                |  0
 Testing/Code/CMakeLists.txt                   |  2 +-
 Testing/Code/SpatialReasoning/CMakeLists.txt  | 29 +++++++++++++++++++
 .../otbSpatialReasoningTests.cxx              | 29 +++++++++++++++++++
 otbIncludeDirectories.cmake                   |  2 ++
 7 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 Code/SpatialReasoning/CMakeLists.txt
 create mode 100644 Code/SpatialReasoning/toto.cxx
 create mode 100644 Testing/Code/SpatialReasoning/CMakeLists.txt
 create mode 100644 Testing/Code/SpatialReasoning/otbSpatialReasoningTests.cxx

diff --git a/Code/CMakeLists.txt b/Code/CMakeLists.txt
index fe92310054..eb9c1531c4 100644
--- a/Code/CMakeLists.txt
+++ b/Code/CMakeLists.txt
@@ -1,5 +1,5 @@
 SUBDIRS(Common BasicFilters IO ChangeDetection FeatureExtraction Learning
-MultiScale) 
+MultiScale SpatialReasoning) 
 
 IF(OTB_USE_VISU)
         SUBDIRS(Visu)
diff --git a/Code/SpatialReasoning/CMakeLists.txt b/Code/SpatialReasoning/CMakeLists.txt
new file mode 100644
index 0000000000..9746f8734e
--- /dev/null
+++ b/Code/SpatialReasoning/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Sources of non-templated classes.
+
+FILE(GLOB OTBSpatialReasoning_SRCS "*.cxx" )
+
+ADD_LIBRARY(OTBSpatialReasoning ${OTBSpatialReasoning_SRCS})
+TARGET_LINK_LIBRARIES (OTBSpatialReasoning ITKCommon)
+
+INSTALL_TARGETS(/lib/otb OTBSpatialReasoning )
+INSTALL_FILES(/include/otb/SpatialReasoning "(\\.h|\\.txx)$")
diff --git a/Code/SpatialReasoning/toto.cxx b/Code/SpatialReasoning/toto.cxx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/Testing/Code/CMakeLists.txt b/Testing/Code/CMakeLists.txt
index f1d7872bf3..ed478fdcc1 100644
--- a/Testing/Code/CMakeLists.txt
+++ b/Testing/Code/CMakeLists.txt
@@ -1,7 +1,7 @@
 # $Id$
 
 SUBDIRS(Common IO BasicFilters FeatureExtraction ChangeDetection Learning
-MultiScale)
+MultiScale SpatialReasoning)
 
 IF(OTB_USE_VISU)
         SUBDIRS(Visu)
diff --git a/Testing/Code/SpatialReasoning/CMakeLists.txt b/Testing/Code/SpatialReasoning/CMakeLists.txt
new file mode 100644
index 0000000000..613a61cf2c
--- /dev/null
+++ b/Testing/Code/SpatialReasoning/CMakeLists.txt
@@ -0,0 +1,29 @@
+ 
+IF( NOT OTB_DISABLE_CXX_TESTING )
+
+SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
+SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
+SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
+#Images de teledetection (grosses images )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
+SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
+
+#Tolerance sur diff pixel image
+SET(TOL 0.0)
+
+
+SET(SPATIALREASONING_TESTS ${CXX_TEST_PATH}/otbSpatialReasoningTests)
+
+
+# -------       Fichiers sources CXX -----------------------------------
+SET(BasicSpatialReasoning_SRCS
+
+)
+
+
+INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
+
+ADD_EXECUTABLE(otbSpatialReasoningTests otbSpatialReasoningTests.cxx ${BasicSpatialReasoning_SRCS})
+TARGET_LINK_LIBRARIES(otbSpatialReasoningTests OTBIO OTBSpatialReasoning gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon)
+
+ENDIF( NOT OTB_DISABLE_CXX_TESTING )
diff --git a/Testing/Code/SpatialReasoning/otbSpatialReasoningTests.cxx b/Testing/Code/SpatialReasoning/otbSpatialReasoningTests.cxx
new file mode 100644
index 0000000000..e2bba57dcd
--- /dev/null
+++ b/Testing/Code/SpatialReasoning/otbSpatialReasoningTests.cxx
@@ -0,0 +1,29 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
+  See OTBCopyright.txt for details.
+
+
+     This software is distributed WITHOUT ANY WARRANTY; without even 
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+// this file defines the otbMultiScaleTest for the test driver
+// and all it expects is that you have a function called RegisterTests
+#if defined(_MSC_VER)
+#pragma warning ( disable : 4786 )
+#endif
+#include <iostream>
+#include "otbTestMain.h" 
+
+void RegisterTests()
+{
+}
diff --git a/otbIncludeDirectories.cmake b/otbIncludeDirectories.cmake
index c7690b553b..dbd421a3a3 100644
--- a/otbIncludeDirectories.cmake
+++ b/otbIncludeDirectories.cmake
@@ -16,6 +16,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
   ${OTB_SOURCE_DIR}/Code/FeatureExtraction
   ${OTB_SOURCE_DIR}/Code/Learning
   ${OTB_SOURCE_DIR}/Code/MultiScale
+  ${OTB_SOURCE_DIR}/Code/SpatialReasoning
   ${OTB_SOURCE_DIR}/Code/Visu
   ${OTB_BINARY_DIR}/Code/Visu
 )
@@ -67,6 +68,7 @@ SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
   ${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
   ${OTB_INSTALL_INCLUDE_DIR}/Learning
   ${OTB_INSTALL_INCLUDE_DIR}/MultiScale
+  ${OTB_INSTALL_INCLUDE_DIR}/SpatialReasoning
   ${OTB_INSTALL_INCLUDE_DIR}/Visu
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK
-- 
GitLab