summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/execute_process/LastCommandAbnormalExit-2.cmake
blob: b87e0f7ba2967b08c6c694257b4b35339ed129e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
execute_process(COMMAND ${CMAKE_COMMAND} -E true
  COMMAND "${PYTHON_EXECUTABLE}" -c
    "import os; os.kill(os.getpid(),11)"
  RESULT_VARIABLE result
  )

if(NOT result EQUAL "0")
  execute_process(COMMAND ${CMAKE_COMMAND} -E true
    COMMAND "${PYTHON_EXECUTABLE}" -c
      "import os; os.kill(os.getpid(),11)"
    COMMAND_ERROR_IS_FATAL LAST
    )
endif()