[Insight-users] How to use cmake command line

Kevin H. Hobbs hobbsk at ohio.edu
Mon Sep 10 08:40:43 EDT 2012


On 09/07/2012 11:38 AM, psd wrote:
>  Hi,
> How to use cmake command line using the option parameters,  can anyone
> give me some example for using cmake command line with parameter? such
> as using the parameters as *-D <var>:<type>=<value>*.  And if I want to
> delete the cache before compile the program, which parameter should I take.
> 
> Though I see the follow description of the the command line usage, I
> still do not know how to write the command.
> 
> 
>     Usage
> 
> ccmake <path-to-source>
> ccmake <path-to-existing-build>
> 

My script (as it stood the last time I installed a release version of
ITK) looks like this:

wget
http://voxel.dl.sourceforge.net/sourceforge/itk/InsightToolkit-3.20.0.tar.gz
tar -xzvf InsightToolkit-3.20.0.tar.gz
mkdir ITK_Build
cd ITK_Build/
/opt/CMake-2.8.4/bin/cmake \
  -D"BUILD_SHARED_LIBS:BOOL=ON" \
  -D"BUILD_TESTING:BOOL=OFF" \
  -D"BUILD_EXAMPLES:BOOL=OFF" \
  -D"CMAKE_BUILD_TYPE:STRING=Release" \
  -D"CMAKE_INSTALL_PREFIX:PATH=/opt/InsightToolkit-3.20.0" \
  -D"ITK_USE_OPTIMIZED_REGISTRATION_METHODS:BOOL=ON" \
  -D"ITK_USE_REVIEW:BOOL=ON" \
  -D"USE_FFTWD:BOOL=ON" \
  -D"USE_FFTWF:BOOL=ON" \
  ../InsightToolkit-3.20.0

make -j8
playwave /usr/share/sounds/KDE_Beep_Honk.wav
playwave /usr/share/sounds/KDE_Beep_Honk.wav
playwave /usr/share/sounds/KDE_Beep_Honk.wav
playwave /usr/share/sounds/KDE_Beep_Honk.wav

sudo make install



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120910/919f3ce9/attachment.pgp>


More information about the Insight-users mailing list