File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,10 +34,14 @@ endif()
3434set (CMAKE_INCLUDE_CURRENT_DIR ON )
3535
3636if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off" )
37- find_package (PythonInterp )
38- if (NOT ${PYTHONINTERP_FOUND} )
39- message (WARNING "No python interpreter found. Therefore, the match compiler is switched off." )
40- set (USE_MATCHCOMPILER_OPT "Off" )
37+ find_package (PythonInterp 3 QUIET )
38+ if (NOT PYTHONINTERP_FOUND)
39+ set (PYTHONINTERP_FOUND "" )
40+ find_package (PythonInterp 2.7 QUIET )
41+ if (NOT PYTHONINTERP_FOUND)
42+ message (WARNING "No python interpreter found. Therefore, the match compiler is switched off." )
43+ set (USE_MATCHCOMPILER_OPT "Off" )
44+ endif ()
4145 endif ()
4246endif ()
4347
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ if (HAVE_RULES)
4747 message ( STATUS "PCRE_LIBRARY = ${PCRE_LIBRARY} " )
4848endif ()
4949message ( STATUS )
50+ if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off" )
51+ message ( STATUS "PYTHON_VERSION_STRING = ${PYTHON_VERSION_STRING} " )
52+ message ( STATUS "PYTHON_EXECUTABLE = ${PYTHON_EXECUTABLE} " )
53+ endif ()
54+ message ( STATUS )
5055message ( STATUS "USE_Z3 = ${USE_Z3} " )
5156if (USE_Z3)
5257 message ( STATUS "Z3_LIBRARIES = ${Z3_LIBRARIES} " )
Original file line number Diff line number Diff line change @@ -254,9 +254,9 @@ int main(int argc, char **argv)
254254 << " endif\n " ;
255255 fout << " ifeq ($(MATCHCOMPILER),yes)\n "
256256 << " # Find available Python interpreter\n "
257- << " PYTHON_INTERPRETER := $(shell which python )\n "
257+ << " PYTHON_INTERPRETER := $(shell which python3 )\n "
258258 << " ifndef PYTHON_INTERPRETER\n "
259- << " PYTHON_INTERPRETER := $(shell which python3 )\n "
259+ << " PYTHON_INTERPRETER := $(shell which python )\n "
260260 << " endif\n "
261261 << " ifndef PYTHON_INTERPRETER\n "
262262 << " $(error Did not find a Python interpreter)\n "
You can’t perform that action at this time.
0 commit comments