我正在尝试从 Insight Toolkit(ITK,itk.org)制作一个 Xcode 项目。我向终端发出了以下命令:
ccmake -DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -GXcode /<path to source>
当我尝试生成项目时,它失败并出现以下错误:
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/Applications/Xcode.app/Contents/Developer/usr/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /<path to destination folder>/CMakeFiles/CMakeTmp
Run Build Command:/Applications/CMake\ 2.8-7.app/Contents/bin/cmakexbuild -project CMAKE_TRY_COMPILE.xcode build -target cmTryCompileExec -buildstyle Development
xcodebuild: error: option '-buildstyle' is no longer supported
如何配置对 cmakexbuild 的调用?我没有在 CMake 配置菜单中找到相应的条目。
我从其他项目的其他用户那里发现了类似的问题,所以我认为这是 CMake 配置的问题。
我在 Mac OS X Lion 10.7.3 上使用 Xcode 4.3 和 CMake 2.8.7。
谢谢你的帮助,
保罗