我試圖從Insight Toolkit(ITK,itk.org)製作一個Xcode項目。我發出以下命令到終端:CMake 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。
感謝您的幫助,
保羅
我們嘗試構建cmake v2.8.7-860-g32e0b19和v2.8.7-3470-g19f003f(在2012-04-18之前,git://cmake.org/cmake.git的主控和旁邊),但沒有工作,顯示確切的錯誤。那就是XCode 4.2,報告甚至不適用。 – 2012-04-18 14:08:12
這似乎是在2.8.10中修復的。 – kjw0188 2013-03-14 22:44:59