Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Gory hack (try #2).
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 28 May 2014 11:27:51 +0000 (13:27 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 28 May 2014 11:58:19 +0000 (13:58 +0200)
Semicolons are used both as list separator for cmake, and as path separator for
classpath on Windows. Since the cmake language doesn't permit to escape them
properly, try to use substitutions to make the java tests work on Windows.

buildtools/Cmake/AddTests.cmake

index a42b620..3181c4a 100644 (file)
@@ -38,6 +38,9 @@ ENDIF()
 MACRO(ADD_TESH NAME)
   SET(ARGR ${ARGV})
   LIST(REMOVE_AT ARGR 0)
 MACRO(ADD_TESH NAME)
   SET(ARGR ${ARGV})
   LIST(REMOVE_AT ARGR 0)
+  IF(WIN32)
+    STRING(REPLACE "§" "\;" ARGR "${ARGR}")
+  ENDIF()
   ADD_TEST(${NAME} ${TESH_COMMAND} ${TESH_OPTION} ${ARGR})
 ENDMACRO()
 
   ADD_TEST(${NAME} ${TESH_COMMAND} ${TESH_OPTION} ${ARGR})
 ENDMACRO()
 
@@ -476,6 +479,7 @@ IF(NOT enable_memcheck)
   IF(enable_java)
     IF(WIN32)
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/\;${SIMGRID_FULL_JAR}")
   IF(enable_java)
     IF(WIN32)
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/\;${SIMGRID_FULL_JAR}")
+      STRING(REPLACE "\;" "§" TESH_CLASSPATH "${TESH_CLASSPATH}")
     ELSE()
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/:${SIMGRID_FULL_JAR}")
     ENDIF()
     ELSE()
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/:${SIMGRID_FULL_JAR}")
     ENDIF()
@@ -508,6 +512,7 @@ IF(NOT enable_memcheck)
   IF(enable_scala)
     IF(WIN32)
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/\;${SIMGRID_FULL_JAR}\;${SCALA_JARS}")
   IF(enable_scala)
     IF(WIN32)
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/\;${SIMGRID_FULL_JAR}\;${SCALA_JARS}")
+      STRING(REPLACE "\;" "§" TESH_CLASSPATH "${TESH_CLASSPATH}")
     ELSE()
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/:${SIMGRID_FULL_JAR}:${SCALA_JARS}")
     ENDIF()
     ELSE()
       SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/:${SIMGRID_FULL_JAR}:${SCALA_JARS}")
     ENDIF()