Re: [CMake] build types

2007-09-23 Thread Miguel A. Figueroa-Villanueva
forgot to cc the list...

-- Forwarded message --
From: Miguel A. Figueroa-Villanueva
Date: Sep 23, 2007 3:09 PM
Subject: Re: [CMake] Re: build types
To: Christian Buhtz


On 9/23/07, Christian Buhtz wrote:
 Andreas Pakulat schrieb:
  You can't. You specify the build type during cmake-time, using
  -DCMAKE_BUILD_TYPE=Debug|Release|... And thats quite ok

 So I need to create makefile like this:
 makefile_release.gcc
 makefile_debug.gcc
 makefile_xx_yy_whatever.gcc
 ?

The only thing you will be creating is a CMakeLists.txt file. Then
when you run cmake on that file it will generate your makefile. So
make sure you can do this before you continue.

Also, you should be doing out-of-source builds. That is:

.../source
.../builds/debug
.../builds/release

then all you need to do is:

cd .../builds/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../../source

cd .../builds/release
cmake -DCMAKE_BUILD_TYPE=Release ../../source

Note that this is assuming you are using unix makefiles and gcc. If
you use Visual Studio, then it keeps your debug and release files in
separate directories, so the following should do it.

cd .../builds
cmake .../source

Now, the one thing you should understand is that you do not need to
create any makefile manually, cmake will create it for you!! That is
the whole purpose of its existance.

--Miguel


-- 
Miguel A. Figueroa Villanueva
+1 787 832-4040 x.3610-4006
Department of Electrical and Computer Engineering
University of Puerto Rico - Mayagüez Campus
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] build types

2007-09-23 Thread Brandon Van Every
On 9/23/07, Miguel A. Figueroa-Villanueva [EMAIL PROTECTED] wrote:

 Now, the one thing you should understand is that you do not need to
 create any makefile manually, cmake will create it for you!! That is
 the whole purpose of its existance.

Yes, CMake takes the manual labor to a higher level of abstraction.
You still write something that's like a makefile, that's your
CMakeLists.txt.  But once you've written that, it will generate files
for dozens of different build systems.  You may have to insert some
system-specific code, it can't automagically do everything in the
universe for you.  For instance you might need IF(APPLE) or IF(UNIX)
or IF(WIN32) or IF(MSVC) or some such.  But mostly you can target
lotsa platforms, lotsa compliers, and lotsa build tools, all with 1
CMakeLists.txt.


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake