]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
CMake: generating a fatal error if the wrapping Python script cannot run
authorbruneton <bruneton>
Wed, 10 Jul 2013 08:09:56 +0000 (08:09 +0000)
committerbruneton <bruneton>
Wed, 10 Jul 2013 08:09:56 +0000 (08:09 +0000)
CMakeLists.txt

index c1690f5c6e6b0d5aeacb913043c5b4cff143732c..570b15cad1e2e356b09b960c3a0680aa3196ebed 100644 (file)
@@ -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