From bcb990ab7cf4921c2c30a1aa4fcb4c0131fffe94 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 26 Oct 2016 00:51:56 +0300 Subject: [PATCH] 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 --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 081f2411..ac50dd86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)