![]() It’s not the best solution, especially because a problem with GIT after renaming sh.exe to any different file (git submodule doesn’t work without sh.exe), but for some edge cases I can see that removing problematic folder from system PATH can work. Rename sh.exe or remove a folder that holds it from system PATH. This observation leads to the Solution 1, but before that there is one simple method: For Windows: it’s a value from COMSPEC System Environment Variable. If it’s not specified then an internal logic is used to determine what to use. When the variable is specified then it’s used what’s defined. It can be defined by a local variable SHELL(What CMake does). The root of the problem is a default command processor (shell) what’s used by GNU Make. Void cmState::SetWindowsShell(bool windowsShell)Īnd according to git search results, it is set only for generators:Īnd It’s defaulted to false by cmGlobalGenerator.cxx MakefileStream GetState()->UseWindowsShell() If we will check the sources of CMake, we can see: // It’s due a cross platform solutions and simplification of tools and CI configurations – this way is just simpler. You might wounder: Why you use Unix Makefiles instead of MSYS Makefiles or MinGW Makefiles? Glad you’ve asked. In case of CMake when Unix Makefiles is used as a generator, then CMake sets a problematic variable (described below) automatically. If the Condition 4 is satisfied, the problem is slightly harder to control. I just love to use ‘ls’ instead of ‘dir’ in command line. Why sh.exe on Windows? To me it was a natural ripple effect of having Git installed with Linux like tools in system PATH. You use CMake for a project generation.Ĭonditions 1 and 2 are pretty easy to fulfill, for the instance you try to compile Emscripten or Android based project.You have available sh.exe as a system command.Your project uses make as a base build system. ![]() In order to be trapped by this problem your project / environment has to meet following conditions:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |