ENH:Tweaks to dump documentation
This commit is contained in:
parent
b67bacd1be
commit
9a0e8e41de
184
README
184
README
|
@ -27,16 +27,16 @@ note that Unix-style slashes are used. The rules may reference CMake
|
||||||
variables, either built-in or defined variables. Two important variables
|
variables, either built-in or defined variables. Two important variables
|
||||||
are built-in to CMake:
|
are built-in to CMake:
|
||||||
|
|
||||||
CMAKE_SOURCE_DIR - The root directory of the source code
|
CMAKE_SOURCE_DIR - The root directory of the source code
|
||||||
directory tree.
|
directory tree.
|
||||||
|
|
||||||
CMAKE_BINARY_DIR - The root directory of the build tree
|
CMAKE_BINARY_DIR - The root directory of the build tree
|
||||||
where binaries are placed. This includes
|
where binaries are placed. This includes
|
||||||
object files, libraries, and executables.
|
object files, libraries, and executables.
|
||||||
|
|
||||||
A rule might reference these as follows:
|
A rule might reference these as follows:
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
using the ${} delimiters.
|
using the ${} delimiters.
|
||||||
|
|
||||||
|
@ -47,83 +47,81 @@ the doxygen.config file in this directory.
|
||||||
Rules: (Generated with cmDumpDocumentation)
|
Rules: (Generated with cmDumpDocumentation)
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
ABSTRACT_FILES - A list of abstract classes, useful for wrappers.
|
ABSTRACT_FILES - A list of abstract classes, useful for wrappers.
|
||||||
Usage: ABSTRACT_FILES(file1 file2 ..)
|
Usage: ABSTRACT_FILES(file1 file2 ..)
|
||||||
|
|
||||||
ADD_TARGET - Add an extra target to the build system.
|
ADD_TARGET - Add an extra target to the build system.
|
||||||
Usage: ADD_TARGET(Name "command to run")
|
Usage: ADD_TARGET(Name "command to run")
|
||||||
|
|
||||||
AUX_SOURCE_DIRECTORY - Add all the source files found in the specified directory to
|
AUX_SOURCE_DIRECTORY - Add all the source files found in the specified
|
||||||
the build.
|
directory to the build.
|
||||||
Usage: AUX_SOURCE_DIRECTORY(dir)
|
Usage: AUX_SOURCE_DIRECTORY(dir)
|
||||||
|
|
||||||
EXECUTABLES - Add a list of executables files.
|
EXECUTABLES - Add a list of executables files.
|
||||||
Usage: EXECUTABLES(file1 file2 ...)
|
Usage: EXECUTABLES(file1 file2 ...)
|
||||||
|
|
||||||
FIND_INCLUDE - Find an include path.
|
FIND_INCLUDE - Find an include path.
|
||||||
Usage: FIND_INCLUDE(DEFINE try1 try2 ...)
|
Usage: FIND_INCLUDE(DEFINE try1 try2 ...)
|
||||||
|
|
||||||
FIND_LIBRARY - Find a library.
|
FIND_LIBRARY - Find a library.
|
||||||
Usage: FIND_LIBRARY(DEFINE try1 try2)
|
Usage: FIND_LIBRARY(DEFINE try1 try2)
|
||||||
|
|
||||||
FIND_PROGRARM - Find an executable program.
|
FIND_PROGRARM - Find an executable program.
|
||||||
Usage: FIND_PROGRAM(NAME executable1 executable2 ...)
|
Usage: FIND_PROGRAM(NAME executable1 executable2 ...)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES - Add include directories to the build.
|
INCLUDE_DIRECTORIES - Add include directories to the build.
|
||||||
Usage: INCLUDE_DIRECTORIES(dir1 dir2 ...).
|
Usage: INCLUDE_DIRECTORIES(dir1 dir2 ...)
|
||||||
|
|
||||||
|
LIBRARY - Set a name for a library.
|
||||||
|
Usage: LIBRARY(libraryname)
|
||||||
|
|
||||||
LIBRARY - Set a name for a library.
|
LINK_DIRECTORIES - Specify link directories.
|
||||||
Usage: LIBRARY(libraryname)
|
Usage: Specify the paths to the libraries that will be linked in.
|
||||||
|
LINK_DIRECTORIES(directory1 directory2 ...)
|
||||||
|
The directories can use built in definitions like
|
||||||
|
CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
|
||||||
|
|
||||||
LINK_DIRECTORIES - Specify link directories.
|
LINK_LIBRARIES - Specify a list of libraries to be linked into executables or
|
||||||
Usage: Specify the paths to the libraries that will be linked in.
|
shared objects.
|
||||||
LINK_DIRECTORIES(directory1 directory2 ...)
|
Usage: LINK_LIBRARIES(library1 library2)
|
||||||
The directories can use built in definitions like
|
Specify a list of libraries to be linked into
|
||||||
CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
|
executables or shared objects. This rule is passed
|
||||||
|
down to all other rules. The library name should be
|
||||||
|
the same as the name used in the LIBRARY(library) rule.
|
||||||
|
|
||||||
LINK_LIBRARIES - Specify a list of libraries to be linked into executables or
|
PROJECT - Set a name for the entire project. One argument.
|
||||||
shared objects.
|
Usage: PROJECT(projectname)
|
||||||
Usage: Specify a list of libraries to be linked into executables or
|
Set the name for the entire project. This takes one argument.
|
||||||
shared objects. This rule is passed down to all other rules.LINK_LIBRARIES(library1 library2).
|
|
||||||
The library name should be the same as the name used in the
|
|
||||||
LIBRARY(library) rule.
|
|
||||||
|
|
||||||
PROJECT - Set a name for the entire project. One argument.
|
SOURCE_FILES - Add a list of source files.
|
||||||
Usage: Set the name for the entire project. This takes one argument.
|
Usage: SOURCE_FILES(file1 file2 ...)
|
||||||
PROJECT(projectname)
|
|
||||||
|
|
||||||
SOURCE_FILES - Add a list of source files.
|
SOURCE_FILES_REQUIRE - Add a list of source files if the required
|
||||||
Usage: SOURCE_FILES(file1 file2 ...)
|
variables are set.
|
||||||
|
Usage: SOURCE_FILES_REQUIRE(var1 var2 ... SOURCES_BEGIN file1 file2 ...)
|
||||||
|
|
||||||
SOURCE_FILES_REQUIRE - Add a list of source files if the required variables are set.
|
SUBDIRS - Add a list of subdirectories to the build.
|
||||||
Usage: SOURCE_FILES_REQUIRE(var1 var2 ... SOURCES_BEGIN file1 file2 ...)
|
Usage: SUBDIRS(dir1 dir2 ...)
|
||||||
|
Add a list of subdirectories to the build.
|
||||||
|
This will cause any CMakeLists.txt files in the sub directories
|
||||||
|
to be processed by CMake.
|
||||||
|
|
||||||
SUBDIRS - Add a list of subdirectories to the build.
|
TESTS - Add a list of executables files that are run as tests.
|
||||||
Usage: Add a list of subdirectories to the build.
|
Usage: TESTS(file1 file2 ...)
|
||||||
SUBDIRS(dir1 dir2 ...)
|
|
||||||
This will cause any CMakeLists.txt files in the sub directories
|
|
||||||
to be processed by CMake.
|
|
||||||
|
|
||||||
TESTS - Add a list of executables files that are run as tests.
|
UNIX_DEFINES - Add -D flags to the command line for Unix only.
|
||||||
Usage: TESTS(file1 file2 ...)
|
Usage: UNIX_DEFINES(-DFOO -DBAR)
|
||||||
|
Add -D flags to the command line for Unix only.
|
||||||
UNIX_DEFINES - Add -D flags to the command line for Unix only.
|
|
||||||
Usage: Add -D flags to the command line for Unix only.
|
|
||||||
UNIX_DEFINES(-DFOO -DBAR)
|
|
||||||
|
|
||||||
UNIX_LIBRARIES - Add libraries that are only used for Unix programs.
|
|
||||||
Usage: UNIX_LIBRARIES(library -lm ...)
|
|
||||||
|
|
||||||
WIN32_DEFINES - Add -D define flags to command line for Win32 environments.
|
|
||||||
Usage: Add -D define flags to command line for Win32 environments.
|
|
||||||
WIN32_DEFINES(-DFOO -DBAR ...)
|
|
||||||
|
|
||||||
WIN32_LIBRARIES - Add libraries that are only used for Win32 programs.
|
|
||||||
Usage: WIN32_LIBRARIES(library -lm ...)
|
|
||||||
|
|
||||||
|
UNIX_LIBRARIES - Add libraries that are only used for Unix programs.
|
||||||
|
Usage: UNIX_LIBRARIES(library -lm ...)
|
||||||
|
|
||||||
|
WIN32_DEFINES - Add -D define flags to command line for Win32 environments.
|
||||||
|
Usage: WIN32_DEFINES(-DFOO -DBAR ...)
|
||||||
|
Add -D define flags to command line for Win32 environments.
|
||||||
|
|
||||||
|
WIN32_LIBRARIES - Add libraries that are only used for Win32 programs.
|
||||||
|
Usage: WIN32_LIBRARIES(library -lm ...)
|
||||||
|
|
||||||
USING / BUILDING WITH CMAKE
|
USING / BUILDING WITH CMAKE
|
||||||
---------------------------
|
---------------------------
|
||||||
|
@ -132,54 +130,56 @@ Windows:
|
||||||
-------
|
-------
|
||||||
These programs are used to drive CMake on Windows:
|
These programs are used to drive CMake on Windows:
|
||||||
|
|
||||||
CMakeSetup.exe -> window MFC based GUI for configure on windows
|
CMakeSetup.exe -> window MFC based GUI for configure on windows
|
||||||
|
|
||||||
CMakeSetupCMD.exe -> windows command line version of CMakeConfigure
|
CMakeSetupCMD.exe -> windows command line version of CMakeConfigure
|
||||||
|
|
||||||
To build a project on Windows:
|
To build a project on Windows:
|
||||||
|
|
||||||
load CMake/Source/CMakeSetup.dsw
|
load CMake/Source/CMakeSetup.dsw
|
||||||
Build it
|
Build it
|
||||||
Run it
|
Run it
|
||||||
Specify paths
|
Specify paths
|
||||||
|
|
||||||
Load ITK.dsw
|
Load ITK.dsw
|
||||||
Build Common, Numerics, then any of the many executables,
|
Build Common, Numerics, then any of the many executables,
|
||||||
or do a Batch build with debug only.
|
or do a Batch build with debug only.
|
||||||
|
|
||||||
|
|
||||||
Unix:
|
Unix:
|
||||||
----
|
----
|
||||||
These programs/files are used to drive CMake on Unix:
|
These programs/files are used to drive CMake on Unix:
|
||||||
|
|
||||||
configure -> run on unix to configure for build
|
configure -> run on unix to configure for build
|
||||||
CMakeBuildTargets -> Unix program to read CMakeLists.txt and
|
CMakeBuildTargets -> Unix program to read CMakeLists.txt and
|
||||||
generate CMakeTargets.make
|
generate CMakeTargets.make
|
||||||
|
|
||||||
makefile fragments:
|
makefile fragments:
|
||||||
CMakeMaster.make -> main file to be included by makefiles
|
CMakeMaster.make -> main file to be included by makefiles
|
||||||
CMakeVariables.make -> all make varibles are set in this file
|
CMakeVariables.make -> all make varibles are set in this file
|
||||||
CMakeRules.make -> All build rules are here (except Simple Rules)
|
CMakeRules.make -> All build rules are here (except Simple Rules)
|
||||||
CMakeSimpleRules.make -> simple build rules for .o to .cxx, this is separate
|
CMakeSimpleRules.make -> simple build rules for .o to .cxx, this is
|
||||||
to be able to build CMakeBuildTargets itself.
|
separate to be able to build CMakeBuildTargets
|
||||||
CMakeLocal.make -> Place for hand configuration
|
itself.
|
||||||
CMakeTargets.make -> generated rules for make style build in each directory
|
CMakeLocal.make -> Place for hand configuration
|
||||||
MakefileTemplate.make -> master makefile template used by configure to
|
CMakeTargets.make -> generated rules for make style build in each
|
||||||
generate Makefiles
|
directory
|
||||||
|
MakefileTemplate.make -> master makefile template used by configure to
|
||||||
|
generate Makefiles
|
||||||
|
|
||||||
|
|
||||||
Unix install:
|
Unix install:
|
||||||
In place (object files end up in source code directory):
|
In place (object files end up in source code directory):
|
||||||
|
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
|
|
||||||
Other directory (object files are in another directory):
|
Other directory (object files are in another directory):
|
||||||
|
|
||||||
mkdir Insight-build
|
mkdir Insight-build
|
||||||
cd Insight-build
|
cd Insight-build
|
||||||
../Insight/configure
|
../Insight/configure
|
||||||
make
|
make
|
||||||
|
|
||||||
|
|
||||||
FOR MORE INFORMATION
|
FOR MORE INFORMATION
|
||||||
|
|
|
@ -61,8 +61,8 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual const char* TerseDocumentation()
|
virtual const char* TerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Add all the source files found in the specified directory to\n"
|
return "Add all the source files found in the specified\n"
|
||||||
" the build.";
|
"directory to the build.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"INCLUDE_DIRECTORIES(dir1 dir2 ...).\n";
|
"INCLUDE_DIRECTORIES(dir1 dir2 ...)";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -76,11 +76,11 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Specify a list of libraries to be linked into executables or \n"
|
"LINK_LIBRARIES(library1 library2)\n"
|
||||||
"shared objects. This rule is passed down to all other rules."
|
"Specify a list of libraries to be linked into\n"
|
||||||
"LINK_LIBRARIES(library1 library2).\n"
|
"executables or shared objects. This rule is passed\n"
|
||||||
"The library name should be the same as the name used in the\n"
|
"down to all other rules. The library name should be\n"
|
||||||
"LIBRARY(library) rule.";
|
"the same as the name used in the LIBRARY(library) rule.";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Set the name for the entire project. This takes one argument.\n"
|
"PROJECT(projectname)\n"
|
||||||
"PROJECT(projectname)";
|
"Set the name for the entire project. This takes one argument.";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,8 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual const char* TerseDocumentation()
|
virtual const char* TerseDocumentation()
|
||||||
{
|
{
|
||||||
return "Add a list of source files if the required variables are set.";
|
return "Add a list of source files if the required \n"
|
||||||
|
"variables are set.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,8 +68,8 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Add a list of subdirectories to the build.\n"
|
|
||||||
"SUBDIRS(dir1 dir2 ...)\n"
|
"SUBDIRS(dir1 dir2 ...)\n"
|
||||||
|
"Add a list of subdirectories to the build.\n"
|
||||||
"This will cause any CMakeLists.txt files in the sub directories\n"
|
"This will cause any CMakeLists.txt files in the sub directories\n"
|
||||||
"to be processed by CMake.";
|
"to be processed by CMake.";
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,8 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Add -D flags to the command line for Unix only.\n"
|
"UNIX_DEFINES(-DFOO -DBAR)\n"
|
||||||
"UNIX_DEFINES(-DFOO -DBAR)";
|
"Add -D flags to the command line for Unix only.";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,8 @@ public:
|
||||||
virtual const char* FullDocumentation()
|
virtual const char* FullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Add -D define flags to command line for Win32 environments.\n"
|
"WIN32_DEFINES(-DFOO -DBAR ...)\n"
|
||||||
"WIN32_DEFINES(-DFOO -DBAR ...)";
|
"Add -D define flags to command line for Win32 environments.";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue