ENH:Some enhancements to the examples
This commit is contained in:
parent
4a8d3fc1e3
commit
7bd2dbc260
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
|
@ -33,6 +33,10 @@ vlink="#000000" alink="#000000">
|
|||
the cache, which may be changed by the user prior to the generation of
|
||||
the native build files. (The following figure is the CMake cache GUI in
|
||||
the Windows MSVC environment.)
|
||||
<div align="center">
|
||||
<img src="/CMake/Art/CMakeGUI.jpg" width=400 height=276
|
||||
border=0 alt="">
|
||||
</div>
|
||||
<P>
|
||||
|
||||
CMake is designed to support complex directory hierarchies and
|
||||
|
@ -100,7 +104,7 @@ vlink="#000000" alink="#000000">
|
|||
adopted CMake as their build environment, contributing many essential
|
||||
features. Brad King added several features in order to support the CABLE
|
||||
automated wrapping environment and
|
||||
<a href="http://public.kitware.com/GCC_XML">gcc-XML</a>, and
|
||||
<a href="http://public.kitware.com/GCC_XML">GCC-XML</a>, and
|
||||
GE Corporate R&D required support of their testing infrastructure
|
||||
(the <a href="http://public.kitware.com/Insight/Testing/HTML/TestingResults/Dashboard/MostRecentResults-Nightly/Dashboard.html">quality dashboard</a>). Other
|
||||
features were added by Ken Martin to support the transition of VTK's
|
||||
|
@ -118,8 +122,8 @@ vlink="#000000" alink="#000000">
|
|||
list. There is some existing documentation, but until later in 2001 the
|
||||
documentation should be treated with caution. Please go to the
|
||||
<a href="/CMake/HTML/Documentation.html">documentation</a> for more
|
||||
information.
|
||||
|
||||
information. Also, see the <a href="/CMake/HTML/Examples.html">example</a>
|
||||
found here.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -27,8 +27,8 @@ vlink="#000000" alink="#000000">
|
|||
will use CMake in preference to the current build environment. VTK is
|
||||
a very large system for 3D graphics and visualization consisting of
|
||||
approximately 700 classes and hundreds of thousands of lines of executable
|
||||
code. It fully exploits CMake's capabilities because of the automated
|
||||
"wrapping" process that automatically generates interface code to Tcl,
|
||||
code. It fully exploits CMake's capabilities due to the automated
|
||||
"wrapping" process that generates interface code to Tcl,
|
||||
Python, and Java from the C++ header files.
|
||||
<p>
|
||||
<b>cvs -d :pserver:anonymous@www.visualizationtoolkit.org:/vtk/cvsroot login</b><br>
|
||||
|
@ -39,7 +39,7 @@ vlink="#000000" alink="#000000">
|
|||
<p>
|
||||
|
||||
<h3>To obtain access to the ITK CVS repository:</h3>
|
||||
Insight (ITK) is the first project to adopt ITK. It is heavily templated
|
||||
Insight (ITK) is the first project to adopt CMake. It is heavily templated
|
||||
C++ code using the generic programming style. It has an especially nice
|
||||
testing environment driven by CMake.
|
||||
<p>
|
||||
|
|
|
@ -15,8 +15,57 @@ vlink="#000000" alink="#000000">
|
|||
<td width="550" valign="top" bgcolor="#FFFFFF">
|
||||
<div align="left">
|
||||
<font size=5>The following example </font> demonstrates some key ideas
|
||||
of CMake.
|
||||
of CMake. (You may wish to download this
|
||||
<a href="/CMake/HTML/cmakeExample.tar.gz">example code</a> and try it
|
||||
out for yourself.)
|
||||
<p>
|
||||
There are three directories involved. The top level directory has two
|
||||
subdirectories called ./Demo and ./Hello. In the directory ./Hello, a
|
||||
library is built. In the directory ./Demo, an executable is built by
|
||||
linking to the library. A total of three CMakeList.txt files are
|
||||
created: one for each directory.
|
||||
<p>
|
||||
The first, top-level directory contains the following CMakeLists.txt file.
|
||||
<pre>
|
||||
# The name of our project is "HELLO". CMakeLists files in this project can
|
||||
# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
|
||||
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
|
||||
PROJECT(HELLO)
|
||||
|
||||
# Recurse into the "Hello" and "Demo" subdirectories. This does not actually
|
||||
# cause another cmake executable to run. The same process will walk through
|
||||
# the project's entire directory structure.
|
||||
SUBDIRS(Hello Demo)
|
||||
</pre>
|
||||
Then for each subdirectory listed in the SUBDIRS command, CMakeLists.txt
|
||||
files are created. In the ./Hello directory, the following CMakeLists.txt
|
||||
file is created:
|
||||
<pre>
|
||||
# Create a library called "Hello" which includes the source file "hello.cxx".
|
||||
# The extension is already found. Any number of sources could be listed here.
|
||||
ADD_LIBRARY(Hello hello)
|
||||
</pre>
|
||||
Finally, in the ./Demo directory, the third and final CMakeLists.txt file
|
||||
is created:
|
||||
<pre>
|
||||
# Make sure the compiler can find include files from our Hello library.
|
||||
INCLUDE_DIRECTORIES(${HELLO_SOURCE_DIR}/Hello)
|
||||
|
||||
# Make sure the linker can find the Hello library once it is built.
|
||||
LINK_DIRECTORIES(${HELLO_BINARY_DIR}/Hello)
|
||||
|
||||
# Add executable called "helloDemo" that is built from the source files
|
||||
# "demo.cxx" and "demo_b.cxx". The extensions are automatically found.
|
||||
ADD_EXECUTABLE(helloDemo demo demo_b)
|
||||
|
||||
# Link the executable to the Hello library.
|
||||
TARGET_LINK_LIBRARIES(helloDemo Hello)
|
||||
</pre>
|
||||
CMake when executed in the top-level directory will process the
|
||||
CMakeLists.txt file and then descend into the listed subdirectories.
|
||||
Variables, include paths, library paths, etc. are inherited. Depending
|
||||
on the system, makefiles (Unix) or workspaces/projects (MSVC) will be
|
||||
built. These can then be used in the usual way to build the code.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<a href="/CMake/index.html"> Home</a><br><br>
|
||||
<a href="/CMake/HTML/About.html"> About</a><br><br>
|
||||
<a href="/CMake/HTML/Sponsors.html"> Sponsors</a><br><br>
|
||||
<a href="/CMake/HTML/Examples.html"> Examples</a><br><br>
|
||||
<a href="/CMake/HTML/Examples.html"> Example</a><br><br>
|
||||
<a href="/CMake/HTML/Download.html"> Download</a><br><br>
|
||||
<a href="/CMake/HTML/Documentation.html"> Documentation</a><br><br>
|
||||
<a href="/CMake/HTML/FAQ.html"> FAQ</a><br><br>
|
||||
|
|
|
@ -29,8 +29,10 @@ this work include:<br><br><br>
|
|||
<TD align=left valign=middle width=375>
|
||||
National Library of Medicine (NLM) - Dr. Terry Yoo at NLM/NIH is
|
||||
sponsoring the bulk of this work as part of the Insight segmentation
|
||||
and registration toolkit (ITK). CMake was originally created to
|
||||
support the multi-platform support necessary for ITK.
|
||||
and registration toolkit
|
||||
<a href="http://public.kitware.com/Insight">(ITK)</a>.
|
||||
CMake was originally created for
|
||||
the multi-platform support necessary for ITK.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<table width="700" cellspacing="0" cellpadding="8" border="0">
|
||||
<table width="720" cellspacing="0" cellpadding="8" border="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<img src="/CMake/Art/CMakeBanner.jpg" width=620 height=150
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue