From c94169d65634cf1bb1a4de49e9f399570f36d52b Mon Sep 17 00:00:00 2001 From: bruneton Date: Wed, 10 Jul 2013 08:09:56 +0000 Subject: [PATCH] CMake: generating a fatal error if the wrapping Python script cannot run --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1690f5c..570b15ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,11 @@ INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) # TODO: the below requires ParaView in the PYTHONPATH ... not so nice: MESSAGE(STATUS "Generating wrapped class list (??) ...") LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIR0}) +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIR0} + RESULT_VARIABLE _res) +IF(NOT _res EQUAL 0) + MESSAGE(FATAL_ERROR "Unable to run the Python script retrieving the list of VTK classes.") +ENDIF() SET(SUBDIRS idl -- 2.39.2