]> granicus.if.org Git - libevent/commitdiff
cmake/win32: fix running regress, but fixing finding python2 interpreter
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 25 Oct 2016 21:51:56 +0000 (00:51 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 25 Oct 2016 22:41:07 +0000 (01:41 +0300)
  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
CMakeLists.txt

index 081f24110e1d0e5c6edb357e6aba80446b533899..ac50dd861233be9050a737f07b9d7275cc528b78 100644 (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)