[Cmake] Multiplatform build in a shared source code tree ???

Kenneth D. Weinert Ken.Weinert at ihs.com
Wed Feb 5 08:41:50 EST 2003


On Wed, 5 Feb 2003 14:21:16 +0100
"Pampel, Holger (Holger)" <hpampel at lucent.com> wrote:

> CMakers,
> 
> CMake seems not to allow to share the built tree for multiple platforms
> as objects are stored directly in the source directories or (for MSVC in
> a common top level dir). Has anyone out there a practical solution for
> my problem or do I really have to create separate build trees for each
> platform ? The 18-page manual does not explain, how to go ahead with this ...

CMake does it a bit different than you have it currently. If you were
to do the following:

	mkdir i686
	cd i686
	cmake ..

then all of the platform specific stuff would be created in that
directory and you can compile from within there.

There are some CMake macros that help determine the system you're
on. I've attached an expansion to CMakeDetermineSystem since in my
environment I have to support SunOS both on sparc and on i386
architecture. I basically copied CMakeDetermineSystem and named it
CMakeDeterminePlatform. It sets the macro CMAKE_PLATFORM which will
look like: Linux-unknown, SunOS-sparc, SunOS-i386. It also sets all of
the same macros that CMakeDetermineSystem does, but I didn't want the
next update of CMake to over-write my changes :)


-- 
/~\ The ASCII        Ken Weinert   Ken.Weinert at ihs.com 
\ / Ribbon Campaign  303-858-6956 (V) 303-705-4258 (F)
 X  Against HTML     GnuPG: 9274F1CE  GnuPG available at http://www.gnupg.org/
/ \ Email!           1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Backup not found: (A)bort (R)etry (T)hrowup

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeDeterminePlatform.cmake
Type: application/octet-stream
Size: 2893 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030205/5035b6ea/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030205/5035b6ea/attachment.sig>


More information about the CMake mailing list