MantisBT - CMake
View Issue Details
0015760CMakeCMakepublic2015-09-28 05:432016-06-10 14:31
leandros 
Kitware Robot 
normalmajoralways
closedmoved 
Apple Mac OS XOS X Yosemite10.10.4
CMake 3.3.2 
 
0015760: Generating project files fails, if compiler path has spaces
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".
- Rename "Xcode.app" to "Xcode Test.app"
- Run "sudo xcode-select -switch /Applications/Xcode\ Test.app
- Run cmake, with "Unix Makefiles" generator
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).
No tags attached.
Issue History
2015-09-28 05:43leandrosNew Issue
2015-09-28 08:59Brad KingNote Added: 0039485
2015-09-28 09:08leandrosNote Added: 0039486
2016-06-10 14:29Kitware RobotNote Added: 0042845
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039485)
Brad King   
2015-09-28 08:59   
This may be possible to fix but you can work around it by just not renaming Xcode.app to have a space in its name. Use "Xcode-7.app" instead.
(0039486)
leandros   
2015-09-28 09:08   
Sure, that's what I did. Should be fixed anyway.
(0042845)
Kitware Robot   
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.