I have a project which was previously linux only in makefile.
I have successfully migrated it to cmake and that works fine, it compiles in pure linux (makefile --> so) and pure windows (visual studio --> dll) with no issue. It also compiles fine on linux for windows (using mingw --> dll).
However, for integration and script compatibility issues, I have to generate and build the code for windows (dll) but on a cygwin environment (with cygwin's gcc providing a dll), like the old makefile used to do. (I have to do this way, due to external constraints)
I have installed both "make" and "cmake" packages on my cygwin.
When I try to generate a makefile in the cygwin console, it gets stuck:
$ cmake -G "Unix Makefiles" ../Sources
[ -- misc CMake prints from my CMakeLists.txt -- ]
-- Configuring done
[ -- stuck - nothing happens here -- ]
When I stop it (ctrl-C), it says nothing and the "Makefile" file is present in my build directory, so I try and compile it:
$ make
[ -- misc CMake prints from my CMakeLists.txt -- ]
-- Configuring done
[ -- stuck - nothing happens here -- ]
It seems to be re-generating all all over again (I get my cmake prints again, the Makefile file disappears then reappears and the command gets stuck at the same stage again).
This time, when I stop it, it prints the following message:
$ make
[ -- misc CMake prints from my CMakeLists.txt -- ]
-- Configuring done
make: *** [Makefile:224: cmake_check_build_system] Interrupt
I've tried to look up the Makefile and it seems to be the following command that blocks:
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check- build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
I searched and found this thread, so it seems to just be a way to set the directories. I've tried running it manually and the result is the same:
$ cmake -H../Sources -B. --check-build-system CMakeFiles/Makefile.cmake 0
[ -- misc CMake prints from my CMakeLists.txt -- ]
-- Configuring done
[ -- stuck - nothing happens here -- ]
I don't know what I'm doing wrong and I'm stuck, could someone help me?
Edit: running make in verbose mode gives a little more information:
$ make VERBOSE=1
/usr/bin/cmake.exe -H/cygdrive/e/Projects/MyProject/Sources -B/cygdrive/e/Projects/MyProject/Build_Cygwin --check-build-system CMakeFiles/Makefile.cmake 0
Re-run cmake: build system dependency is missing
[ -- misc CMake prints from my CMakeLists.txt -- ]
-- Configuring done