/usr/lib/cmake/paraview/TestNumPy.cmake is in paraview-dev 4.0.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # This script detects whether numpy is present in the system
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE}
-c
"
import os
import sys
# prevents dashboard from truncating output of this test.
# print >> sys.stderr, \"Enabling CTEST_FULL_OUTPUT\"
# print >> sys.stderr, \"Checking NUMPY...\"
try:
import numpy
numpy.__version__
# print >> sys.stderr, numpy.__version__
# print >> sys.stderr, \"----> import numpy WORKS!\"
except ImportError:
# print >> sys.stderr, \"----> import numpy FAILED.\"
os._exit(0)
os._exit(1)
"
RESULT_VARIABLE HAS_NUMPY
)
# Doing the HAS_NUMPY string comparison everytime is annoying. Hence setting up
# this FOUND_NUMPY variable.
set (FOUND_NUMPY FALSE)
if ("1" STREQUAL ${HAS_NUMPY})
set (FOUND_NUMPY TRUE)
endif()
|