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

Andy Cedilnik andy.cedilnik at kitware.com
Wed Feb 5 08:33:49 EST 2003


Hi Holger,

You can do out of source build. The way you do this is to specify
different source and build directory. For example on linux:

mkdir Project-Linux
cd Project-Linux
ccmake ../Project

On Sun:

mkdir Project-Sun
cd Project-Sun
ccmake ../Project

On Windows:

mkdir Project-Windows
cd Project-Windows
cmake ../Project -G"Visual Studio 6"

Or open CMakeSetup and specify source to be Project and build be
Project-Windows.

				Andy

On Wed, 2003-02-05 at 08:21, Pampel, Holger (Holger) wrote:
> CMakers,
> 
> I was recently pointed to CMake as I write multi-platform software
> (currently for W2k/MSVC, Linux/GNU, Solaris/GNU).
> I'm surprised by the simplicity of the required input files.
> It runs on all platforms without bigger problems.
> But now I'm stuck:
> 
> Until now I build with own make rules and separate MSVC projects
> on a shared network drive for all 3 platforms storing object files, generated
> libs and binaries in subdirectories identified by an archituree dependent
> extension: lib.$ARCH, bin/$ARCH, obj.${ARCH}<version_postfix>
> with ARCH=i686 for Linux, ARCH=sun4 for Solaris and ARCH=MSVC for MSVC.
> Debug and release versions I distinguish by adding pre- or postfixes to
> the generated libs and binaries (currently only "d" for debug version).
> 
> 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 ...





More information about the CMake mailing list