[CMake] A curiosity: cmake detects the wrong compiler when -g is used instead of -G

Tyler Roscoe tyler at cryptio.net
Sun Aug 16 15:41:05 EDT 2009


On Sun, Aug 16, 2009 at 09:27:50PM +0200, Óscar Fuentes wrote:
> `cl' is *not* on the PATH. If I invoke it from the same command line the
> shell says that there is no such executable.
> 
> Please note the -g parameter instead of -G:
> 
> D:\dev\idb-llvm\lp0\build\mingw\debug>cmake -g "MinGW Makefiles" -DLLVM_ROOT=d:/dev/llvm/svnDebugMinGW44 -DCMAKE_BUILD_TYPE=Debug ../../..
> -- Check for working C compiler: cl
> -- Check for working C compiler: cl -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: cl
> -- Check for working CXX compiler: cl -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- /INCREMENTAL:NO
> -- Configuring done
> -- Generating done
> -- Build files have been written to:
> D:/dev/idb-llvm/lp0/build/mingw/debug

One of the platform files probably knows how to guess where cl.exe is.
You can inspect the Windows platform .cmake file to figure out exactly
how.

tyler


More information about the CMake mailing list