cmake/win32: fix running regress, but fixing finding python2 interpreter

Could not find executable C:/projects/libevent/build/bin/regress
  Looked in the following places:
  C:/projects/libevent/build/bin/regress
  C:/projects/libevent/build/bin/regress.exe
  ...
   9/13 Test  #9: regress__WIN32_debug ................***Not Run   0.00 sec

Link: https://ci.appveyor.com/project/nmathewson/libevent/build/2.1.6.271/job/wvy2jp7uojcut5cx#L1256
Fixes: #411
This commit is contained in:
Azat Khuzhin 2016-10-26 00:51:56 +03:00
parent 236161611f
commit bcb990ab7c

View File

@ -944,7 +944,10 @@ if (NOT EVENT__DISABLE_TESTS)
if (NOT EVENT__DISABLE_REGRESS)
# (We require python to generate the regress tests)
set(PYTHON_EXECUTABLE "python2")
find_program(FIND_PYTHON2 python2)
if (FIND_PYTHON2)
set(PYTHON_EXECUTABLE "python2")
endif()
find_package(PythonInterp)
if (PYTHONINTERP_FOUND)