From: bruneton Date: Wed, 10 Jul 2013 08:09:56 +0000 (+0000) Subject: CMake: generating a fatal error if the wrapping Python script cannot run X-Git-Tag: V7_3_0a1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c94169d65634cf1bb1a4de49e9f399570f36d52b;p=modules%2Fparavis.git CMake: generating a fatal error if the wrapping Python script cannot run --- 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