Cygwin/ARM cross-compile cmake not able to compile a simple test program
I've been struggling with this all day. Under cygwin I get the result shown below. I tried a DOS command line approach as well with the same result. As near as I can tell, the scratch directories and their contents (cmTC_f7cac.dir in the example below) never get created, so when the compiler is called it complains that there is nothing to compile (fatal error: no input files).
Any help in getting past this would be greatly appreciated.
$ cmake -DCMAKE_C_COMPILER="/cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-gcc.exe" -DCMAKE_CXX_COMPILER="/cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++.exe" -DCMAKE_AR="/cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-ar.exe" -DCMAKE_TOOLCHAIN_FILE=/cygdrive/c/lib/opencv/sources/platforms/linux/arm-gnueabi.toolchain.cmake /cygdrive/c/lib/opencv/sources -- The CXX compiler identification is GNU 4.8.2 -- The C compiler identification is GNU 4.8.2 -- Check for working CXX compiler: /cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++.exe -- Check for working CXX compiler: /cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++.exe -- broken CMake Error at /usr/share/cmake-3.3.2/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "/cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_f7cac/fast"
/usr/bin/make -f CMakeFiles/cmTC_f7cac.dir/build.make CMakeFiles/cmTC_f7cac.dir/build
make[1]: Entering directory '/cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f7cac.dir/testCXXCompiler.cxx.o
"/cygdrive/c/Program Files (x86)/Linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++.exe" -mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi -mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi -o CMakeFiles/cmTC_f7cac.dir/testCXXCompiler.cxx.o -c /cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
arm-linux-gnueabihf-g++.exe: error: /cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeTmp/testCXXCompiler.cxx: No such file or directory
arm-linux-gnueabihf-g++.exe: fatal error: no input files
compilation terminated.
CMakeFiles/cmTC_f7cac.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_f7cac.dir/testCXXCompiler.cxx.o' failed
make[1]: Leaving directory '/cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeTmp'
make[1]: * [CMakeFiles/cmTC_f7cac.dir/testCXXCompiler.cxx.o] Error 1
Makefile:126: recipe for target 'cmTC_f7cac/fast' failed
make: * [cmTC_f7cac/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:88 (project)
-- Configuring incomplete, errors occurred! See also "/cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeOutput.log". See also "/cygdrive/c/lib/opencv/sources/platforms/linux/build_hardfp/CMakeFiles/CMakeError.log".