View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014863CMakeCMakepublic2014-04-06 10:192016-06-10 14:31
ReporterStephen Kelly 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 3.1 
Target VersionFixed in Version 
Summary0014863: Can't use clang-on-windows with NMake Makefiles
Description
C:\QtDev\cmaketest\build>cmake .. -DCMAKE_CXX_COMPILER=clang++ -G"NMake Makefiles"
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: C:/Program Files (x86)/LLVM/bin/clang++.exe
-- Check for working CXX compiler: C:/Program Files (x86)/LLVM/bin/clang++.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "C:/Program Files (x86)/LLVM/bin/clang++.exe" is not able
  to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/QtDev/cmaketest/build/CMakeFiles/CMakeTmp



  Run Build Command:nmake /NOLOGO "cmTryCompileExec1964104424\fast"

        "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f
  CMakeFiles\cmTryCompileExec1964104424.dir\build.make /nologo -L
  CMakeFiles\cmTryCompileExec1964104424.dir\build

        "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report
  C:\QtDev\cmaketest\build\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building CXX object
  CMakeFiles/cmTryCompileExec1964104424.dir/testCXXCompiler.cxx.obj

        C:\PROGRA~2\LLVM\bin\CLANG_~1.EXE -o
  CMakeFiles\cmTryCompileExec1964104424.dir\testCXXCompiler.cxx.obj -c
  C:\QtDev\cmaketest\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx

  CLANG_~1.EXE: error: unable to execute command: program not executable

  CLANG_~1.EXE: error: assembler (via gcc) command failed with exit code 1
  (use -v to see invocation)

  NMAKE : fatal error U1077: "C:\PROGRA~2\LLVM\bin\CLANG_~1.EXE":
  Rⁿckgabe-Code "0x1"

  Stop.

  NMAKE : fatal error U1077: ""c:\Program Files (x86)\Microsoft Visual Studio
  10.0\VC\BIN\nmake.exe"": Rⁿckgabe-Code "0x2"

  Stop.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "C:/QtDev/cmaketest/build/CMakeFiles/CMakeOutput.log".
See also "C:/QtDev/cmaketest/build/CMakeFiles/CMakeError.log".

C:\QtDev\cmaketest\build>rd /s /q .
The process cannot access the file because it is being used by another process.

C:\QtDev\cmaketest\build>cmake .. -DCMAKE_CXX_COMPILER=clang-cl -G"NMake Makefiles"
-- The CXX compiler identification is Clang 3.4.0
-- Check for working CXX compiler: C:/Program Files (x86)/LLVM/bin/clang-cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/LLVM/bin/clang-cl.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "C:/Program Files (x86)/LLVM/bin/clang-cl.exe" is not able
  to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/QtDev/cmaketest/build/CMakeFiles/CMakeTmp



  Run Build Command:nmake /NOLOGO "cmTryCompileExec1509769548\fast"

        "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f
  CMakeFiles\cmTryCompileExec1509769548.dir\build.make /nologo -L
  CMakeFiles\cmTryCompileExec1509769548.dir\build

        "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report
  C:\QtDev\cmaketest\build\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building CXX object
  CMakeFiles/cmTryCompileExec1509769548.dir/testCXXCompiler.cxx.obj

        C:\PROGRA~2\LLVM\bin\clang-cl.exe -o
  CMakeFiles\cmTryCompileExec1509769548.dir\testCXXCompiler.cxx.obj -c
  C:\QtDev\cmaketest\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx

  clang-cl.exe: warning: argument unused during compilation: '-o
  CMakeFiles\cmTryCompileExec1509769548.dir\testCXXCompiler.cxx.obj'

  Linking CXX executable cmTryCompileExec1509769548.exe

        C:\PROGRA~2\LLVM\bin\clang-cl.exe
  "CMakeFiles\cmTryCompileExec1509769548.dir\testCXXCompiler.cxx.obj" -o
  cmTryCompileExec1509769548.exe

  clang-cl.exe: error: no such file or directory:
  'CMakeFiles\cmTryCompileExec1509769548.dir\testCXXCompiler.cxx.obj'

  clang-cl.exe: error: no input files

  NMAKE : fatal error U1077: "C:\PROGRA~2\LLVM\bin\clang-cl.exe":
  Rⁿckgabe-Code "0x1"

  Stop.

  NMAKE : fatal error U1077: ""c:\Program Files (x86)\Microsoft Visual Studio
  10.0\VC\BIN\nmake.exe"": Rⁿckgabe-Code "0x2"

  Stop.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "C:/QtDev/cmaketest/build/CMakeFiles/CMakeOutput.log".
See also "C:/QtDev/cmaketest/build/CMakeFiles/CMakeError.log".
Additional Informationc:\QtDev\cmake\build\bin\Debug\cmake.exe .. -T LLVM-vs2010

does work, but gives a lot of warnings about unused arguments:

Build succeeded.

"C:\QtDev\cmaketest\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\QtDev\cmaketest\build\cmaketest.vcxproj" (default target) (3) ->
(ClCompile target) ->
  clang-cl.exe : warning : argument unused during compilation: '/Zi' [C:\QtDev\
cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/Gm-' [C:\QtDev
\cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/EHsc' [C:\QtDe
v\cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/GS' [C:\QtDev\
cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/fp:precise' [C
:\QtDev\cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/Fdcmaketest.di
r\Debug\vc100.pdb' [C:\QtDev\cmaketest\build\cmaketest.vcxproj]
  clang-cl.exe : warning : argument unused during compilation: '/Gd' [C:\QtDev\
cmaketest\build\cmaketest.vcxproj]

    7 Warning(s)
    0 Error(s)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042529)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-04-06 10:19 Stephen Kelly New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042529
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team