]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Quickfix: Do not use the "sed" statement in run_testsuite at all on non GNU platforms
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Nov 2013 16:42:19 +0000 (16:42 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Nov 2013 16:42:19 +0000 (16:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@31550 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/scripts/run_testsuite.cmake

index f8b2d09d41908e8100c5fedf4b1927c67803ba1c..cc6070429bb40c6b69bbf351aba8203a098185d7 100644 (file)
@@ -563,17 +563,27 @@ Unable to determine test submission files from TAG. Bailing out.
 "
     )
 ENDIF()
-FILE(GLOB _xml_files ${_path}/*.xml)
-EXECUTE_PROCESS(COMMAND sed -i -e
-  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
-  ${_xml_files}
-  OUTPUT_QUIET RESULT_VARIABLE  _res
-  )
-IF(NOT "${_res}" STREQUAL "0")
-  MESSAGE(FATAL_ERROR "
-\"sed\" failed. Bailing out.
-"
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  #
+  # Only use the following sed command on GNU userlands:
+  #
+  # TODO: Come up with a more robust way to inject this that also works on
+  # BSD and Mac
+  #
+  MESSAGE(FATAL_ERROR "Success")
+  FILE(GLOB _xml_files ${_path}/*.xml)
+  EXECUTE_PROCESS(COMMAND sed -i -e
+    s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
+    ${_xml_files}
+    OUTPUT_QUIET RESULT_VARIABLE  _res
     )
+  IF(NOT "${_res}" STREQUAL "0")
+    MESSAGE(FATAL_ERROR "
+  \"sed\" failed. Bailing out.
+  "
+      )
+  ENDIF()
 ENDIF()
 
 IF(NOT "${_svn_WC_REVISION}" STREQUAL "")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.