Skip to content

Commit

Permalink
Added conditional verification to python executable. (#500)
Browse files Browse the repository at this point in the history
Summary:
Added conditional verification to python executable to search for python instead of python3 on Windows.

This code without this modification is searching for python as python3.exe in Windows, but in the OS, python is installed as python.exe, what cause an incorrect python not found.

Issue: #499

Pull Request resolved: #500

Reviewed By: kvtsoy

Differential Revision: D62987053

Pulled By: afrind

fbshipit-source-id: fb21d711483b350d0b86b481cf876c95b82334e0
  • Loading branch information
bmarques1995 authored and facebook-github-bot committed Sep 18, 2024
1 parent 3762e08 commit 1ef112a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ set(PROXYGEN_GENERATED_ROOT ${CMAKE_CURRENT_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${PROXYGEN_GENERATED_ROOT})

# Build-time program requirements.
find_program(PROXYGEN_PYTHON python3)
if(WIN32)
find_program(PROXYGEN_PYTHON python)
else()
find_program(PROXYGEN_PYTHON python3)
endif()

if(NOT PROXYGEN_PYTHON)
message(FATAL_ERROR "python is required for the proxygen build")
endif()
Expand Down

0 comments on commit 1ef112a

Please sign in to comment.