From 2901a376869f8e40865c1c316843560dc6807d3e Mon Sep 17 00:00:00 2001
From: Thomas Feuvrier <thomas.feuvrier@c-s.fr>
Date: Wed, 12 Jul 2006 15:46:37 +0000
Subject: [PATCH] =?UTF-8?q?Suppression=20de=20la=20variable=20OTB=5FDATA?=
 =?UTF-8?q?=5FDIR=20dans=20les=20CMakeLists.txt,=20redondante=20avec=20la?=
 =?UTF-8?q?=20variable=20OTB=5FDATA=5FROOT.=20La=20variable=20OTB=5FDATA?=
 =?UTF-8?q?=5FROOT=20doit=20maintenant=20pointer=20sur=20le=20r=C3=A9perto?=
 =?UTF-8?q?ire=20OTB-Data=20pour=20les=20tests=20de=20non-r=C3=A9gression.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 CMakeLists.txt                                | 8 +-------
 Testing/Code/BasicFilters/CMakeLists.txt      | 8 ++++----
 Testing/Code/ChangeDetection/CMakeLists.txt   | 8 ++++----
 Testing/Code/Common/CMakeLists.txt            | 8 ++++----
 Testing/Code/FeatureExtraction/CMakeLists.txt | 8 ++++----
 Testing/Code/IO/CMakeLists.txt                | 8 ++++----
 Testing/Code/Installation/CMakeLists.txt      | 8 ++++----
 Testing/Code/Learning/CMakeLists.txt          | 8 ++++----
 Testing/Code/Visu/CMakeLists.txt              | 8 ++++----
 Testing/Fa/CMakeLists.txt                     | 8 ++++----
 10 files changed, 37 insertions(+), 43 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4176698a4..b307d4a2b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,12 +180,6 @@ INCLUDE_DIRECTORIES( ${OTB_INCLUDE_DIRS} )
 INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
 
-
-
-#-----------------------------------------------------------------------------
-# Repertoire des images de télédetection.
-SET( OTB_DATA_DIR "$ENV{OTB_DATA_DIR}" CACHE STRING "Image directory")
-
 #-----------------------------------------------------------------------------
 # Configure Dart testing support.  This should be done before any
 # MESSAGE(FATAL_ERROR ...) commands are invoked.
@@ -449,7 +443,7 @@ ENDIF(OTB_SIZEOF_LONG_LONG)
 
 #-----------------------------------------------------------------------------
 # Configure the default OTB_DATA_ROOT for the location of OTB Data.
-FIND_PATH(OTB_DATA_ROOT OTBData.readme ${OTB_SOURCE_DIR}/Testing/Data $ENV{OTB_DATA_ROOT})
+FIND_PATH(OTB_DATA_ROOT OTBData.readme $ENV{OTB_DATA_ROOT})
 MARK_AS_ADVANCED(OTB_DATA_ROOT)
 
 
diff --git a/Testing/Code/BasicFilters/CMakeLists.txt b/Testing/Code/BasicFilters/CMakeLists.txt
index 7668c174fc..80376d6de1 100755
--- a/Testing/Code/BasicFilters/CMakeLists.txt
+++ b/Testing/Code/BasicFilters/CMakeLists.txt
@@ -1,11 +1,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 
diff --git a/Testing/Code/ChangeDetection/CMakeLists.txt b/Testing/Code/ChangeDetection/CMakeLists.txt
index 748276f287..d8b6956413 100755
--- a/Testing/Code/ChangeDetection/CMakeLists.txt
+++ b/Testing/Code/ChangeDetection/CMakeLists.txt
@@ -1,11 +1,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 
diff --git a/Testing/Code/Common/CMakeLists.txt b/Testing/Code/Common/CMakeLists.txt
index 5556b4820d..78ffdffec7 100644
--- a/Testing/Code/Common/CMakeLists.txt
+++ b/Testing/Code/Common/CMakeLists.txt
@@ -1,11 +1,11 @@
  
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 #Tolerance sur diff pixel image
diff --git a/Testing/Code/FeatureExtraction/CMakeLists.txt b/Testing/Code/FeatureExtraction/CMakeLists.txt
index c0bf7a4003..685bf625cc 100755
--- a/Testing/Code/FeatureExtraction/CMakeLists.txt
+++ b/Testing/Code/FeatureExtraction/CMakeLists.txt
@@ -1,11 +1,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 
diff --git a/Testing/Code/IO/CMakeLists.txt b/Testing/Code/IO/CMakeLists.txt
index 0f6151814c..2a0f0959bc 100755
--- a/Testing/Code/IO/CMakeLists.txt
+++ b/Testing/Code/IO/CMakeLists.txt
@@ -2,11 +2,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 #Tolerance sur diff pixel image
diff --git a/Testing/Code/Installation/CMakeLists.txt b/Testing/Code/Installation/CMakeLists.txt
index 764a851869..df4fbd64b1 100644
--- a/Testing/Code/Installation/CMakeLists.txt
+++ b/Testing/Code/Installation/CMakeLists.txt
@@ -1,10 +1,10 @@
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 ADD_TEST(inTuInstallationTest ${CXX_TEST_PATH}/otbInstallationTest      
diff --git a/Testing/Code/Learning/CMakeLists.txt b/Testing/Code/Learning/CMakeLists.txt
index a08e0ae03f..98a48ff119 100644
--- a/Testing/Code/Learning/CMakeLists.txt
+++ b/Testing/Code/Learning/CMakeLists.txt
@@ -1,11 +1,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 
diff --git a/Testing/Code/Visu/CMakeLists.txt b/Testing/Code/Visu/CMakeLists.txt
index 8a030e976f..b548471e35 100755
--- a/Testing/Code/Visu/CMakeLists.txt
+++ b/Testing/Code/Visu/CMakeLists.txt
@@ -3,11 +3,11 @@ IF( NOT OTB_DISABLE_CXX_TESTING )
 
 # SUBDIRS( ImageViewer ImageColorViewer )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Images)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+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_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 
diff --git a/Testing/Fa/CMakeLists.txt b/Testing/Fa/CMakeLists.txt
index 9dc5629cfb..1194cada84 100755
--- a/Testing/Fa/CMakeLists.txt
+++ b/Testing/Fa/CMakeLists.txt
@@ -2,11 +2,11 @@
 
 IF( NOT OTB_DISABLE_CXX_TESTING )
 
-SET(BASELINE ${OTB_DATA_DIR}/Baseline/OTB/Fa)
-SET(BASELINE_FILES ${OTB_DATA_DIR}/Baseline/OTB/Files)
-SET(INPUTDATA ${OTB_DATA_DIR}/Input)
+SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Fa)
+SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
+SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
 #Images de teledetection (grosses images )
-SET(IMAGEDATA ${OTB_DATA_DIR}/LargeInput )
+SET(IMAGEDATA ${OTB_DATA_ROOT}/LargeInput )
 SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 
 #Tolerance sur diff pixel image
-- 
GitLab