Unix Makefiles vs Windows paths...
(Tested against CMake 3.8.2, prebuilt binary downloaded from cmake.org.)
When attempting to build with Mingw64, a Windows path with a drive letter on it will confuse GNU Make, producing a misleading error message. Here's a simplified test case based on one I stumbled across in real project:
cmake_minimum_required(VERSION 3.2)
project(brokenmake)
find_library(PTHREAD_LIBRARY pthread)
add_executable(brokenmake brokenmake.c)
target_link_libraries(brokenmake ${PTHREAD_LIBRARY})
Just make a zero-byte file named "brokenmake.c" and run CMake like this:
cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc .
CMake succeeds, but running "make" afterwards produces this error:
CMakeFiles/brokenmake.dir/build.make:93: *** target pattern contains no '%'. Stop.
The problem is this line in build.make:
brokenmake.exe: C:/cygwin/lib/libpthread.a
The ':' confuses GNU Make; it needs to be escaped...
brokenmake.exe: C\:/cygwin/lib/libpthread.a
...and then GNU Make works fine with this makefile (rather: it compiles and fails to link without a WinMain(), but GNU Make did the right thing at that point.)
I guess the Unix Makefile generator needs to check files for special characters (space, :, $, a few others?) and escape as appropriate?
--ryan.