1 # Copyright (C) 2018-2019 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Following changes were done on top of original file:
16 # Add CYTHON_EXECUTABLE searching hints at lines 50 and 51
18 #=============================================================================
19 # Copyright 2011 Kitware, Inc.
21 # Licensed under the Apache License, Version 2.0 (the "License");
22 # you may not use this file except in compliance with the License.
23 # You may obtain a copy of the License at
25 # http://www.apache.org/licenses/LICENSE-2.0
27 # Unless required by applicable law or agreed to in writing, software
28 # distributed under the License is distributed on an "AS IS" BASIS,
29 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 # See the License for the specific language governing permissions and
31 # limitations under the License.
32 #=============================================================================
33 # Find the Cython compiler.
35 # This code sets the following variables:
39 # See also UseCython.cmake
40 # Use the Cython executable that lives next to the Python executable
41 # if it is a local installation.
42 find_package( PythonInterp )
43 if( PYTHONINTERP_FOUND )
44 get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
45 find_program( CYTHON_EXECUTABLE
46 NAMES cython cython.bat cython3
47 HINTS ${_python_path} $ENV{HOME}/.local/bin
50 find_program( CYTHON_EXECUTABLE
51 NAMES cython cython.bat cython3
56 include( FindPackageHandleStandardArgs )
57 FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
59 mark_as_advanced( CYTHON_EXECUTABLE )