From 711746e6e32cfbd5831baa685f33fa3990c74a84 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Thu, 26 Jan 2012 13:22:56 +0100
Subject: [PATCH] TEST: fix test declaration to make it work on windows

---
 Testing/Code/Common/CMakeLists.txt | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/Testing/Code/Common/CMakeLists.txt b/Testing/Code/Common/CMakeLists.txt
index 21a1f98833..509a5c3661 100644
--- a/Testing/Code/Common/CMakeLists.txt
+++ b/Testing/Code/Common/CMakeLists.txt
@@ -68,20 +68,23 @@ ADD_TEST(coTuConfigurationTestDEM ${COMMON_TESTS1}
         )
 
 
-ADD_TEST(coTuConfigurationTestDEM_WithConfigFile ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
+ADD_TEST(NAME coTuConfigurationTestDEM_WithConfigFile
+         COMMAND ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
         --add-before-env OTB_CONFIG_FILE ${CMAKE_BINARY_DIR}/Testing/otbconf_OK
-        Execute ${COMMON_TESTS1}
+        Execute $<TARGET_FILE:otbCommonTests1>
         otbConfigurationTestDEM
         ${OTB_DATA_ROOT}/Input/DEM/srtm_directory
         )
-ADD_TEST(coTuConfigurationTestDEM_WithWrongConfigFile ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
+ADD_TEST(NAME coTuConfigurationTestDEM_WithWrongConfigFile
+         COMMAND ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
         --add-before-env OTB_CONFIG_FILE ${CMAKE_BINARY_DIR}/Testing/otbconf_NotOK
-        Execute ${COMMON_TESTS1}
+        Execute $<TARGET_FILE:otbCommonTests1>
         otbConfigurationTestDEM
         )
-ADD_TEST(coTuConfigurationTestDEM_WithNonExistantConfigFile ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
+ADD_TEST(NAME coTuConfigurationTestDEM_WithNonExistantConfigFile
+         COMMAND ${EXECUTABLE_OUTPUT_PATH}/otbTestDriver
         --add-before-env OTB_CONFIG_FILE ${CMAKE_BINARY_DIR}/Testing/otbconf_NonExistant
-        Execute ${COMMON_TESTS1}
+        Execute $<TARGET_FILE:otbCommonTests1>
         otbConfigurationTestDEM
         )
 # -------            otb::CommandLibneArgumentParser  -------------
-- 
GitLab