[CMake] Building a tool to run on the host when cross-compiling

Christopher Lansing c.lansing at gmail.com
Tue Jan 22 11:15:38 EST 2013


Hi Pat,

How do you manage to deal with situations where the build environment runs
the ExternalProject's configuration via cmake and has environment variables
set that wouldn't have been otherwise (and that you don't want set) - for
example, Visual Studio sets half a dozen new environment variables and
modifies the path before running its build steps. Are you just figuring out
all of the CMake variables and properties that are affected by environment
variables, and presetting them in the cache? Or is there a way to avoid
this that I just haven't managed to find yet?

I've seen cases where the result of running CMake on a project, and using
the same project as an ExternalProject are rather different - I'll admit
it's largely a guess that it's a difference in the environment variables on
the shell vs through the build environment/tool, but it's the only thing
that seems to make sense.

Or do you just avoid this by never using the more complex build
environments, sticking to make, and hoping it doesn't do anything strange
to your environment before calling the external project (because I don't
think I've seen this behaviour with make).

Thanks,
Christopher

On Tue, Jan 22, 2013 at 3:26 AM, Pat Marion <pat.marion at kitware.com> wrote:

> Hi Bill,
>
> We use ExternalProject on the VES project to manage crosscompile builds.
> We use ExternalProject to create builds for the host, Android, iOS-device,
> and iOS-simulator architectures.
>
> Pat
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130122/86144726/attachment-0001.htm>


More information about the CMake mailing list