[CMake] Internal CMake error with ExternalProject_Add and XCode

Todd Greer TGreer at affinegy.com
Thu Feb 21 12:02:40 EST 2013


I'm having difficulty getting ExternalProject_Add to work with XCode. It appears to be a CMake bug, and I'll file it if no one corrects me. I've been unable to find any other reports of this issue.

Specifically, I'm getting the following error:

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)

CMake Error: Internal CMake error, TryCompile configure of cmake failed

This is in a log file pointed to by this error in the main project flow:

CMake Error at /Users/Shared/jenkins/Home/workspace/Mac Agent Branch/build/gtest-prefix/src/gtest-stamp/gtest-configure.cmake:17 (message):
  Command failed: 1

   '/Applications/CMake 2.8-10.app/Contents/bin/cmake' '-Dgtest_force_shared_crt=ON' '-GXcode' '/Users/Shared/jenkins/Home/workspace/Mac Agent Branch/googletest'

Has anyone seen this before? Looking at CMakeCInformation.cmake:37, it looks like it couldn't find the compiler, which makes me suspect the '-GXcode' isn't being handled properly. Does CMake require a space there?

My ExternalProject_Add command looks like this:

ExternalProject_Add(
  gtest
  SOURCE_DIR ${googletest_dir}
  CMAKE_ARGS -Dgtest_force_shared_crt=ON
  INSTALL_COMMAND ""
  LOG_DOWNLOAD ON
  LOG_CONFIGURE ON
  LOG_BUILD ON)

Any suggestions are appreciated.

Thank you,
Todd

--
Todd Greer
Principal Scientist, Affinegy, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130221/36684d67/attachment.htm>


More information about the CMake mailing list