diff options
-rw-r--r-- | .appveyor.yml | 1 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | cmake/setup_build.cmake | 24 | ||||
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/effcee-example-driver.py | 2 |
5 files changed, 6 insertions, 27 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 6fb6bc5..20b9447 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -29,6 +29,7 @@ matrix: install: - git clone --depth=1 https://github.com/google/googletest.git third_party/googletest - git clone --depth=1 https://github.com/google/re2.git third_party/re2 + - set PATH=c:\Python36;%PATH% before_build: - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64) @@ -126,7 +126,7 @@ for more information. See also the [`AUTHORS`](AUTHORS) and Effcee depends on the [RE2][RE2] regular expression library. -Effcee tests depend on [Googletest][Googletest] and [Python][Python]. +Effcee tests depend on [Googletest][Googletest] and [Python 3][Python]. In the following sections, `$SOURCE_DIR` is the directory containing the Effcee source code. @@ -229,7 +229,7 @@ installed regardless of your OS: - A compiler supporting C++11. - [CMake][CMake]: for generating compilation targets. -- [Python][Python]: for a test script. +- [Python 3][Python]: for a test script. On Linux, if cross compiling to Windows: - [MinGW][MinGW]: A GCC-based cross compiler targeting Windows diff --git a/cmake/setup_build.cmake b/cmake/setup_build.cmake index 40749fc..9867de9 100644 --- a/cmake/setup_build.cmake +++ b/cmake/setup_build.cmake @@ -12,35 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -# For cross-compilation, we need to use find_host_package -# in the remaining setup. But if not cross-compiling, then we -# need to alias find_host_package to find_package. -# Similar for find_host_program. if(NOT COMMAND find_host_package) macro(find_host_package) find_package(${ARGN}) endmacro() endif() -if(NOT COMMAND find_host_program) - macro(find_host_program) - find_program(${ARGN}) - endmacro() -endif() - -if (ANDROID) - # For android let's preemptively find the correct packages so that - # child projects (e.g. googletest) do not fail to find them. - find_host_package(PythonInterp) -endif() -foreach(PROGRAM echo python) - string(TOUPPER ${PROGRAM} PROG_UC) - if (ANDROID) - find_host_program(${PROG_UC}_EXE ${PROGRAM} REQUIRED) - else() - find_program(${PROG_UC}_EXE ${PROGRAM} REQUIRED) - endif() -endforeach(PROGRAM) +find_host_package(PythonInterp 3 REQUIRED) option(DISABLE_RTTI "Disable RTTI in builds") if(DISABLE_RTTI) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 32cdd29..3072df0 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -13,7 +13,7 @@ endif(WIN32 AND NOT MSVC) if(EFFCEE_BUILD_TESTING) add_test(NAME effcee-example - COMMAND ${PYTHON_EXE} + COMMAND ${PYTHON_EXECUTABLE} effcee-example-driver.py $<TARGET_FILE:effcee-example> example_data.txt diff --git a/examples/effcee-example-driver.py b/examples/effcee-example-driver.py index e1b0eff..6c60bfb 100644 --- a/examples/effcee-example-driver.py +++ b/examples/effcee-example-driver.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 The Effcee Authors. # |