From: Azat Khuzhin Date: Tue, 25 Oct 2016 21:51:56 +0000 (+0300) Subject: cmake/win32: fix running regress, but fixing finding python2 interpreter X-Git-Tag: release-2.1.7-rc~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bcb990ab7cf4921c2c30a1aa4fcb4c0131fffe94;p=libevent 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 --- 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)