Re: [PATCH 02/10] cmake: do find Git for Windows' shell interpreter
- From
Sibi Siddharthan <sibisiddharthan.github@gmail.com>
- Date
- Sep 25, 2020, 16:25 UTC
- Message-ID
- <CAKiG+9V=BGX4k_dM-5JzYmko0cZfYXuSxEk5-UuHZpAqaWoU_A@mail.gmail.com>
- In-Reply-To
- <05b4b69fee2b8c32769dd72dea182cfb72a14876.1601044118.git.gitgitgadget@gmail.com>
Show 17 quoted lines
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index 5007f173f1..d14fa4f3dc 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -43,8 +43,11 @@ set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
>
> find_program(SH_EXE sh)
> if(NOT SH_EXE)
> - message(FATAL_ERROR "sh: shell interpreter was not found in your path, please install one."
> - "On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/")
> + set(SH_EXE "C:/Program Files/Git/bin/sh.exe")
> + if(NOT EXISTS ${SH_EXE})
> + message(FATAL_ERROR "sh: shell interpreter was not found in your path, please install one."
> + "On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/")
> + endif()
> endif()
>Let's not point SH_EXE to the 'program files' directory. find_program() searches 'PATH' for sh. Since the Git-for-windows installer does append 'your_installation_directory'/Git/bin to the PATH variable, it should be fine.
I personally don't install my dev tools(except Visual Studio) to Program Files(because of the _space_), it messes up the Makefiles.
Thank You, Sibi Siddharthan