On Thu, Oct 30, 2014 at 2:25 PM, Brad King <[email protected]> wrote:
> On 10/30/2014 01:55 PM, Richard Shaw wrote: > > I'm working on a big update to the FindFLTK module and I'm > > testing it on all platforms I have access to. > > > > One problem that took me quite a while to figure out was that > > on *nix systems, execute_process works with shell scripts but > > on my MSYS2 install it does not, I have to prefix the command > > with "sh" to make sure it executes in a shell. > > > > Is this known/expected? > > Yes. It is not execute_process, but the underlying operating > system process launching rules. A shell script starts in a > "shebang" (#!) line that the OS knows how to interpret to > decide what program to run to launch the script. Windows does > not know how to do this so we have to specify a shell explicitly. > MSYS is Windows, not POSIX/Cygwin. > I figured as much but wanted to verify. > Should I prefix shell scripts with "sh" in all cases and not > > count on it to work? Or should I test for MSYS and only prefix > > the command with "sh" there? > > Using 'sh' should be safe. Good to know. Thanks! Richard
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
