kelvin-li / ios-cmake

Automatically exported from code.google.com/p/ios-cmake
0 stars 0 forks source link

compilers not found with cmake-3 #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. configure the hello-lib with the latest cmake-3.0 snapshot

~/dev/cmake/bin/cmake -DCMAKE_TOOLCHAIN_FILE=../../../toolchain/iOS.cmake 
-DIOS_PLATFORM=OS -GXcode ..

What is the expected output? What do you see instead?

output with cmake-3.0:
-------------------------------------------------------------------------
-- Toolchain using default iOS SDK: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS7.1.sdk
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    g++

  is not a full path and was not found in the PATH.

CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_C_COMPILER:

    gcc

  is not a full path and was not found in the PATH.

-- Configuring incomplete, errors occurred!
See also 
"/Users/tim/dev/ios-cmake/samples/hello-lib/b/CMakeFiles/CMakeOutput.log".
-------------------------------------------------------------------------

output with cmake-2.8:
-------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: 
/Users/tim/dev/ios-cmake/samples/hello-lib/b
-------------------------------------------------------------------------

What version of the product are you using? On what operating system?

hg checkout:  12:dd7a50cd8abc
osx: 10.9.2

Original issue reported on code.google.com by tim.klin...@gmail.com on 13 Apr 2014 at 8:48

GoogleCodeExporter commented 8 years ago
the project seems to be outdate there has been some changes now you have to 
install XCode as an application from the App Store so the sdks are not longer 
under the /Developer directory.

You have to open the file iOS.cmake and make the following change:

<   set (CMAKE_IOS_DEVELOPER_ROOT 
"/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
---
>   set (CMAKE_IOS_DEVELOPER_ROOT 
"/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/D
eveloper")

I still have some problems since building the generated project ends succesfuly 
but no *.a file is being generated.

Original comment by leon.moc...@gmail.com on 25 Apr 2014 at 4:28

GoogleCodeExporter commented 8 years ago
I had to pass absolute paths to clang compilers to get cmake3 generating an 
Xcode project. The attached file is a patch of my local changes.

Original comment by go.cuevo...@gmail.com on 1 Jul 2014 at 3:39

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed as of rev:13

Original comment by wizzr...@gmail.com on 24 Jul 2014 at 8:51

GoogleCodeExporter commented 8 years ago
I am having problems passing the absolute paths to the clang compilers using 
the diff file.  I'm getting the error:

CMake Error at CMakeLists.txt:11 (project):
  The CMAKE_C_COMPILER:

    /usr/bin/clang

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name
  if it is in the PATH.

CMake Error at CMakeLists.txt:11 (project):
  The CMAKE_CXX_COMPILER:

    /usr/bin/clang++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler
  name if it is in the PATH.

This is really weird because when using command which clang it brings the exact 
path that cmake believes is not an absolute path.  

Does anyone know why this is happening?

Original comment by mytext...@gmail.com on 29 Aug 2014 at 7:55