[cmake-developers] [CMake 0015760]: Generating project files fails, if compiler path has spaces

Mantis Bug Tracker mantis at public.kitware.com
Mon Sep 28 05:43:24 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15760 
====================================================================== 
Reported By:                leandros
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15760
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-09-28 05:43 EDT
Last Modified:              2015-09-28 05:43 EDT
====================================================================== 
Summary:                    Generating project files fails, if compiler path has
spaces
Description: 
Generating Unix Makefiles fails, if the compiler path has a space. 

/usr/bin/clang and /usr/bin/clang++ are not symlinked. 

$ CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -G "Unix Makefiles" ..
-- The C compiler identification is AppleClang 7.0.0.7000072
-- The CXX compiler identification is AppleClang 7.0.0.7000072
-- Check for working C compiler: /Applications/Xcode
7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode
7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --
broken
CMake Error at
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/CMakeTestCCompiler.cmake:61
(message):
  The C compiler "/Applications/Xcode
  7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir:
/Users/arvidgerstmann/cocos2d-x-3.6/external/flatbuffers/build/CMakeFiles/CMakeTmp



  Run Build Command:"/usr/bin/make" "cmTC_d0237/fast"

  /Applications/Xcode 7.app/Contents/Developer/usr/bin/make -f
  CMakeFiles/cmTC_d0237.dir/build.make CMakeFiles/cmTC_d0237.dir/build

  make: /Applications/Xcode: No such file or directory

  make: *** [cmTC_d0237/fast] Error 1





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



CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.3)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "<redacted>/build/CMakeFiles/CMakeOutput.log".
See also "<redacted>/build/CMakeFiles/CMakeError.log".

Steps to Reproduce: 
- Rename "Xcode.app" to "Xcode Test.app"
- Run "sudo xcode-select -switch /Applications/Xcode\ Test.app
- Run cmake, with "Unix Makefiles" generator

Additional Information: 
The "Xcode" generator seems to work, I just have to specify the
"CMAKE_C_COMPILER" and "CMAKE_CXX_COMPILER" defines, due to cmake not yet
supporting Xcode 7 (? works fine with 6).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-09-28 05:43 leandros       New Issue                                    
======================================================================



More information about the cmake-developers mailing list