Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MBI] Abort cmake on failure.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Mar 2022 13:48:33 +0000 (15:48 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Mar 2022 21:13:09 +0000 (23:13 +0200)
teshsuite/smpi/MBI/CMakeLists.txt

index f92db46..d5e6b88 100644 (file)
@@ -46,7 +46,11 @@ if (enable_smpi_MBI_testsuite)
   foreach (script ${generator_scripts})
     message(STATUS "  $ ${CMAKE_CURRENT_SOURCE_DIR}/${script}")
     execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${script}
-                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/MBI/tmp)
+                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/MBI/tmp
+                    RESULT_VARIABLE status)
+    if (NOT status EQUAL 0)
+      message(FATAL_ERROR "Command failed with status: ${status}")
+    endif()
   endforeach()
 
   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")