I am attempting to run CMake and use clang for the compiler.  I am on
Windows 8.1.  It seems to me that if CMake used gcc flags instead of vc++
flags that this would work.  Any ideas how I can make this work?

I use the following command:

cmake -DCMAKE_C_COMPILER=clang.exe DCMAKE_CXX_COMPILER=clang++.exe
-DCMAKE_RC_COMPILER=rc.exe -G
"Ninja" ../llvm

When it attempts to test the compiler I get the following results:

  Run Build Command:"d:/llvm/ninja/ninja.exe" "cmTryCompileExec2377752233"
  [1/2] Building C object
  CMakeFiles\cmTryCompileExec2377752233.dir\testCCompiler.c.obj
  FAILED: d:\llvm\build\Release\bin\clang.exe /nologo /DWIN32 /D_WINDOWS /W3
  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /showIncludes
  /FoCMakeFiles\cmTryCompileExec2377752233.dir\testCCompiler.c.obj
  /FdCMakeFiles\cmTryCompileExec2377752233.dir\ -c testCCompiler.c
  clang.exe: error: no such file or directory: '/nologo'
  clang.exe: error: no such file or directory: '/DWIN32'
  clang.exe: error: no such file or directory: '/D_WINDOWS'
  clang.exe: error: no such file or directory: '/W3'
  clang.exe: error: no such file or directory: '/D_DEBUG'
  clang.exe: error: no such file or directory: '/MDd'
  clang.exe: error: no such file or directory: '/Zi'
  clang.exe: error: no such file or directory: '/Ob0'
  clang.exe: error: no such file or directory: '/Od'
  clang.exe: error: no such file or directory: '/RTC1'
  clang.exe: error: no such file or directory: '/showIncludes'
  clang.exe: error: no such file or directory:
  '/FoCMakeFiles\cmTryCompileExec2377752233.dir\testCCompiler.c.obj'
  clang.exe: error: no such file or directory:
  '/FdCMakeFiles\cmTryCompileExec2377752233.dir\'
  ninja: build stopped: subcommand failed.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to