[CMake] "Un-program" Visual Studio (msvc 10) compiler in cygwin
Rolf Eike Beer
eike at sf-mail.de
Wed Oct 12 05:34:34 EDT 2011
> Hi
> I have tried different ways to escape the MSVC compiler.
> I have installed Cygwin on Windows 7 and try this out in Cygwin
> I tried to
> - set CMAKE_CC_COMPILER=compiler.exe in CMakeLists.txt (before project())
> - cmake.exe -D CMAKE_CC_COMPILER=compiler.exe .
> - cmake.exe -D CMAKE_CC_COMPILER=/c/compiler/compiler.exe .
> But when cmake.exe is executed, it finds the MSVC compiler:
> $ which compiler.exe
> /c/compiler/compiler.exe
> $ cat cmake.sh
> cmake.exe -D CMAKE_C_COMPILER=compiler.exe .
> $ ./cmake.sh
> -- Building for: Visual Studio 10
> -- ...
>
> Is it because I don't include -G "My generator"? if so what is included in
> a generator?
If you don't provide a generator CMake will pick a default one. Which is
very likely a MSVC one if you have MSVC installed. If you run "cmake
--help" it will print you a list of valid generators at the end.
Eike
More information about the CMake
mailing list