Here's a minimal CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project(cmake_ep_test)
include(ExternalProject)
ExternalProject_Add(
gtest
SOURCE_DIR ${CMAKE_SOURCE_DIR}/../googletest
INSTALL_COMMAND ""
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
add_definitions(-include global/Include.h)
We call CMake with these two lines in a shell script:
cmake -G Xcode ..
cmake --build . --config Release
It turns out that call to add_definitions is key. It worked perfectly until we
added in the ExternalProject_Add. I don't understand why they interact, at all,
but they do.
The contents of the "googletest" directory are a copy of
http://googletest.googlecode.com/svn/trunk/, but I don't expect that's actually
relevant. The "-include" causes global/Include.h to be included at the
beginning of every source file, and I might try moving it to CMAKE_CXX_FLAGS as
a workaround.
Please let me know if I can provide any more information. I can send you a zip
file of the full set of logs, or the full directory with source and build
artifacts if that will be helpful (or I can file a bug and attach them there).
Just let me know.
Thank you for looking into this,
Todd Greer
Principal Scientist, Affinegy, Inc.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Bill Hoffman
Sent: Thursday, February 21, 2013 11:41 AM
To: [email protected]
Subject: Re: [CMake] Internal CMake error with ExternalProject_Add and XCode
On 2/21/2013 12:02 PM, Todd Greer wrote:
> 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.
Should work....
Can you give a small example that shows the problem?
-Bill
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake