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

Óscar Fuentes ofv at wanadoo.es
Sun Aug 16 15:27:50 EDT 2009


This held me confused for 15 minutes or so.

I'm on windows with Mingw's bin directory as the first item on PATH.

`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

-- 
Óscar



More information about the CMake mailing list