ENH: Mathieus support for path conversions
This commit is contained in:
parent
7e3c70082a
commit
1066af4527
570
CMake.rtf
570
CMake.rtf
|
@ -1,11 +1,11 @@
|
|||
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}
|
||||
{\f36\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Verdana;}{\f45\froman\fcharset238\fprq2 Times New Roman CE;}{\f46\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f48\froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\f49\froman\fcharset162\fprq2 Times New Roman Tur;}{\f50\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f51\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f52\froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\f53\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f65\fmodern\fcharset238\fprq1 Courier New CE;}{\f66\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f68\fmodern\fcharset161\fprq1 Courier New Greek;}
|
||||
{\f69\fmodern\fcharset162\fprq1 Courier New Tur;}{\f70\fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f71\fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f72\fmodern\fcharset186\fprq1 Courier New Baltic;}
|
||||
{\f73\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f405\fswiss\fcharset238\fprq2 Verdana CE;}{\f406\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f408\fswiss\fcharset161\fprq2 Verdana Greek;}{\f409\fswiss\fcharset162\fprq2 Verdana Tur;}
|
||||
{\f412\fswiss\fcharset186\fprq2 Verdana Baltic;}{\f413\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
|
||||
{\f40\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}{\f168\froman\fcharset238\fprq2 Times New Roman CE;}{\f169\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f171\froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\f172\froman\fcharset162\fprq2 Times New Roman Tur;}{\f173\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f174\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f175\froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\f176\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f188\fmodern\fcharset238\fprq1 Courier New CE;}{\f189\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f191\fmodern\fcharset161\fprq1 Courier New Greek;}
|
||||
{\f192\fmodern\fcharset162\fprq1 Courier New Tur;}{\f193\fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f194\fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f195\fmodern\fcharset186\fprq1 Courier New Baltic;}
|
||||
{\f196\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f568\fswiss\fcharset238\fprq2 Verdana CE;}{\f569\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f571\fswiss\fcharset161\fprq2 Verdana Greek;}{\f572\fswiss\fcharset162\fprq2 Verdana Tur;}
|
||||
{\f575\fswiss\fcharset186\fprq2 Verdana Baltic;}{\f576\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
|
||||
\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
|
||||
\ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{
|
||||
\s1\ql \li1170\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin1170\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{
|
||||
|
@ -13,7 +13,7 @@
|
|||
\s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd heading 3;}{
|
||||
\s4\ql \li1170\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin-720\lin1170\itap0 \b\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sautoupd heading 4;}{
|
||||
\s5\ql \li2160\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel4\adjustright\rin-720\lin2160\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 5;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{
|
||||
\s15\ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 Body Text;}{\*\cs16 \additive \ul\cf2 \sbasedon10 Hyperlink;}{\*\cs17 \additive \ul\cf12
|
||||
\sbasedon10 FollowedHyperlink;}{\s18\ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 Body Text Indent 2;}{
|
||||
|
@ -21,7 +21,7 @@
|
|||
\s20\ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext20 Body Text 2;}{
|
||||
\s21\ql \fi-3240\li3960\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin3960\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext21 Block Text;}{
|
||||
\s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext22 Body Text 3;}{
|
||||
\s23\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f36\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext23 Normal (Web);}{
|
||||
\s23\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f40\fs18\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext23 Normal (Web);}{
|
||||
\s24\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f2\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext24 Plain Text;}}{\*\listtable{\list\listtemplateid-159072676\listhybrid{\listlevel\levelnfc23
|
||||
\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid-2019666176\'01\u-3913 ?;}{\levelnumbers;}\f3\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
|
||||
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid484837676\'01o;}{\levelnumbers;}\f2\fs20\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
|
||||
|
@ -171,13 +171,13 @@
|
|||
\listoverridecount0\ls15}{\listoverride\listid1652054978\listoverridecount0\ls16}{\listoverride\listid1431699610\listoverridecount0\ls17}{\listoverride\listid330572609\listoverridecount0\ls18}{\listoverride\listid489949201\listoverridecount0\ls19}
|
||||
{\listoverride\listid1987126501\listoverridecount0\ls20}{\listoverride\listid114103099\listoverridecount0\ls21}{\listoverride\listid707224966\listoverridecount0\ls22}{\listoverride\listid275335483\listoverridecount0\ls23}{\listoverride\listid1042707565
|
||||
\listoverridecount0\ls24}{\listoverride\listid1776748586\listoverridecount0\ls25}{\listoverride\listid1662733205\listoverridecount0\ls26}{\listoverride\listid469785962\listoverridecount0\ls27}{\listoverride\listid709380903\listoverridecount0\ls28}}
|
||||
{\*\rsidtbl \rsid155693\rsid1079499\rsid2115186\rsid7953135}{\*\generator Microsoft Word 10.0.2627;}{\info{\title CMake Documentation}{\author Ken Martin}{\operator hoffman}{\creatim\yr2002\mo4\dy2\hr15\min39}{\revtim\yr2003\mo2\dy12\hr10\min36}
|
||||
{\printim\yr2000\mo11\dy2\hr9\min34}{\version6}{\edmins62}{\nofpages19}{\nofwords6274}{\nofchars35762}{\*\company Kitware Inc.}{\nofcharsws41953}{\vern16437}}
|
||||
{\*\rsidtbl \rsid155693\rsid1079499\rsid2115186\rsid3695913\rsid5204228\rsid7953135}{\*\generator Microsoft Word 10.0.4524;}{\info{\title CMake Documentation}{\author Ken Martin}{\operator Ken Martin}{\creatim\yr2002\mo4\dy2\hr15\min39}
|
||||
{\revtim\yr2003\mo7\dy21\hr11\min27}{\printim\yr2000\mo11\dy2\hr9\min34}{\version7}{\edmins63}{\nofpages19}{\nofwords6274}{\nofchars35762}{\*\company Kitware Inc.}{\nofcharsws41953}{\vern16475}}
|
||||
\widowctrl\ftnbj\aendnotes\hyphhotz0\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\lytprtmet\hyphcaps0\horzdoc\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0
|
||||
\jexpand\viewkind1\viewscale75\pgbrdrhead\pgbrdrfoot\bdrrlswsix\nolnhtadjtbl\rsidroot7953135 \fet0\sectd \linex0\endnhere\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
|
||||
{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
|
||||
\s1\ql \li1170\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin1170\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\lang1024\langfe1024\noproof\insrsid2115186
|
||||
\s1\ql \li1170\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin1170\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\lang1024\langfe1024\noproof\insrsid5204228
|
||||
{\shp{\*\shpinst\shpleft-3600\shptop0\shpright3600\shpbottom1744\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr1\shpwrk0\shpfblwtxt0\shpz0\shplid1026{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
|
||||
{\sp{\sn pib}{\sv {\pict\picscalex242\picscaley242\piccropl0\piccropr0\piccropt0\piccropb0\picw5249\pich1270\picwgoal2976\pichgoal720\jpegblip\bliptag703103714{\*\blipuid 29e882e207abc915b98d44ea035a9c3c}
|
||||
ffd8ffe000104a46494600010201012c012c0000ffed0b9e50686f746f73686f7020332e30003842494d03ed0a5265736f6c7574696f6e0000000010012c0000
|
||||
|
@ -2271,29 +2271,29 @@ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|||
\par }\pard \s1\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin0\itap0 {\insrsid2115186 Introduction
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\nowidctlpar\faauto\rin-720\lin0\itap0 {\insrsid2115186 The Cross-Platform Make facility (CMake) manages the build process\emdash in a portable manner\emdash
|
||||
across Windows, Unix and the Mac OSX platforms. CMake can be used to compile source code, create libraries, and build executables in arbitrary combinations. On Unix pla
|
||||
tforms, CMake produces makefiles that may be used with the standard make facility. In the Microsoft Visual C++ environment, CMake creates projects and workspaces that can be imported into MSVC.
|
||||
across Windows, Unix and the Mac OSX platforms. CMake can be used to compile source code, create libraries, and build executables in arbitrary combi
|
||||
nations. On Unix platforms, CMake produces makefiles that may be used with the standard make facility. In the Microsoft Visual C++ environment, CMake creates projects and workspaces that can be imported into MSVC.
|
||||
\par
|
||||
\par CMake is designed to support complex directory hierarchies an
|
||||
d applications dependent on several libraries. For example, CMake supports projects consisting of multiple toolkits (i.e., libraries), where each toolkit might contain several directories, and the application depends on the toolkits plus additional code.
|
||||
CMake can also handle situations where executables must be built in order to generate code that is then compiled and linked into a final application.
|
||||
\par CMake is designed to support complex dire
|
||||
ctory hierarchies and applications dependent on several libraries. For example, CMake supports projects consisting of multiple toolkits (i.e., libraries), where each toolkit might contain several directories, and the application depends on the toolkits pl
|
||||
us additional code. CMake can also handle situations where executables must be built in order to generate code that is then compiled and linked into a final application.
|
||||
\par
|
||||
\par Using CMake is simple. The build process is controlled by creating a CMakeLists.txt file in each directory (including subdirectories) of a project. Each CMakeLists.txt file consists of one or more commands. Each command has the form COMMAND (args\'85
|
||||
) where COMMAND is the name of the command, and args is a white-space separated list of arguments. CMake provides m
|
||||
any pre-defined commands, but if you need to, you can add your own commands. In addition, the advanced user can add other makefile generators for particular compiler/OS combinations.
|
||||
) where COMMAND is the name of the command, and args is a white-space separated list of argumen
|
||||
ts. CMake provides many pre-defined commands, but if you need to, you can add your own commands. In addition, the advanced user can add other makefile generators for particular compiler/OS combinations.
|
||||
\par }\pard \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 {\fs28\insrsid2115186
|
||||
\par }\pard\plain \s1\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin0\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Installing CMake
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 You can download CMake pre compiled binararies or CMake source code from the following link: }{\field{\*\fldinst {\insrsid2115186
|
||||
HYPERLINK "http://www.cmake.org/CMake/HTML/Download.html" }{\insrsid7953135 {\*\datafield
|
||||
HYPERLINK "http://www.cmake.org/CMake/HTML/Download.html" }{\insrsid3695913 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5c00000068007400740070003a002f002f007700770077002e0063006d0061006b0065002e006f00720067002f0043004d0061006b0065002f00480054004d004c002f0044006f0077006e006c006f00610064002e00
|
||||
680074006d006c00000000000000000000}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.cmake.org/CMake/HTML/Download.html}}}{\insrsid2115186 .
|
||||
680074006d006c0000000000000000000065}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.cmake.org/CMake/HTML/Download.html}}}{\insrsid2115186 .
|
||||
\par }\pard\plain \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard\plain \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
From the source distribution you can build CMake on UNIX you can build and install CMake by running:
|
||||
\par }\pard\plain \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 From the source distribution you can build CMake on
|
||||
UNIX you can build and install CMake by running:
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par cd CMake
|
||||
\par ./configure
|
||||
\par }{\insrsid5204228 ./bootstrap}{\insrsid2115186
|
||||
\par make
|
||||
\par make install
|
||||
\par }{\cf6\insrsid2115186 [the make install step is optional, cmake can run directly from the build directory if you want.]
|
||||
|
@ -2316,16 +2316,15 @@ From the source distribution you can build CMake on UNIX you can build and insta
|
|||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Running CMake for Windows / Microsoft Visual C++ (MSVC)
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\tx0\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
Run CMakeSetup.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory. A
|
||||
GUI will appear similar to what is shown below (but possibly different as CMake is still being developed). The top two entries are the source code and binary directories. They allow you to specify where the source code is for what you wanted to compile an
|
||||
d
|
||||
where the resulting binaries should be placed. You should set these two values first. If the binary directory you specify does not exist, it will be created for you. The Build for option, allows you to select which type of build files are generated. Cu
|
||||
rrently, on windows, visual studio 7 (.NET), visual studio 6, NMake makefiles and Borland makefiles are supported.
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 Run CMakeSetup.exe, which should be in your Start menu under Program Files, there may also
|
||||
be a shortcut on your desktop, or if you built from source, it will be in the build directory. A GUI will appear similar to what is shown below (but possibly different as CMake is still being developed). The top two entries are the source code and binary
|
||||
|
||||
directories. They allow you to specify where the source code is for what you wanted to compile and where the resulting binaries should be placed. You should set these two values first. If the binary directory you specify does not exist, it will be created
|
||||
for you. The Build for option, allows you to select which type of build files are generated. Currently, on windows, visual studio 7 (.NET), visual studio 6, NMake makefiles and Borland makefiles are supported.
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\par }{\insrsid7953135 {\*\shppict{\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}
|
||||
\par }{\insrsid3695913 {\*\shppict{\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}
|
||||
\picscalex67\picscaley67\piccropl0\piccropr0\piccropt0\piccropb0\picw22595\pich13626\picwgoal12810\pichgoal7725\pngblip\bliptag-592847259{\*\blipuid dca9de65cd7087e85a0f9d3c27572f1b}
|
||||
89504e470d0a1a0a0000000d4948445200000356000002030802000000880a18cc0000000373424954050605330b8d80000000017352474200aece1ce9000073
|
||||
6749444154785eedbdbfaee54696a77b4ea31b481903641b63b431c6181718155486ca6ccc7d81f2aa5ea1d096807a813c4aa7a0a7e8e957903c99278d2b4c7a
|
||||
|
@ -9698,28 +9697,30 @@ f700fe00000000fe0000840000006365fe0000000000000000000000000000000000000000000000
|
|||
0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202000000040000002701ffff030000000000}}}{\insrsid2115186
|
||||
\par
|
||||
\par }\pard \qj \li810\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin810\itap0 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 The cache values area is where you can specify different options for the build process. The example show
|
||||
n below is for VTK that has a large number of options. More obscure variables maybe hidden, but can be seen if you click on the \'93Show Advanced Values\'94
|
||||
button. Once you have specified the source code and binary directories you should click the Configure but
|
||||
ton. This will cause CMake to read in the CMakeLists.txt files from the source code directory and the cache area to be updated to display any new options for the project. Adjust your cache settings if desired and click the Configure button again. New valu
|
||||
e
|
||||
s that were caused by the configure process will be colored red. To be sure you have seen all possible values you should click Configure until no values are red and you are happy with all the settings. Once you are done configuring, click the OK butto
|
||||
n, this will produce Microsoft Visual C++ workspaces and exit CMakeSetup.exe.
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
The cache values area is where you can specify different options for the build process. The example shown below is for VTK that has a large number of options. More obscure variables maybe hidden, but can be seen if you click on the \'93
|
||||
Show Advanced Values\'94 b
|
||||
utton. Once you have specified the source code and binary directories you should click the Configure button. This will cause CMake to read in the CMakeLists.txt files from the source code directory and the cache area to be updated to display any new optio
|
||||
n
|
||||
s for the project. Adjust your cache settings if desired and click the Configure button again. New values that were caused by the configure process will be colored red. To be sure you have seen all possible values you should click Configure until no val
|
||||
ues are red and you are happy with all the settings. Once you are done configuring, click the OK button, this will produce Microsoft Visual C++ workspaces and exit CMakeSetup.exe.
|
||||
\par
|
||||
\par CMakeSetup.exe generates the build files in the binary directory you specified. If Visual Studio 6 or 7 was selected as the Build For option, a MSVC workspace file is created.
|
||||
Typically this file has the same name as what you are compiling (e.g. VTK.dsw, VTK.sln, ITK.dsw, ITK.sln etc). For the other Build For types, makefiles are generated.
|
||||
\par The next step in this process is to open the workspace with MSVC. Once open, the pro
|
||||
ject can be built in the normal manner of Microsoft Visual C++. The ALL_BUILD target can be used to build all of the libraries and executables in the package. If you are using a makefile build type, then you can follow the Unix instructions.
|
||||
\par CMakeSetup.exe generates the build files in the binary directory you spe
|
||||
cified. If Visual Studio 6 or 7 was selected as the Build For option, a MSVC workspace file is created. Typically this file has the same name as what you are compiling (e.g. VTK.dsw, VTK.sln, ITK.dsw, ITK.sln etc). For the other Build For types, makefil
|
||||
es are generated.
|
||||
\par The next step in this process is to open the workspace with MSVC. Once open, the project can be built in the normal manner of Microsoft Visual C++. The ALL_BUILD target can be used to build all of the libraries and executables in the pa
|
||||
ckage. If you are using a makefile build type, then you can follow the Unix instructions.
|
||||
\par
|
||||
\par }\pard\plain \s22\qc \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Running CMake on Unix
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
On most unix platforms, if the curses library is supported, cmake will build an executable called ccmake. This interface is a terminal based text application that is very similar to the windows GUI. To run ccmake, change directori
|
||||
es into the directory where you want the binaries to be placed. This can be the same directory as the source code for what we call in-place builds (the binaries are in the same place as the source code) or it can be a new directory you create. Then run c
|
||||
cmake with either no arguments for an in-place-build, or with the path to the source directory on the command line. This will start the text interface that looks something like this:
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 On most unix platforms, if the curses library is supported, cmake will build an executable called ccmake. This interface is a terminal ba
|
||||
sed text application that is very similar to the windows GUI. To run ccmake, change directories into the directory where you want the binaries to be placed. This can be the same directory as the source code for what we call in-place builds (the binaries
|
||||
a
|
||||
re in the same place as the source code) or it can be a new directory you create. Then run ccmake with either no arguments for an in-place-build, or with the path to the source directory on the command line. This will start the text interface that look
|
||||
s something like this:
|
||||
\par
|
||||
\par }{\insrsid7953135 {\*\shppict{\pict{\*\picprop\shplid1026{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn borderTopColor}{\sv 0}}
|
||||
\par }{\insrsid3695913 {\*\shppict{\pict{\*\picprop\shplid1026{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn borderTopColor}{\sv 0}}
|
||||
{\sp{\sn borderLeftColor}{\sv 0}}{\sp{\sn borderBottomColor}{\sv 0}}{\sp{\sn borderRightColor}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}\brdrt\brdrs\brdrw15\brdrcf1 \brdrl\brdrs\brdrw15\brdrcf1 \brdrb\brdrs\brdrw15\brdrcf1
|
||||
\brdrr\brdrs\brdrw15\brdrcf1 \picscalex72\picscaley72\piccropl0\piccropr0\piccropt0\piccropb0\picw21167\pich13229\picwgoal12000\pichgoal7500\pngblip\bliptag479543899{\*\blipuid 1c95425b5188583fdbdd66f6b4c4e705}
|
||||
89504e470d0a1a0a0000000d4948445200000320000001f408020000004a22de2f000000017352474200aece1ce9000054a449444154785eed9d6bdaec288e6e
|
||||
|
@ -13191,19 +13192,19 @@ c69b55f9afe7fc1a6e0e5934e7ec1f8856107b0781b7ae027f768e227394337eb66880c0bb09cce9
|
|||
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
|
||||
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222040000002701ffff030000000000}}}{\insrsid2115186
|
||||
\par
|
||||
\par If you hit the \'93c\'94 key, it will confi
|
||||
gure the project. You should use that as you change values in the cache. To change values, use the arrow keys to select cache entries, and the enter key to edit them. Boolean values will toggle with the enter key. Once you have set all the values as y
|
||||
ou like, you can hit the \lquote G\'94 key to generate the makefiles and exit. You can also hit \'93h\'94 for help, \'93q\'94 to quit, and \'93t\'94 to toggle the viewing of advanced cache entries.
|
||||
\par If you hit the \'93c\'94 key, it will configure the project. You should use that as you change values in the cache. To change values, use the arrow keys to select cache entries, and the enter key to edit
|
||||
them. Boolean values will toggle with the enter key. Once you have set all the values as you like, you can hit the \lquote G\'94 key to generate the makefiles and exit. You can also hit \'93h\'94 for help, \'93q\'94 to quit, and \'93t\'94
|
||||
to toggle the viewing of advanced cache entries.
|
||||
\par
|
||||
\par }\pard\plain \s22\qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Two examples of CMake usage on the Unix platform follow for a hello world project cal
|
||||
led Hello. In the first example, and in-place build is performed, i.e., the binaries are placed in the same directory as the source code.
|
||||
\par }\pard\plain \s22\qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
Two examples of CMake usage on the Unix platform follow for a hello world project called Hello. In the first example, and in-place build is performed, i.e., the binaries are placed in the same directory as the source code.
|
||||
\par }\pard \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 cd Hello
|
||||
\par }\pard \ql \fi720\li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 ccmake
|
||||
\par }\pard\plain \s22\ql \fi720\li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 make
|
||||
\par }\pard \s22\qj \fi720\li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard \s22\qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 In the second example, an out-of-place build is performed, i.e., the source code, libraries,
|
||||
and executables are produced in a directory separate from the source code directory(ies).
|
||||
\par }\pard \s22\qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
In the second example, an out-of-place build is performed, i.e., the source code, libraries, and executables are produced in a directory separate from the source code directory(ies).
|
||||
\par }\pard\plain \ql \li360\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin360\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186 mkdir Hello-Linux
|
||||
\par cd Hello-Linux
|
||||
|
@ -13213,84 +13214,85 @@ and executables are produced in a directory separate from the source code direct
|
|||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Running CMake from the command line
|
||||
\par }\pard\plain \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par From the command line, cmake can be run as an interactive question and answer session or as a non-interactive program. To run in interactive mode, just pass the option \'93-i\'94
|
||||
to cmake. This will cause cmake to ask you to enter a value for each value in the cache file for the project. The process stops when there are no longer any more questions to ask.
|
||||
\par From the command line, cmake can be run as an interactive question and answer session or as a non-interactive program. To run in interactive mode, just pass the option \'93-i\'94 to cmake. This will cause cmake to ask you
|
||||
to enter a value for each value in the cache file for the project. The process stops when there are no longer any more questions to ask.
|
||||
\par
|
||||
\par Using CMake to build a project in non-interactive mode is a simple process if the project does not have many options. For larger projects like VTK, using ccmake, cmake \endash
|
||||
i, or CMakeSetup is recommended. This is because as you change options in the CMakeCache.txt file, cmake may add new entries to that file. It can be difficult to know when to stop the run cmake, edit the cache file cycle without the aid of an interface.
|
||||
|
||||
\par }\pard \s22\qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par To build with just cmake change directory into where you want the binaries to be placed. For an in-place build you then run cmake and it will produce a CMakeCache.txt file that contains build options that you can adjust using any text edi
|
||||
tor. For non in-place builds the process is the same except you run cmake and provide the path to the source code as its argument. Once you have edited the CMakeCache.txt file you rerun cmake, repeat this process until you are happy with the cache setting
|
||||
s. The type make and your project should compile. Some projects will have install targets as well so you can type make install to install them.
|
||||
\par To build with just cmake change directory into where you want the binaries to be placed. For an in-place build you then run cmake and it will produce a CMakeCache.txt file that contains build options t
|
||||
hat you can adjust using any text editor. For non in-place builds the process is the same except you run cmake and provide the path to the source code as its argument. Once you have edited the CMakeCache.txt file you rerun cmake, repeat this process until
|
||||
you are happy with the cache settings. The type make and your project should compile. Some projects will have install targets as well so you can type make install to install them.
|
||||
\par
|
||||
\par When running cmake from the command line, it is possible to specify command line options to cmake that will set values in the cache. This is done with a \endash
|
||||
DVARIABLE:TYPE=VALUE syntax on the command line. This is useful for non-interactive nightly test builds.
|
||||
\par }\pard\plain \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 What is the CMake cache?
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 The cache is best thought of as a configuration file. Indeed Unix users could c
|
||||
onsider the cache as equivalent to the set of flags passed to the configure command. The first time CMake is run, it produces a CMakeCache.txt file.\~ This file contains things like the existence and location of native JPEG library.\~
|
||||
The entries are added in response to certain CMake commands (e.g. FIND_LIBRARY) as they are processed anywhere in CMakeLists files anywhere in the source tree.
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 The cache is best thought of as a configur
|
||||
ation file. Indeed Unix users could consider the cache as equivalent to the set of flags passed to the configure command. The first time CMake is run, it produces a CMakeCache.txt file.\~
|
||||
This file contains things like the existence and location of native JPEG library.\~ The entries are added in response to certain CMake commands (e.g. FIND_LIBRARY) as they are processed anywhere in CMakeLists files anywhere in the source tree.
|
||||
\par
|
||||
\par After CMake has been run, and created a CMakeCache.txt file - you may edit it. The CMake GUI, will allow you to edit
|
||||
the options easily, or you can edit the file directly. The main reason for editing the cache would be to give CMake the location of a native library such as JPEG, or to stop it from using a native library and use a version of the library in your source tr
|
||||
ee.
|
||||
\par After CMake has been run, and created a CMakeCache.txt file - you may edit it. T
|
||||
he CMake GUI, will allow you to edit the options easily, or you can edit the file directly. The main reason for editing the cache would be to give CMake the location of a native library such as JPEG, or to stop it from using a native library and use a ver
|
||||
sion of the library in your source tree.
|
||||
\par }\pard \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 {\insrsid2115186
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
CMake will not alter an existing entry in the cache file itself. If your CMakeLists.txt files change significantly, you will need to remove the relevant entries from the cache file. If you have not already hand-edited the cache file, you could just del
|
||||
ete it before re-running CMake.
|
||||
CMake will not alter an existing entry in the cache file itself. If your CMakeLists.txt files change significantly, you will need to remove the relevant entries from the cache file. If you have not already hand-edit
|
||||
ed the cache file, you could just delete it before re-running CMake.
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
Why do I have to edit the cache more than once for some projects?
|
||||
\par }\pard\plain \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par Some projects are very complex and setting one value in the cache may cause new options to appear the next time the cache is built. For example, VTK suppo
|
||||
rts the use of MPI for performing distributed computing. This requires the build process to determine where the MPI libraries and header files are and to let the user adjust their values. But MPI is only available if another option VTK_USE_PARALLEL is fir
|
||||
st turned on in VTK. So to avoid confusion for people who don\rquote
|
||||
t know what MPI is, we hide those options until VTK_USE_PARALLEL is turned on. So CMake shows the VTK_USE_PARALLEL option in the cache area, if the user turns that on and rebuilds the cache, new
|
||||
options will appear for MPI that they can then set. The rule is to keep building the cache until it doesn\rquote t change. For most projects this will be just once. For some complicated ones it will be twice.
|
||||
\par Some projects are very comp
|
||||
lex and setting one value in the cache may cause new options to appear the next time the cache is built. For example, VTK supports the use of MPI for performing distributed computing. This requires the build process to determine where the MPI libraries an
|
||||
d header files are and to let the user adjust their values. But MPI is only available if another option VTK_USE_PARALLEL is first turned on in VTK. So to avoid confusion for people who don\rquote
|
||||
t know what MPI is, we hide those options until VTK_USE_PARALLEL is
|
||||
turned on. So CMake shows the VTK_USE_PARALLEL option in the cache area, if the user turns that on and rebuilds the cache, new options will appear for MPI that they can then set. The rule is to keep building the cache until it doesn\rquote
|
||||
t change. For most projects this will be just once. For some complicated ones it will be twice.
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Utility Targets produced
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard\plain \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 In addition to the targets
|
||||
and rules to build object files, libraries and executables of a project, CMake creates some additional targets and rules. For Visual Studio projects, two utility projects are automatically created: ALL_BUILD and RUN_TESTS.
|
||||
\par
|
||||
\par {\listtext\pard\plain\s22 \f2 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls26\adjustright\rin-720\lin720\itap0 {\insrsid2115186 ALL_BUILD- This project
|
||||
depends on all of the libraries and executables in a project, and can be selected as the active project to build everything in the system. This is required because CMake allows for extra utility projects to be put in the system that you may not want run
|
||||
\par }\pard\plain \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
In addition to the targets and rules to build object files, libraries and executables of a project, CMake creates some additional targets and rules. For Visual Studio projects, two utility projects are automatically created: ALL_BUILD and RUN_TESTS.
|
||||
|
||||
each time with the Batch build facility of the Visual Studio. In addition, the ALL_BUILD target makes it easier to select between configurations in a large project. The Microsoft Visual C++ Batch build facility requires you to select the configuration
|
||||
for each library or executable by hand. This can be done once for all targets using CMake\rquote s ALL_BUILD target.
|
||||
\par
|
||||
\par {\listtext\pard\plain\s22 \f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls26\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
ALL_BUILD- This project depends on all of the libraries and executables in a project, and can be selected as the active project to build everything in the
|
||||
system. This is required because CMake allows for extra utility projects to be put in the system that you may not want run each time with the Batch build facility of the Visual Studio. In addition, the ALL_BUILD target makes it easier to select betwee
|
||||
n configurations in a large project. The Microsoft Visual C++ Batch build facility requires you to select the configuration for each library or executable by hand. This can be done once for all targets using CMake\rquote s ALL_BUILD target.
|
||||
\par }\pard \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par {\listtext\pard\plain\s22 \f2 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls26\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
RUN_TESTS- This project will run ctest which will run all the tests in your project, see ADD_TEST.
|
||||
\par {\listtext\pard\plain\s22 \f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls26\adjustright\rin-720\lin720\itap0 {\insrsid2115186 RUN_TESTS- This p
|
||||
roject will run ctest which will run all the tests in your project, see ADD_TEST.
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par With CMake generated makefiles, the following targets are defined: depend, rebuild_cache, edit_cache, dependlocal, install, clean, and test. To run any of these targets simply run make target in a directory with a cmake generated makefile.
|
||||
\par
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls27\adjustright\rin-720\lin720\itap0 {\insrsid2115186 depend \endash This target runs cmake to generate dependenci
|
||||
es for the source files.
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}rebuild_cache \endash This target runs cmake on the source tree and picks up additional cache entries if they exist.
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}edit_cache \endash This target will run ccmake or CMakeSetup for the current project
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}dependlocal \endash This target generates dependencies for the current directory only.
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}install \endash This target will perform a UNIX style installation of the software based on the INSTALL_TARGETS command.
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}clean \endash This target will remove all generated files.
|
||||
\par {\listtext\pard\plain\f2 \hich\af2\dbch\af0\loch\f2 o\tab}test \endash This target will run all the tests for a project, see ADD_TEST.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls27\adjustright\rin-720\lin720\itap0 {\insrsid2115186 depend \endash
|
||||
This target runs cmake to generate dependencies for the source files.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}rebuild_cache \endash This target runs cmake on the source tree and picks up additional cache entries if they exist.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}edit_cache \endash This target will run ccmake or CMakeSetup for the current project
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}dependlocal \endash This target generates dependencies for the current directory only.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}install \endash This target will perform a UNIX style installation of the software based on the INSTALL_TARGETS command.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}clean \endash This target will remove all generated files.
|
||||
\par {\listtext\pard\plain\f2\insrsid2115186 \hich\af2\dbch\af0\loch\f2 o\tab}test \endash This target will run all the tests for a project, see ADD_TEST.
|
||||
\par }\pard \ql \li360\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin360\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s1\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin0\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par Developer's Guide
|
||||
\par }\pard\plain \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par This section describes how to use CMake from the software developer\rquote s point of view. That is, if your aim is to use CMake to manage your build process, read this section first. An Extension Guide f
|
||||
ollows later in this document to explain the internals of CMake, and how to setup the CMake environment. Read that section only if you plan to install, extend, or enhance the features of CMake. This section of the User\rquote
|
||||
s Guide begins with a description of the CMake inputs. Examples then follow to clarify these descriptions.
|
||||
\par This section describes how to use CMake from the software developer\rquote
|
||||
s point of view. That is, if your aim is to use CMake to manage your build process, read this section first. An Extension Guide follows later in this document to explain the internals of CMake, and how to setup the CMake environment. Read that section onl
|
||||
y if you plan to install, extend, or enhance the features of CMake. This section of the User\rquote s Guide begins with a description of the CMake inputs. Examples then follow to clarify these descriptions.
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s2\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin-720\lin0\itap0 \b\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Input to CMake
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 CMake\rquote s input is the text file
|
||||
CMakeLists.txt in your source directory. This input file specifies the things that need to be built in the current directory. The CMakeLists.txt consists of one or more commands. Each command is of the form:
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 CMake\rquote s input is the text file CMakeList
|
||||
s.txt in your source directory. This input file specifies the things that need to be built in the current directory. The CMakeLists.txt consists of one or more commands. Each command is of the form:
|
||||
\par }\pard \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par COMMAND(args\'85)
|
||||
\par
|
||||
\par }\pard \qj \li0\ri-720\nowidctlpar\faauto\rin-720\lin0\itap0 {\insrsid2115186 Where COMMAND is the name of
|
||||
the command, and args is a white-space separated list of arguments to the command. (Arguments with embedded white-space should be quoted.) Typically there will be a CMakeLists.txt file for each directory of the project. Let\rquote
|
||||
\par }\pard \qj \li0\ri-720\nowidctlpar\faauto\rin-720\lin0\itap0 {\insrsid2115186 Where COMMAND is the name of the comman
|
||||
d, and args is a white-space separated list of arguments to the command. (Arguments with embedded white-space should be quoted.) Typically there will be a CMakeLists.txt file for each directory of the project. Let\rquote
|
||||
s start with a simple example. Consider building hello world. You would have a source tree with the following files:
|
||||
\par
|
||||
\par Hello.c CMakeLists.txt
|
||||
|
@ -13301,8 +13303,8 @@ s start with a simple example. Consider building hello world. You would have a s
|
|||
\par ADD_EXECUTABLE(Hello Hello.c)
|
||||
\par
|
||||
\par To build the Hello executable you just follow the process described in }{\b\insrsid2115186 Running CMake}{\insrsid2115186
|
||||
above to generate the makefiles or Microsoft project files. The PROJECT command indicates what the name of the resulting workspace should be and the ADD_EXECUTABLE command adds an executable target to the build process. That\rquote
|
||||
s all there is to it for this simple example. If your project requires a few files it is also quite easy, just modify the ADD_EXECUTABLE line as shown below.
|
||||
above to generate the makefiles or Microsoft project files. The PROJECT command indicates what the name of the resulting workspace should be and the ADD_EXECUTABLE command adds an executable target to the build process. That\rquote s al
|
||||
l there is to it for this simple example. If your project requires a few files it is also quite easy, just modify the ADD_EXECUTABLE line as shown below.
|
||||
\par
|
||||
\par ADD_EXECUTABLE(Hello Hello.c File2.c File3.c File4.c)
|
||||
\par
|
||||
|
@ -13324,17 +13326,16 @@ s all there is to it for this simple example. If your project requires a few fil
|
|||
\par TARGET_ADD_LIBRARY (Hello TCL_LIBRARY)
|
||||
\par ENDIF (TCL_LIBRARY)
|
||||
\par
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 In this example
|
||||
the SET command is used to group together source files into a list. The IF command is used to add either WinSupport.c or UnixSupport.c to this list. And finally the ADD_EXECUTABLE command is used to build the executable with the files listed in the sourc
|
||||
e
|
||||
list HELLO_SRCS. The FIND_LIBRARY command looks for the Tcl library under a few different names and in a few different paths, and if it is found adds it to the link line for the Hello executable target. Note the use of the # character to denote a comment
|
||||
line.
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
In this example the SET command is used to group together source files into a list. The IF command is used to add either WinSupport.c or UnixSupport.c to this list. And finally the ADD_EXECUTABLE command is used to build the executable
|
||||
with the files listed in the source list HELLO_SRCS. The FIND_LIBRARY command looks for the Tcl library under a few different names and in a few different paths, and if it is found adds it to the link line for the Hello executable target. Note the use of
|
||||
the # character to denote a comment line.
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
CMake always defines some variables for use within CMakeList files. For example, WIN32 is always defined on windows systems and UNIX is always defined for UNIX systems. CMake defines a number of commands. A brief summary of the most commonly used co
|
||||
mmands follows here. Later in the document an exhaustive list of all pre-defined commands is presented. (You may also add your own commands, see the Extension Guide for more information.)
|
||||
CMake always defines some variables for use within CMakeList files. For example, WIN32 is always defined on windows systems and UNIX is always defined for UNIX systems. CMake defines a number of commands. A brief
|
||||
summary of the most commonly used commands follows here. Later in the document an exhaustive list of all pre-defined commands is presented. (You may also add your own commands, see the Extension Guide for more information.)
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par {\pntext\pard\plain\hich\af0\dbch\af0\loch\f0 A)\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls9\pnrnot0\pnucltr\pnstart1\pnindent360\pnsp120\pnhang {\pntxta )}}
|
||||
\par {\pntext\pard\plain\insrsid2115186 \hich\af0\dbch\af0\loch\f0 A)\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls9\pnrnot0\pnucltr\pnstart1\pnindent360\pnsp120\pnhang {\pntxta )}}
|
||||
\aspalpha\aspnum\faauto\ls9\adjustright\rin-720\lin720\itap0 {\insrsid2115186 Build Targets:
|
||||
\par }\pard \ql \li1440\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1440\itap0 {\insrsid2115186 SET()
|
||||
\par SUBDIRS()
|
||||
|
@ -13344,227 +13345,239 @@ mmands follows here. Later in the document an exhaustive list of all pre-defined
|
|||
\par PROJECT()
|
||||
\par }\pard \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par }\pard \qj \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
CMake works recursively, descending from the current directory into any subdirectories listed in the SUBDIRS command. The command SET is used for setting a variable, in this case to a list of source files. (Note: currentl
|
||||
y only C and C++ code can be compiled.) ADD_LIBRARY adds a library to the list of targets this makefile will produce. ADD_EXECUTABLE adds an executable to the list of targets this makefile will produce. (Note: source code is compiled first, then libraries
|
||||
|
||||
are built, and then executables are created.) The AUX_SOURCE_DIRECTORY is a directory where other source code, not in this directory, whose object code is to be inserted into the current LIBRARY. All source files in the AUX_SOURCE_DIRECTORY are compiled
|
||||
(e.g. *.c, *.cxx, *.cpp, etc.). PROJECT (PojectName) is a special variable used in the MSVC to create the project for the compiler, it also defines two useful variables for CMAKE: ProjectName_SOURCE_DIR and ProjectName_BINARY_DIR.
|
||||
CMake works recursively, descending from the current directory into any subdirectories listed in the SUBDIRS command. The command SET is used for setting a variable, in this case to
|
||||
a list of source files. (Note: currently only C and C++ code can be compiled.) ADD_LIBRARY adds a library to the list of targets this makefile will produce. ADD_EXECUTABLE adds an executable to the list of targets this makefile will produce. (Note: sourc
|
||||
e
|
||||
code is compiled first, then libraries are built, and then executables are created.) The AUX_SOURCE_DIRECTORY is a directory where other source code, not in this directory, whose object code is to be inserted into the current LIBRARY. All source files i
|
||||
n
|
||||
the AUX_SOURCE_DIRECTORY are compiled (e.g. *.c, *.cxx, *.cpp, etc.). PROJECT (PojectName) is a special variable used in the MSVC to create the project for the compiler, it also defines two useful variables for CMAKE: ProjectName_SOURCE_DIR and ProjectNa
|
||||
me_BINARY_DIR.
|
||||
\par }\pard \ql \fi720\li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par {\pntext\pard\plain\hich\af0\dbch\af0\loch\f0 B)\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pnucltr\pnstart2\pnindent360\pnsp120\pnhang {\pntxta )}}\aspalpha\aspnum\faauto\ls6\adjustright\rin-720\lin720\itap0 {
|
||||
\insrsid2115186 Build flags and options. In addition to the commands listed above, CMakeLists.txt often contain the following commands:
|
||||
\par {\pntext\pard\plain\insrsid2115186 \hich\af0\dbch\af0\loch\f0 B)\tab}}\pard \ql \fi-360\li720\ri-720\widctlpar{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pnucltr\pnstart2\pnindent360\pnsp120\pnhang {\pntxta )}}
|
||||
\aspalpha\aspnum\faauto\ls6\adjustright\rin-720\lin720\itap0 {\insrsid2115186 Build flags and options. In addition to the commands listed above, CMakeLists.txt often contain the following commands:
|
||||
\par }\pard \ql \li720\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par }\pard \ql \li1440\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin1440\itap0 {\insrsid2115186 INCLUDE_DIRECTORIES()
|
||||
\par LINK_DIRECTORIES()
|
||||
\par LINK_LIBRARIES()
|
||||
\par TARGET_LINK_LIBRARIES()
|
||||
\par }\pard \ql \li720\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par }\pard \qj \li720\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186 These commands define directories and libraries us
|
||||
ed to compile source code and build executables. An important feature of the commands listed above is that are inherited by any subdirectories. That is, as CMake descends through a directory hierarchy (defined by SUBDIRS()) these commands are expanded eac
|
||||
h
|
||||
time a definition for a command is encountered. For example, if in the top-level CMakeLists file has INCLUDE_DIRECTORIES(/usr/include), with SUBDIRS(./subdir1), and the file ./subdir1/CMakeLists.txt has INCLUDE_DIRECTORIES(/tmp/foobar), then the net resu
|
||||
lt is
|
||||
\par }\pard \qj \li720\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186 These commands define directori
|
||||
es and libraries used to compile source code and build executables. An important feature of the commands listed above is that are inherited by any subdirectories. That is, as CMake descends through a directory hierarchy (defined by SUBDIRS()) these comman
|
||||
d
|
||||
s are expanded each time a definition for a command is encountered. For example, if in the top-level CMakeLists file has INCLUDE_DIRECTORIES(/usr/include), with SUBDIRS(./subdir1), and the file ./subdir1/CMakeLists.txt has INCLUDE_DIRECTORIES(/tmp/foobar)
|
||||
, then the net result is
|
||||
\par }\pard \ql \li1170\ri-720\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 {\insrsid2115186
|
||||
\par \tab INCLUDE_DIRECTORIES(/usr/include /tmp/foobar)
|
||||
\par
|
||||
\par {\pntext\pard\plain\hich\af0\dbch\af0\loch\f0 C)\tab}}\pard \qj \fi-360\li720\ri-720\widctlpar{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pnucltr\pnstart2\pnindent360\pnsp120\pnhang {\pntxta )}}\aspalpha\aspnum\faauto\ls6\adjustright\rin-720\lin720\itap0 {
|
||||
\insrsid2115186 CMake comes with a number of modules that look for commonly used packages such as OpenGL or Java. These modules save you from having to write all the CMake code to find these packages yourself. Modu
|
||||
les can be used by including them into your CMakeList file as shown below.
|
||||
\par {\pntext\pard\plain\insrsid2115186 \hich\af0\dbch\af0\loch\f0 C)\tab}}\pard \qj \fi-360\li720\ri-720\widctlpar{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pnucltr\pnstart2\pnindent360\pnsp120\pnhang {\pntxta )}}
|
||||
\aspalpha\aspnum\faauto\ls6\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
CMake comes with a number of modules that look for commonly used packages such as OpenGL or Java. These modules save you from having to write all the CMake code to find these pack
|
||||
ages yourself. Modules can be used by including them into your CMakeList file as shown below.
|
||||
\par }\pard \ql \li1440\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1440\itap0 {\insrsid2115186
|
||||
\par INCLUDE ($\{CMAKE_ROOT\}/Modules/FindTCL.cmake)
|
||||
\par
|
||||
\par }\pard \qj \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186 CMAKE_ROOT is always defined in CMake and can be used to point to where CMake was installed. Looking through some of the files in t
|
||||
he Modules subdirectory can provide good ideas on how to use some of the CMake commands.
|
||||
\par }\pard \qj \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186 CMAKE_ROOT is always defined in CMake and can be used to point to where CMake was installed. Looki
|
||||
ng through some of the files in the Modules subdirectory can provide good ideas on how to use some of the CMake commands.
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par Adding A New Directory to a project
|
||||
\par }\pard\plain \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
A common way to extend a project is to add a new directory. This involves three steps:
|
||||
\par
|
||||
\par {\listtext\pard\plain\s22 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186 Create the new directory somewhere in y
|
||||
our source directory hierarchy.
|
||||
\par {\listtext\pard\plain\s22 \insrsid2115186 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186 Create
|
||||
the new directory somewhere in your source directory hierarchy.
|
||||
\par }\pard \s22\ql \li360\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin360\itap0 {\insrsid2115186
|
||||
\par {\listtext\pard\plain\s22 \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par {\listtext\pard\plain\s22 \insrsid2115186 \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
Add the new directory to the SUBDIRS command in the parent directories CMakeLists.txt
|
||||
\par }\pard \s22\ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par {\listtext\pard\plain\s22 \hich\af0\dbch\af0\loch\f0 3.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par {\listtext\pard\plain\s22 \insrsid2115186 \hich\af0\dbch\af0\loch\f0 3.\tab}}\pard \s22\ql \fi-360\li720\ri-720\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls16\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
Create a CMakeLists.txt in the new directory with the appropriate commands
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par
|
||||
\par }\pard\plain \s2\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin-720\lin0\itap0 \b\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 CMake Commands
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
The following is an exhaustive list of pre-defined CMake commands, with brief descriptions.
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 The f
|
||||
ollowing is an exhaustive list of pre-defined CMake commands, with brief descriptions.
|
||||
\par
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ql \fi-360\li720\ri-720\sb100\sa100\sbauto1\saauto1\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls28\adjustright\rin-720\lin720\itap0 {\b\insrsid2115186 ADD_CUSTOM_COMMAND}{
|
||||
\insrsid2115186 - Create new command within CMake. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ADD_CUSTOM_COMMAND([SOURCE source] COMMAND command TARGET target [ARGS [args...]] [DEPENDS [depends...]] [OUTPUTS [outputs...]]) Add a custom command.
|
||||
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_CUSTOM_TARGET}{\insrsid2115186 - Add an extra target to the build system that does not produce output, so it is run each time the target is built. \line }{
|
||||
\i\insrsid2115186 Usage:}{\insrsid2115186 ADD_CUSTOM_TARGET(Name [ALL] command arg arg arg ...) The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_DEFINITIONS}{\insrsid2115186 - Add -D define flags to command line for environments. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ql \fi-360\li720\ri-720\sb100\sa100\sbauto1\saauto1\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls28\adjustright\rin-720\lin720\itap0 {\b\insrsid2115186
|
||||
ADD_CUSTOM_COMMAND}{\insrsid2115186 - Create new command within CMake. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ADD_CUSTOM_COMMAND([SOURCE source] COMMAND command TARGET target [ARGS [args...]] [DEPENDS [depends...]]
|
||||
[OUTPUTS [outputs...]]) Add a custom command.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_CUSTOM_TARGET}{\insrsid2115186 - Add an extra target to the build system that does not produce output, so it is run each time the target is built.
|
||||
\line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ADD_CUSTOM_TARGET(Name [ALL] command arg arg arg ...) The ALL option is optional. If it is specified it indicates that this target should be added to the Build all target.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_DEFINITIONS}{\insrsid2115186 - Add -D define flags to command line for environments. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_DEFINITIONS(-DFOO -DBAR ...) Add -D define flags to command line for environments.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_DEPENDENCIES}{\insrsid2115186 - Add an dependency to a target \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_DEPENDENCIES}{\insrsid2115186 - Add an dependency to a target \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_DEPENDENCIES(target-name depend-target depend-target) Add a dependency to a target. This is only used to add dependencies between one executable and another. Regular build dependencies are handled automatically.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_EXECUTABLE}{\insrsid2115186 - Add an executable to the project that uses the specified srclists \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_EXECUTABLE(exename srclist srclist srclist ...) ADD_EXECUTABLE(exename WIN32 srclist srclist srclist ...)This comma
|
||||
nd adds an executable target to the current directory. The executable will be built from the source files / source lists specified. The second argument to this command can be WIN32 which indicates that the executable (when compiled on windows) is a window
|
||||
s app (using WinMain)not a console app (using main).
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_LIBRARY}{\insrsid2115186 - Add an library to the project that uses the specified srclists \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_EXECUTABLE}{\insrsid2115186 - Add an executable to the project that uses the specified srclists \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_EXECUTABLE(exename srclist srclist srclist ...) ADD_EXECUTABLE(exename WIN32 srclist srclist srclist ...)This command ad
|
||||
ds an executable target to the current directory. The executable will be built from the source files / source lists specified. The second argument to this command can be WIN32 which indicates that the executable (when compiled on windows) is a windows app
|
||||
(using WinMain)not a console app (using main).
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_LIBRARY}{\insrsid2115186 - Add an library to the project that uses the specified srclists \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_LIBRARY(libname [SHARED | STATIC | MODULE] srclist srclist ...) Adds a library target. SHARED, STATIC or MODULE k
|
||||
eywords are used to set the library type. If the keywork MODULE appears, the library type is set to MH_BUNDLE on systems which use dyld. Systems without dyld MODULE is treated like SHARED. If no keywords appear as the second argument, the type defaults to
|
||||
the current value of BUILD_SHARED_LIBS. If this variable is not set, the type defaults to STATIC.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_TEST}{\insrsid2115186 - Add a test to the project with the specified arguments. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ADD_TEST}{\insrsid2115186 - Add a test to the project with the specified arguments. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ADD_TEST(testname exename arg1 arg2 arg3 ...) If the ENABLE_TESTING command has b
|
||||
een run, this command adds atest target to the current directory. If ENABLE_TESTING has notbeen run, this command does nothing. The tests are run by the testing subsystem by executing exename with the specified arguments. exename can be either an executab
|
||||
le built by built by this project or an arbitrary executable on the system (like tclsh).
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 AUX_SOURCE_DIRECTORY}{\insrsid2115186 - Add all the source files found in the specified directory to the build as source list NAME. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 AUX_SOURCE_DIRECTORY(dir srcListName)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 BUILD_COMMAND}{\insrsid2115186 - Determine the command line that will build this project. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 AUX_SOURCE_DIRECTORY}{\insrsid2115186 - Add all the source files found in the specified directory to the build as source list NAME. \line }{
|
||||
\i\insrsid2115186 Usage:}{\insrsid2115186 AUX_SOURCE_DIRECTORY(dir srcListName)
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 BUILD_COMMAND}{\insrsid2115186 - Determine the command line that will build this project. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
BUILD_COMMAND(NAME MAKECOMMAND) Within CMAKE set NAME to the command that will build this project from the command line using MAKECOMMAND.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 BUILD_NAME}{\insrsid2115186 - Set a CMAKE variable to the build type. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 BUILD_NAME}{\insrsid2115186 - Set a CMAKE variable to the build type. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
BUILD_NAME(NAME) Within CMAKE sets NAME to the build type.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CMAKE_MINIMUM_REQUIRED}{\insrsid2115186 - Set the minimum required version of cmake for a project. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CMAKE_MINIMUM_REQUIRED}{\insrsid2115186 - Set the minimum required version of cmake for a project. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION versionNumber) Let cmake know that the project requires a certain version of a cmake, or newer. CMake will also try to backwards compatible to the version of cmake specified, if a newer version of cmake is running.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CONFIGURE_FILE}{\insrsid2115186 - Create a file from an autoconf style file.in file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 CONFIGURE_
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CONFIGURE_FILE}{\insrsid2115186 - Create a file from an autoconf style file.in file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 CONFIGURE_
|
||||
FILE(InputFile OutputFile [COPYONLY] [ESCAPE_QUOTES] [IMMEDIATE] [@ONLY]) The Input and Ouput files have to have full paths. They can also use variables like CMAKE_BINARY_DIR,CMAKE_SOURCE_DIR. This command replaces any variables in the input file with the
|
||||
i
|
||||
r values as determined by CMake. If a variables in not defined, it will be replaced with nothing. If COPYONLY is passed in, then then no varible expansion will take place. If ESCAPE_QUOTES is passed in then any substitued quotes will be C style escaped. I
|
||||
f IMMEDIATE is specified, then the file will be configured with the current values of CMake variables instead of waiting until the end of CMakeLists processing. If @ONLY is present, only variables of the form @var@ will be replaces and $\{var\}
|
||||
will be ignored. This is useful for configuring tcl scripts that use $\{var\}.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CREATE_TEST_SOURCELIST}{\insrsid2115186 - Create a test driver and source list for building test programs. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
CREATE_TEST_SOURCELIST(SourceListName DriverName test1 test2 test3 EXTRA_INCLUDE include.h FU
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 CREATE_TEST_SOURCELIST}{\insrsid2115186 - Create a test driver and source list for building test programs. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 CREATE_TEST_SOURCELIST(SourceListName DriverName test1 test2 test3 EXTRA_INCLUDE include.h FU
|
||||
NCTION function)The list of source files needed to build the testdriver will be in SourceListName. DriverName.cxx is the name of the test driver program. The rest of the arguments consist of a list of test source files, can be ; separated. Each test sourc
|
||||
e
|
||||
file should have a function in it that is the same name as the file with no extension (foo.cxx should have int foo();) DriverName.cxx will be able to call each of the tests by name on the command line. If EXTRA_INCLUDE is specified, then the next argumen
|
||||
t is included into the generated file. If FUNCTION is specified, then the next argument is taken as a function name that is passed a pointer to ac and av. This can be used to add extra command line processing to each test.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ELSE}{\insrsid2115186 - starts the else portion of an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ELSE}{\insrsid2115186 - starts the else portion of an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ELSE(args), Note that the args for the ELSE clause must match those of the IF clause. See the IF command for more information.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENABLE_TESTING}{\insrsid2115186 - Enable testing for this directory and below. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ENABLE_TESTING() Enables testing f
|
||||
or this directory and below. See also the ADD_TEST command. Note that Dart expects to find this file in the build directory root; therefore, this command should be in the source directory root too.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENDFOREACH}{\insrsid2115186 - ends a foreach block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ENDFOREACH(define)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENDIF}{\insrsid2115186 - ends an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ENDIF(define)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 EXEC_PROGRAM}{\insrsid2115186 - Run and executable program during the processing of the CMakeList.txt file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
EXEC_PROGRAM(Executable [Directory to run in] [ARGS arguments to executable])The executable is run in the optionally specified Directory. The executable can include arguments if it is double quoted, but it is better to use the optional ARGS argument to sp
|
||||
ecify arguments to the program. This is because cmake will then be able to escape spaces in the Executable path.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_FILE}{\insrsid2115186 - Find a file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_FILE(NAME file extrapath extrapath ... [DOC docstring])Find a file in the system PATH or in any extra pa
|
||||
ths specified in the command.A cache entry called NAME is created to store the result. NOTFOUND is the value used if the file was not found. If DOC is specified the next argument is the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_LIBRARY}{\insrsid2115186 - Find a library. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_LIBRARY(DEFINE_PATH libraryName [NAMES name1 name2 name3...] [PATHS path1 path2 path3...] [DOC docstring] ) If the library is found, then DEFINE_PATH is set to the full path where it was found. If DOC is specified the next argument i
|
||||
s the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_PATH}{\insrsid2115186 - Find a path for a file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_PATH(PATH_DEFINE fileName path1 path2 path3...) If the file is found, then PATH_DEFINE is set to the path where it was found.If DOC is specified the next argument is the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_PROGRAM}{\insrsid2115186 - Find an executable program. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_PROGRAM(DEFINE_NAME executableName [NAMES name1 name2 name3...] [PATHS path1 path2 path3...] [NO_SYSTEM_PATH] [DOC helpstring]) Find
|
||||
the executable in the system PATH or in any extra paths specified in the command.A cache entry called DEFILE_NAME is created to store the result. NOTFOUND is the value used if the program was not found. If DOC is specified the next argument is the documen
|
||||
tation string for the cache entry NAME.If NO_SYSTEM_PATH is specified the contents of system PATH is not used
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FLTK_WRAP_UI}{\insrsid2115186 - Create FLTK user interfaces Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FLTK_WRAP_UI(resultingLibraryName SourceList) Produce .h and .cxx files for all the
|
||||
.fl and .fld file listed in the SourceList. The .h files will be added to the library using the base name in source list. The .cxx files will be added to the library using the base name in source list.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FOREACH}{\insrsid2115186 - start a foreach loop \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 FOREACH (define arg1 arg2 arg2) Starts a foreach block.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 GET_FILENAME_COMPONENT}{\insrsid2115186 - Get a specific component of a full filename. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
GET_FILENAME_COMPONENT(VarName FileName PATH|NAME|EXT|NAME_WE [CACHE]) Set VarName to be the path (PATH), file name (NAME), file exte
|
||||
nsion (EXT) or file name without extension (NAME_WE) of FileName. Note that the path is converted to Unix slashes format and has no trailing slashes. The longest file extension is always considered. Warning: as a utility command, the resulting value is no
|
||||
t put in the cache but in the definition list, unless you add the optional CACHE parameter.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 GET_SOURCE_FILE_PROPERTY}{\insrsid2115186 - Set attributes for a specific list of files. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENABLE_TESTING}{\insrsid2115186 - Enable testing for this directory and below. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ENABLE_TESTING() Enables testing for this directory and below. See also the ADD_TEST command. Note that Dart expects to find this file in the build directory root; therefore, this command should be in the source directory root too.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENDFOREACH}{\insrsid2115186 - ends a foreach block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ENDFOREACH(define)
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ENDIF}{\insrsid2115186 - ends an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ENDIF(define)
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 EXEC_PROGRAM}{\insrsid2115186 - Run and executable program during the processing of the CMakeList.txt file. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 EXEC_PROGRAM(Executable [Directory to run in] [ARGS arguments to executable])The executable is run in
|
||||
the optionally specified Directory. The executable can include arguments if it is double quoted, but it is better to use the optional ARGS argument to specify arguments to the program. This is because cmake will then be able to escape spaces in the Execu
|
||||
table path.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_FILE}{\insrsid2115186 - Find a file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_FILE(NAME file extrapath extrapath ... [DOC docstring])Find a file in the system PATH or in any extra paths specified in the command.A cache entry called NAME is created to store the result. NOTFOUND is th
|
||||
e value used if the file was not found. If DOC is specified the next argument is the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_LIBRARY}{\insrsid2115186 - Find a library. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_LIBRARY(DEFINE_PATH libraryName [NAMES name1 name2 name3...] [PATHS path1 path
|
||||
2 path3...] [DOC docstring] ) If the library is found, then DEFINE_PATH is set to the full path where it was found. If DOC is specified the next argument is the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_PATH}{\insrsid2115186 - Find a path for a file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 FI
|
||||
ND_PATH(PATH_DEFINE fileName path1 path2 path3...) If the file is found, then PATH_DEFINE is set to the path where it was found.If DOC is specified the next argument is the documentation string for the cache entry NAME.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FIND_PROGRAM}{\insrsid2115186 - Find an executable program. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FIND_PROGRAM(DEFINE_NAME executableName [NAMES name1 name2 name3...] [PATHS path1 path2 path3...] [NO_SYSTEM_PATH] [DOC helpstring]) Find the executable in the system PATH or in any extra paths specified in the command.A cache entry called
|
||||
DEFILE_NAME is created to store the result. NOTFOUND is the value used if the program was not found. If DOC is specified the next argument is the documentation string for the cache entry NAME.If NO_SYSTEM_PATH is specified the contents of system PATH is
|
||||
not used
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FLTK_WRAP_UI}{\insrsid2115186 - Create FLTK user interfaces Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FLTK_WRAP_UI(resultingLibraryName SourceList) Produce .h and .cxx files for all the .fl and .fld file listed in the SourceList. The .h files will be added to the library using the base
|
||||
name in source list. The .cxx files will be added to the library using the base name in source list.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 FOREACH}{\insrsid2115186 - start a foreach loop \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
FOREACH (define arg1 arg2 arg2) Starts a foreach block.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 GET_FILENAME_COMPONENT}{\insrsid2115186 - Get a specific component of a full filename. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
GET_FILENAME_COMPONENT(VarName FileName PATH|NAME|EXT|NAME_WE [CACHE]) Set VarName to be the path (PATH), file name (NAME), file extension (EXT) or file name without extension (NAME_WE) of FileName. N
|
||||
ote that the path is converted to Unix slashes format and has no trailing slashes. The longest file extension is always considered. Warning: as a utility command, the resulting value is not put in the cache but in the definition list, unless you add the o
|
||||
ptional CACHE parameter.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 GET_SOURCE_FILE_PROPERTY}{\insrsid2115186 - Set attributes for a specific list of files. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
GET_SOURCE_FILE_PROPERTY(VAR file [ABSTRACT|WRAP_EXCLUDE|COMPILE_FLAGS]) Get a property from a source file. The value of the property is stored in the variable VAR.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 IF}{\insrsid2115186 - start an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 IF (define) Starts an if block. Optionally it can
|
||||
be invoked using (NOT define) (def AND def2) (def OR def2) (def MATCHES def2) (COMMAND cmd) (EXISTS file) MATCHES checks if def matches the regular expression def2. COMMAND checks if the cmake command cmd is in this cmake executable. EXISTS file checks i
|
||||
f file exists.Additionally you can do comparisons using LESS GREATER STRLESS and STRGREATER. LESS and GREATER do numeric comparison while STRLESS and STRGREATER do string comparisons.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE}{\insrsid2115186 - Basically identical to a C #include "somthing" command. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 IF}{\insrsid2115186 - start an if block \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
IF (define) Starts an if block. Optionally it can be invoked using (NOT define) (def AND def2) (def OR def2) (def MATCHES def2) (COMMAND cmd) (EXISTS file) MATCHES checks if def matches the regular expression
|
||||
def2. COMMAND checks if the cmake command cmd is in this cmake executable. EXISTS file checks if file exists.Additionally you can do comparisons using LESS GREATER STRLESS and STRGREATER. LESS and GREATER do numeric comparison while STRLESS and STRGREATE
|
||||
R do string comparisons.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE}{\insrsid2115186 - Basically identical to a C #include "somthing" command. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INCLUDE(file1 [OPTIONAL]) If OPTIONAL is present, then do not complain if the file does not exist.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_DIRECTORIES}{\insrsid2115186 - Add include directories to the build. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_DIRECTORIES}{\insrsid2115186 - Add include directories to the build. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INCLUDE_DIRECTORIES([BEFORE] dir1 dir2 ...)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_EXTERNAL_MSPROJECT}{\insrsid2115186 - Include an external Microsoft project file in a workspace. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INCLUDE_EXTERNAL_MSPROJECT(projectname location dep1 dep2 ...) Includes an external Microsoft project in the workspace file. Does nothing on UNIX currently
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_REGULAR_EXPRESSION}{\insrsid2115186 - Set the regular expression used for dependency checking. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain]) Set the regular expressions used in dependency checking. Only files matching regex_match will be traced as dependencies. Only files matching reg
|
||||
ex_complain will generate warnings if they cannot be found (standard header paths are not searched). The defaults are: regex_match = "^.*$" (match everything) regex_complain = "^$" (match empty string only)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_FILES}{\insrsid2115186 - Create install rules for files \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INSTALL_FILES(path extension srclist file file srclist ...) INSTALL_FILES(path regexp) Create rules to install the listed files into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the firs
|
||||
t the files can be specified explicitly or by referenceing source lists. All files must either have the extension specified or exist with the extension appended. A typical extension is .h etc... In the second form any files in the current directory that m
|
||||
atch the regular expression will be installed.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_PROGRAMS}{\insrsid2115186 - Create install rules for programs \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INSTALL_PROGRAMS(path file file ...) INSTALL_PROGRAMS(path regexp) Create rules to install the listed programs into the path. Path is relative to t
|
||||
he variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the programs can be specified explicitly. In the second form any program in the current directory that match the regular expression will be installed.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_TARGETS}{\insrsid2115186 - Create install rules for targets \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_EXTERNAL_MSPROJECT}{\insrsid2115186 - Include an external Microsoft project file in a workspace. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 INCLUDE_EXTERNAL_MSPROJECT(projectname location dep1 dep2 ...) Includes an external Microsoft project in the workspace file. Does nothing on UNIX currently
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INCLUDE_REGULAR_EXPRESSION}{\insrsid2115186 - Set the regular expression used for dependency checking. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain]) Set the regular expressions used in dependency
|
||||
checking. Only files matching regex_match will be traced as dependencies. Only files matching regex_complain will generate warnings if they cannot be found (standard header paths are not searched). The defaults are: regex_match = "^.*$" (match everything)
|
||||
regex_complain = "^$" (match empty string only)
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_FILES}{\insrsid2115186 - Create install rules for files \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INSTALL_FILES(path extension srclist file file srclist ...) INSTALL_FILES(path regexp) Create rules to install the listed files into the path. Path is
|
||||
relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the files can be specified explicitly or by referenceing source lists. All files must either have the extension specified or exist with the extension append
|
||||
ed. A typical extension is .h etc... In the second form any files in the current directory that match the regular expression will be installed.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_PROGRAMS}{\insrsid2115186 - Create install rules for programs \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INSTALL_PROGRAMS(path file file ...) INSTALL_PROGR
|
||||
AMS(path regexp) Create rules to install the listed programs into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the programs can be specified explicitly. In the second form any program
|
||||
in the current directory that match the regular expression will be installed.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 INSTALL_TARGETS}{\insrsid2115186 - Create install rules for targets \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
INSTALL_TARGETS(path target target) Create rules to install the listed targets into the path. Path is relative to the variable PREFIX
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ITK_WRAP_TCL}{\insrsid2115186 - Run CABLE to generate Tcl wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 ITK_WRAP_TCL(target-
|
||||
name config-file1 [config-file2 ...]) Run CABLE on all the configuration files to generate Tcl wrappers. The generated sources are added to a target of the given name.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LINK_DIRECTORIES}{\insrsid2115186 - Specify link directories. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 LINK_DIRECTORIES(directory1 direc
|
||||
tory2 ...) Specify the paths to the libraries that will be linked in. The directories can use built in definitions like CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LINK_LIBRARIES}{\insrsid2115186 - Specify a list of libraries to be linked into executables or shared objects. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
LINK_LIBRARIES(library1 library2 ...) Specify a list of libraries to be linked into executables or shared objects. This command is passed down to all other commands. The debug and optimized strings may be used to indicate that the next library liste
|
||||
d is to be used only for that specific type of build
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LOAD_CACHE}{\insrsid2115186 - load in the values from another cache. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
LOAD_CACHE(pathToCacheFile [EXCLUDE entry1...] [INCLUDE_INTERNALS entry1...]) Load in the values from another cache. This is useful for a pro
|
||||
ject that depends on another project built in a different tree.EXCLUDE option can be used to provide a list of entries to be excluded.INCLUDE_INTERNALS can be used to provide a list of internal entriesto be included. Normally, no internal entries are brou
|
||||
gt in.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MAKE_DIRECTORY}{\insrsid2115186 - Create a directory in the build tree if it does not exist. Parent directories will be created if the do not exist.. \line }{
|
||||
\i\insrsid2115186 Usage:}{\insrsid2115186 MAKE_DIRECTORY(directory)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MARK_AS_ADVANCED}{\insrsid2115186 - Mark a cmake varible as advanced. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 MARK_AS_ADVANCED([
|
||||
CLEAR|FORCE]VAR VAR2 VAR... ) Mark the named variables as advanced. An advanced variable will not be displayed in any of the cmake GUIs, unless the show advanced option is on. If CLEAR is the first argument advanced variables are changed back to unadvance
|
||||
d.If FORCE is the first arguement, then the variable is made advanced.If neither FORCE or CLEAR is specified, new values will be marked as advanced, but if the variable already has an advanced state, it will not be changed.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MESSAGE}{\insrsid2115186 - Display a message to the user. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 ITK_WRAP_TCL}{\insrsid2115186 - Run CABLE to generate Tcl wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
ITK_WRAP_TCL(target-name config-file1 [config-file2 ...]) Run CABLE on all the configuration files to generate Tcl wrappers. The generated sources are added to a target of the given name.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LINK_DIRECTORIES}{\insrsid2115186 - Specify link directories. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
LINK_DIRECTORIES(directory1 directory2 ...) Specify the paths to the libraries that will be linked in. The directories can use built in definitions like CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LINK_LIBRARIES}{\insrsid2115186 - Specify a list of libraries to be linked into executables or shared objects. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 LINK_LIBRARIES(library1 library2 ...) Specify a list of libraries to be linked into executables or shared objects. This command is passed down to all ot
|
||||
her commands. The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 LOAD_CACHE}{\insrsid2115186 - load in the values from another cache. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
LOAD_CACHE(pathToCacheFile [EXCLUDE entry1..
|
||||
.] [INCLUDE_INTERNALS entry1...]) Load in the values from another cache. This is useful for a project that depends on another project built in a different tree.EXCLUDE option can be used to provide a list of entries to be excluded.INCLUDE_INTERNALS can be
|
||||
used to provide a list of internal entriesto be included. Normally, no internal entries are brougt in.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MAKE_DIRECTORY}{\insrsid2115186 - Create a directory in the build tree if it does not exist. Parent directories will be created if the do not exist..
|
||||
\line }{\i\insrsid2115186 Usage:}{\insrsid2115186 MAKE_DIRECTORY(directory)
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MARK_AS_ADVANCED}{\insrsid2115186 - Mark a cmake varible as advanced. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
MARK_AS_ADVANCED([CLEAR|FORCE]VAR VAR2 VAR... ) Mark the named variables as advanced. An advanced variable will not be displayed in any of the cmake GUIs, unless the show advanc
|
||||
ed option is on. If CLEAR is the first argument advanced variables are changed back to unadvanced.If FORCE is the first arguement, then the variable is made advanced.If neither FORCE or CLEAR is specified, new values will be marked as advanced, but if the
|
||||
variable already has an advanced state, it will not be changed.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 MESSAGE}{\insrsid2115186 - Display a message to the user. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
MESSAGE([SEND_ERROR] "message to display"...) The arguments are messages to display. If the first argument is SEND_ERROR then an error is raised.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 OPTION}{\insrsid2115186 - Provides an option that the user can optionally select \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 OPTION(USE_MPI "he
|
||||
lp string decribing the option" [initial value]) Provide an option for the user to select
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 OUTPUT_REQUIRED_FILES}{\insrsid2115186 - Output a list of required source files for a specified source file. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
OUTPUT_REQUIRED_FILES(srcfile outputfile) Outputs a list of all
|
||||
the source files that are required by the specified srcfile. This list is written into outputfile. This is similar to writing out the dependencies for srcfile except that it jumps from .h files into .cxx, .c and .cpp files if possible.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 PROJECT}{\insrsid2115186 - Set a name for the entire project. One argument. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
PROJECT(projectname [C++ C Java]) Sets the name of the project. This creates the variables projectname_BINARY_DIR and projectname_SOURCE_DIR. Optionally you can specify which languages your project supports.
|
||||
By default all languages are supported. If you do not have a C++ compiler, but want to build a c program with cmake, then use this option.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 QT_WRAP_CPP}{\insrsid2115186 - Create QT Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 QT_WRAP_CPP(resultingLibraryName DestName SourceLists ...)
|
||||
Produce moc files for all the .h file listed in the SourceLists. The moc files will be added to the library using the DestName source list.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 QT_WRAP_UI}{\insrsid2115186 - Create QT user interfaces Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
QT_WRAP_UI(resultingLibraryName HeadersDestName SourcesDestName SourceLists ...) Produce .h and .cxx files for all the .ui file listed in the SourceLists. The .h files will be added to the library using the HeadersDestName source list. The .cxx files will
|
||||
be added to the library using the SourcesDestName source list.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 REMOVE}{\insrsid2115186 - Remove a value from a CMAKE variable \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 OPTION}{\insrsid2115186 - Provides an option that the user can optionally select \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
OPTION(USE_MPI "help string decribing the option" [initial value]) Provide an option for the user to select
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 OUTPUT_REQUIRED_FILES}{\insrsid2115186 - Output a list of required source files for a specified source file. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 OUTPUT_REQUIRED_FILES(srcfile outputfile) Outputs a list of all the source files that are required by the specified srcfile. This list is written into outputfile. This is simila
|
||||
r to writing out the dependencies for srcfile except that it jumps from .h files into .cxx, .c and .cpp files if possible.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 PROJECT}{\insrsid2115186 - Set a name for the entire project. One argument. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
PROJECT(projectname [C++ C Java]) Sets the name of the project.
|
||||
This creates the variables projectname_BINARY_DIR and projectname_SOURCE_DIR. Optionally you can specify which languages your project supports. By default all languages are supported. If you do not have a C++ compiler, but want to build a c program with c
|
||||
make, then use this option.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 QT_WRAP_CPP}{\insrsid2115186 - Create QT Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
QT_WRAP_CPP(resultingLibraryName DestName SourceLists ...) Produce moc files for all the .h file listed in the SourceLists. The moc files will be added to the library using the DestName source list.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 QT_WRAP_UI}{\insrsid2115186 - Create QT user interfaces Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
QT_WRAP_UI(resultingLibraryName HeadersDestName SourcesDestName SourceLists ...) Produce .h and .cxx files for all the .ui file listed in the SourceLists. The .h files will be added t
|
||||
o the library using the HeadersDestName source list. The .cxx files will be added to the library using the SourcesDestName source list.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 REMOVE}{\insrsid2115186 - Remove a value from a CMAKE variable \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
REMOVE(VAR VALUE VALUE ...) Removes VALUE from the CMAke variable VAR. This is typically used to remove entries from a vector (e.g. semicolon separated list). VALUE is expanded.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SEPARATE_ARGUMENTS}{\insrsid2115186 - Split space separated arguments into a semi-colon separated list. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SEPARATE_ARGUMENTS(VARIABLE) Convert the value of VARIABLE to a semi-colon separated list. All spaces are replaced with ;
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SET}{\insrsid2115186 - Set a CMAKE variable to a value \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SET(VAR [VALUE] [CACHE TYPE DOCSTRING]) Within CMAKE sets VAR to the value VALUE. VALUE is expanded before VAR is set to it. If CACHE is present, then the VAR is put in the cache. TYPE and DOCSTRING are
|
||||
required. If TYPE is INTERNAL, then the VALUE is Always written into the cache, replacing any values existing in the cache. If it is not a CACHE VAR, then this always writes into the current makefile. An optional syntax is SET(VAR VALUE1 ... VALUEN). In t
|
||||
his case VAR is set to a ; separated list of values.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SET_SOURCE_FILES_PROPERTIES}{\insrsid2115186 - Set attributes for a specific list of files. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SEPARATE_ARGUMENTS}{\insrsid2115186 - Split space separated arguments into a semi-colon separated list. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 SEPARATE_ARGUMENTS(VARIABLE) Convert the value of VARIABLE to a semi-colon separated list. All spaces are replaced with ;
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SET}{\insrsid2115186 - Set a CMAKE variable to a value \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SET(VAR [VALUE] [CACHE TYPE DOCSTRING]) Within CMAKE sets VAR to the value VALUE. VALUE is expanded before VAR is set to it. If CA
|
||||
CHE is present, then the VAR is put in the cache. TYPE and DOCSTRING are required. If TYPE is INTERNAL, then the VALUE is Always written into the cache, replacing any values existing in the cache. If it is not a CACHE VAR, then this always writes into the
|
||||
current makefile. An optional syntax is SET(VAR VALUE1 ... VALUEN). In this case VAR is set to a ; separated list of values.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SET_SOURCE_FILES_PROPERTIES}{\insrsid2115186 - Set attributes for a specific list of files. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SET_SOURCE_FILES_PROPERTIES(file1 file2 .. filen [ABSTRACT|WRAP_EXCLUDE|GENERATED|COMPILE_FLAGS] [flags]) Set properties on a file. The syntax for the command is to list all the files you want to change, and then provide the values you want to set next.
|
||||
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SITE_NAME}{\insrsid2115186 - Set a CMAKE variable to the name of this computer. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SITE_NAME}{\insrsid2115186 - Set a CMAKE variable to the name of this computer. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SITE_NAME(NAME) Within CMAKE sets NAME to the host name of the computer.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SOURCE_GROUP}{\insrsid2115186 - Define a grouping for sources in the makefile. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SOURCE_GROUP}{\insrsid2115186 - Define a grouping for sources in the makefile. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SOURCE_GROUP(name regex) Defines a new source group. Any file whose name matches the regular expression will be placed in this group. The LAST regular expression of all defined SOURCE_GROUPs that matches the file will be selected.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SUBDIRS}{\insrsid2115186 - Add a list of subdirectories to the build. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SUBDIRS}{\insrsid2115186 - Add a list of subdirectories to the build. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
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.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SUBDIR_DEPENDS}{\insrsid2115186 - Legacy command. Does nothing. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 SUBDIR_DEPENDS}{\insrsid2115186 - Legacy command. Does nothing. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
SUBDIR_DEPENDS(subdir dep1 dep2 ...) Does not do anything. This command used to help projects order parallel builds correctly. This functionality is now automatic.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 TARGET_LINK_LIBRARIES}{\insrsid2115186 - Specify a list of libraries to be linked into executables or shared objects. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
TARGET_LINK_LIBRARIES(target library1 library2 ...) Specify a list of libraries to be linked into the specified target The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 TARGET_LINK_LIBRARIES}{\insrsid2115186 - Specify a list of libraries to be linked into executables or shared objects. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 TARGET_LINK_LIBRARIES(target library1 library2 ...) Specify a list of li
|
||||
braries to be linked into the specified target The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 USE_MANGLED_MESA}{\insrsid2115186 - Create copies of mesa headers for use in combination with system gl. \line }{\i\insrsid2115186 Usage:}{
|
||||
\insrsid2115186 USE_MANGLED_MESA(PATH_TO_MESA OUTPUT_DIRECTORY) The path to mesa includes, should contain gl_mangle.h.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 UTILITY_SOURCE}{\insrsid2115186 - Specify the source tree of a third-party utility. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
UTILITY_SOURCE(cache_entry executable_name path_to
|
||||
_source [file1 file2 ...]) When a third-party utility's source is included in the distribution, this command specifies its location and name. The cache entry will not be set unless the path_to_source and all listed files exist. It is assumed that the sour
|
||||
ce tree of the utility will have been built before it is needed.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VARIABLE_REQUIRES}{\insrsid2115186 - Display an error message . \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VARIABLE_REQUIRES(TEST_VARIABLE RESULT_VARIABLE REQUIRED_VARIABLE1 REQUIRED_VARIABLE2 ...) The first argument (TEST_VARIABLE) is the na
|
||||
me of the varible to be tested, if that varible is false nothing else is done. If TEST_VARIABLE is true, then the next arguemnt (RESULT_VARIABLE) is a vairable that is set to true if all the required variables are set.The rest of the arguments are varible
|
||||
s that must be true or not set to NOTFOUND to avoid an error.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_MAKE_INSTANTIATOR}{\insrsid2115186 - Register classes for creation by vtkInstantiator \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VTK_MAKE_INSTANTIATOR(className outSourceList src-list1 [src-list2 ..] EXPORT_MACRO exportMacro [HEADER_LOCATIO
|
||||
N dir] [GROUP_SIZE groupSize] [INCLUDES [file1 file2 ..]]) Generates a new class with the given name and adds its files to the given outSourceList. It registers the classes from the other given source lists with vtkInstantiator when it is loaded. The outp
|
||||
u
|
||||
t source list should be added to the library with the classes it registers. The EXPORT_MACRO argument must be given and followed by the export macro to use when generating the class (ex. VTK_COMMON_EXPORT). The HEADER_LOCATION option must be followed by a
|
||||
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 USE_MANGLED_MESA}{\insrsid2115186 - Create copies of mesa headers for use in combination with system gl. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
USE_MANGLED_MESA(PATH_TO_MESA OUTPUT_DIRECTORY) The path to mesa includes, should contain gl_mangle.h.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 UTILITY_SOURCE}{\insrsid2115186 - Specify the source tree of a third-party utility. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
UTILITY_SOURCE(cache_entry executable_name path_to_source [file1 file2 ...]) When a third-party utility's source is include
|
||||
d in the distribution, this command specifies its location and name. The cache entry will not be set unless the path_to_source and all listed files exist. It is assumed that the source tree of the utility will have been built before it is needed.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VARIABLE_REQUIRES}{\insrsid2115186 - Display an error message . \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VARIABLE_REQUIRES(TEST_VARIABLE RESULT_VARIABLE REQUIRED_VARIABLE1 REQUIRED_VARIABLE2 ...) The first argument (TEST_VARIABLE) is the name of the varible to be tested, if that varible is false nothing else is
|
||||
done. If TEST_VARIABLE is true, then the next arguemnt (RESULT_VARIABLE) is a vairable that is set to true if all the required variables are set.The rest of the arguments are varibles that must be true or not set to NOTFOUND to avoid an error.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_MAKE_INSTANTIATOR}{\insrsid2115186 - Register classes for creation by vtkInstantiator \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VTK_MAKE_INSTANTIATOR(className outSourceList src-list1 [src-list2 ..] EXPORT_MACRO exportMacro [HEADER_LOCATION dir] [GROUP_SIZE groupSize] [INCLUDES [file1 file2 ..]]) Generates a ne
|
||||
w class with the given name and adds its files to the given outSourceList. It registers the classes from the other given source lists with vtkInstantiator when it is loaded. The output source list should be added to the library with the classes it registe
|
||||
r
|
||||
s. The EXPORT_MACRO argument must be given and followed by the export macro to use when generating the class (ex. VTK_COMMON_EXPORT). The HEADER_LOCATION option must be followed by a path. It specifies the directory in which to place the generated class's
|
||||
|
||||
header file. The generated class implementation files always go in the build directory corresponding to the CMakeLists.txt file containing the command. This is the default location for the header. The GROUP_SIZE option must be followed by a positive integ
|
||||
e
|
||||
r. As an implementation detail, the registered creation functions may be split up into multiple files. The groupSize option specifies the number of classes per file. Its default is 10. The INCLUDES option can be followed by a list of zero or more files. T
|
||||
hese files will be #included by the generated instantiator header, and can be used to gain access to the specified exportMacro in the C++ code.
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_JAVA}{\insrsid2115186 - Create Java Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
path. It specifies the directory in which to place the generated class's header file. The generated class implementation files always go in the build directory corresponding to the CMakeLists.txt file containing the command. This is the default location f
|
||||
o
|
||||
r the header. The GROUP_SIZE option must be followed by a positive integer. As an implementation detail, the registered creation functions may be split up into multiple files. The groupSize option specifies the number of classes per file. Its default is 1
|
||||
0. The INCLUDES option can be followed by a list of zero or more files. These files will be #included by the generated instantiator header, and can be used to gain access to the specified exportMacro in the C++ code.
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_JAVA}{\insrsid2115186 - Create Java Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VTK_WRAP_JAVA(resultingLibraryName SourceListName SourceLists ...)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_PYTHON}{\insrsid2115186 - Create Python Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_PYTHON}{\insrsid2115186 - Create Python Wrappers. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VTK_WRAP_PYTHON(resultingLibraryName SourceListName SourceLists ...)
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_TCL}{\insrsid2115186 - Create Tcl Wrappers for VTK classes. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 VTK_WRAP_TCL}{\insrsid2115186 - Create Tcl Wrappers for VTK classes. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
VTK_WRAP_TCL(resultingLibraryName [SOURCES] SourceListName SourceLists ... [COMMANDS CommandName1 CommandName2 ...])
|
||||
\par {\listtext\pard\plain\f3\fs20 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 WRAP_EXCLUDE_FILES}{\insrsid2115186 - A list of classes, to exclude from wrapping. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186 WRAP_EXCLUDE_FILES(file1 file2 ..)
|
||||
|
||||
\par {\listtext\pard\plain\f3\fs20\insrsid2115186 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\b\insrsid2115186 WRAP_EXCLUDE_FILES}{\insrsid2115186 - A list of classes, to exclude from wrapping. \line }{\i\insrsid2115186 Usage:}{\insrsid2115186
|
||||
WRAP_EXCLUDE_FILES(file1 file2 ..)
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s1\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin0\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Extending CMake Guide
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
|
@ -13573,30 +13586,31 @@ Installing CMake}{\insrsid2115186 section. On Windows you must download a binar
|
|||
\par }\pard \ql \li720\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin720\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Adding a New Command
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
Commands can be added to CMake by deriving new commands from the class cmCommand (defined in CMake/Source/cmCommand.h/.cxx). Typically each command is implemented in a class called cmCommandNameComm
|
||||
and stored in cmCommandNameCommand.h and cmCommandNameCommand.cxx. If you want to create a rule the best bet is to take a look at some of the existing rules in CMake. They tend to be fairly short.
|
||||
Commands can be added to CMake by deriving new commands from the class cmCommand (defined in CMake/S
|
||||
ource/cmCommand.h/.cxx). Typically each command is implemented in a class called cmCommandNameCommand stored in cmCommandNameCommand.h and cmCommandNameCommand.cxx. If you want to create a rule the best bet is to take a look at some of the existing rules
|
||||
in CMake. They tend to be fairly short.
|
||||
\par
|
||||
\par }\pard\plain \s3\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin-720\lin0\itap0 \b\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Adding a New Makefile Generator
|
||||
\par }\pard\plain \ql \li1170\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin1170\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186 From a conceptual p
|
||||
oint, adding a new generator is simple. You derive a class from cmMakefileGenerator, and override GenerateMakefile() and EnableLanguage(). The GenerateMakefile method can become quite complex. Its job is to translate all the internal values in the cmMa
|
||||
k}{\insrsid1079499 e}{\insrsid2115186
|
||||
file class into a build file. The developer must know how to create shared and static libraries, and executables. If you are interested in adding a new build type to cmake, please feel free to contact the cmake users list, and you most likely will fin
|
||||
d}{\insrsid2115186 assistance from}{\insrsid2115186 cmake developers.
|
||||
\par }\pard \qj \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
From a conceptual point, adding a new generator is simple. You derive a class from cmMakefileGenerator, and override GenerateMakefile() and EnableLanguage(). The GenerateMakefile me
|
||||
thod can become quite complex. Its job is to translate all the internal values in the cmMak}{\insrsid1079499 e}{\insrsid2115186
|
||||
file class into a build file. The developer must know how to create shared and static libraries, and executables. If you are interested in adding a new build t
|
||||
ype to cmake, please feel free to contact the cmake users list, and you most likely will find assistance from cmake developers.
|
||||
\par }\pard \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 {\insrsid2115186
|
||||
\par }\pard\plain \s1\ql \li0\ri-720\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin-720\lin0\itap0 \b\fs36\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Further Information
|
||||
\par }\pard\plain \ql \li0\ri-720\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-720\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid2115186 Much of the development of CMake was performed at Kitware }{\field{\*\fldinst {
|
||||
\insrsid2115186 HYPERLINK "http://www.kitware.com/" }{\insrsid7953135 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b3000000068007400740070003a002f002f007700770077002e006b006900740077006100720065002e0063006f006d002f00000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs16\ul\cf2\insrsid2115186 http://www.kitware.com/}}}{\insrsid2115186 . The developers can be reached at }{\field{\*\fldinst {\insrsid2115186 HYPERLINK "mailto:kitware@kitware.com" }{\insrsid7953135 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b360000006d00610069006c0074006f003a006b0069007400770061007200650040006b006900740077006100720065002e0063006f006d00000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\insrsid2115186 HYPERLINK "http://www.kitware.com/" }{\insrsid3695913 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b3000000068007400740070003a002f002f007700770077002e006b006900740077006100720065002e0063006f006d002f0000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs16\ul\cf2\insrsid2115186 http://www.kitware.com/}}}{\insrsid2115186 . The developers can be reached at }{\field{\*\fldinst {\insrsid2115186 HYPERLINK "mailto:kitware@kitware.com" }{\insrsid3695913 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b360000006d00610069006c0074006f003a006b0069007400770061007200650040006b006900740077006100720065002e0063006f006d0000000000000000000000000000000000000000000000}}}{\fldrslt {
|
||||
\cs16\ul\cf2\insrsid2115186 mailto:kitware@kitware.com}}}{\insrsid2115186 . CMake was initially developed for the NIH/NLM Insight Segmentation and Registration Toolkit, see the Web site at }{\field\fldedit{\*\fldinst {\insrsid2115186
|
||||
HYPERLINK "http://public.kitware.com/Insight.html"}{\insrsid7953135 {\*\datafield
|
||||
HYPERLINK "http://public.kitware.com/Insight.html"}{\insrsid3695913 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b4e00000068007400740070003a002f002f007000750062006c00690063002e006b006900740077006100720065002e0063006f006d002f0049006e00730069006700680074002e00680074006d006c00000000000000
|
||||
000000000000000000000000000000}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.itk.org/Insight.html}}}{\insrsid2115186 . CMake\rquote s web page can be found at }{\field{\*\fldinst {\insrsid2115186 HYPERLINK "http://www.cmake.org" }{
|
||||
\insrsid7953135 {\*\datafield
|
||||
00000000000000000000000000000000}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.itk.org/Insight.html}}}{\insrsid2115186 . CMake\rquote s web page can be found at }{\field{\*\fldinst {\insrsid2115186 HYPERLINK "http://www.cmake.org" }{
|
||||
\insrsid3695913 {\*\datafield
|
||||
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001500000068007400740070003a002f002f007700770077002e0063006d0061006b0065002e006f00720067000000e0c9ea79f9bace118c8200aa004ba90b2c00000068007400740070003a002f002f007700770077002e0063006d0061006b0065002e006f00
|
||||
720067002f000000000000000000}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.cmake.org}}}{\insrsid2115186 .
|
||||
720067002f00000000000000000000}}}{\fldrslt {\cs16\ul\cf2\insrsid2115186 http://www.cmake.org}}}{\insrsid2115186 .
|
||||
\par
|
||||
\par
|
||||
\par }}
|
|
@ -40,6 +40,7 @@
|
|||
#endif
|
||||
|
||||
#include <stdlib.h> // required for atoi
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/types.h>
|
||||
|
@ -983,6 +984,9 @@ int cmake::DoPreConfigureChecks()
|
|||
|
||||
int cmake::Configure()
|
||||
{
|
||||
// Construct right now our path conversion table before it's too late:
|
||||
this->UpdateConversionPathTable();
|
||||
|
||||
int res = 0;
|
||||
if ( !m_ScriptMode )
|
||||
{
|
||||
|
@ -1506,3 +1510,25 @@ void cmake::CleanupWrittenFiles()
|
|||
{
|
||||
m_WrittenFiles.clear();
|
||||
}
|
||||
|
||||
void cmake::UpdateConversionPathTable()
|
||||
{
|
||||
// Update the path conversion table with any specified file:
|
||||
const char* tablepath =
|
||||
m_CacheManager->GetCacheValue("CMAKE_PATH_TRANSLATION_FILE");
|
||||
|
||||
if(tablepath)
|
||||
{
|
||||
std::ifstream table( tablepath );
|
||||
std::string a, b;
|
||||
if( table.is_open() && table.good() )
|
||||
{
|
||||
while(!table.eof())
|
||||
{
|
||||
// two entries per line
|
||||
table >> a; table >> b;
|
||||
cmSystemTools::AddTranslationPath( a.c_str(), b.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#ifndef cmake_h
|
||||
#define cmake_h
|
||||
/*=========================================================================
|
||||
|
||||
Program: CMake - Cross-Platform Makefile Generator
|
||||
|
@ -39,6 +37,9 @@
|
|||
//
|
||||
|
||||
|
||||
#ifndef cmake_h
|
||||
#define cmake_h
|
||||
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
class cmGlobalGenerator;
|
||||
|
@ -309,6 +310,8 @@ private:
|
|||
std::string m_CXXEnvironment;
|
||||
std::string m_CCEnvironment;
|
||||
bool m_DebugTryCompile;
|
||||
|
||||
void UpdateConversionPathTable();
|
||||
};
|
||||
|
||||
#define CMAKE_STANDARD_OPTIONS_TABLE \
|
||||
|
|
|
@ -68,6 +68,17 @@ inline int Chdir(const char* dir)
|
|||
return _chdir(dir);
|
||||
#endif
|
||||
}
|
||||
inline char *Realpath(const char *path, char *resolved_path)
|
||||
{
|
||||
char *ptemp;
|
||||
char fullpath[MAX_PATH];
|
||||
if( GetFullPathName(path, sizeof(fullpath), fullpath, &ptemp) )
|
||||
{
|
||||
return strcpy(resolved_path, fullpath);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -88,6 +99,10 @@ inline int Chdir(const char* dir)
|
|||
{
|
||||
return chdir(dir);
|
||||
}
|
||||
inline char *Realpath(const char *path, char *resolved_path)
|
||||
{
|
||||
return realpath(path, resolved_path);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(__COMO__)
|
||||
|
@ -753,12 +768,6 @@ void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path)
|
|||
path = kwsys_stl::string(getenv("HOME")) + path.substr(1);
|
||||
}
|
||||
}
|
||||
|
||||
// if there is a /tmp_mnt in a path get rid of it!
|
||||
if(path.find("/tmp_mnt") == 0)
|
||||
{
|
||||
path = path.substr(8);
|
||||
}
|
||||
}
|
||||
|
||||
// change // to /, and escape any spaces in the path
|
||||
|
@ -1346,7 +1355,8 @@ kwsys_stl::string SystemTools::GetCurrentWorkingDirectory()
|
|||
{
|
||||
path = cwd;
|
||||
}
|
||||
return path;
|
||||
|
||||
return SystemTools::CollapseFullPath(path.c_str());
|
||||
}
|
||||
|
||||
kwsys_stl::string SystemTools::GetProgramPath(const char* in_name)
|
||||
|
@ -1452,15 +1462,77 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative)
|
|||
return SystemTools::CollapseFullPath(in_relative, 0);
|
||||
}
|
||||
|
||||
kwsys_stl::map<kwsys_stl::string,kwsys_stl::string> SystemTools::TranslationMap;
|
||||
|
||||
void SystemTools::AddTranslationPath(const char * a, const char * b)
|
||||
{
|
||||
kwsys_stl::string path_a = a;
|
||||
kwsys_stl::string path_b = b;
|
||||
SystemTools::ConvertToUnixSlashes(path_a);
|
||||
SystemTools::ConvertToUnixSlashes(path_b);
|
||||
// First check this is a directory path, since we don't want the table to grow
|
||||
// too fat
|
||||
if( SystemTools::FileIsDirectory( path_a.c_str() ) )
|
||||
{
|
||||
// Make sure the path is a full path and does not contain no '..'
|
||||
if( SystemTools::FileIsFullPath(path_b.c_str()) && path_b.find("..") == kwsys_stl::string::npos )
|
||||
{
|
||||
// Before inserting make sure path ends with '/'
|
||||
path_a += '/'; path_b += '/';
|
||||
if( !(path_a == path_b) )
|
||||
{
|
||||
TranslationMap.insert(
|
||||
kwsys_stl::pair<kwsys_stl::string,kwsys_stl::string>(path_a, path_b));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SystemTools::AddKeepPath(const char* dir)
|
||||
{
|
||||
kwsys_stl::string cdir = SystemTools::CollapseFullPath(dir);
|
||||
SystemTools::AddTranslationPath(cdir.c_str(), dir);
|
||||
}
|
||||
|
||||
void SystemTools::CheckTranslationPath(kwsys_stl::string & path)
|
||||
{
|
||||
// In case a file was specified we still have to go through this:
|
||||
// Now convert any path found in the table back to the one desired:
|
||||
kwsys_stl::map<kwsys_stl::string,kwsys_stl::string>::const_iterator it;
|
||||
for(it = TranslationMap.begin();
|
||||
it != TranslationMap.end();
|
||||
++it )
|
||||
{
|
||||
// We need to check of the path is a substring of the other path
|
||||
// But also check that the last character is a '/' otherwise we could
|
||||
// have some weird case such as /tmp/VTK and /tmp/VTK-bin
|
||||
if(path.size() > 1 && path[path.size()-1] != '/')
|
||||
{
|
||||
// Do not append '/' on a program name:
|
||||
if( SystemTools::FileIsDirectory( path.c_str() ) )
|
||||
{
|
||||
path += "/";
|
||||
}
|
||||
}
|
||||
if(path.find( it->first ) == 0)
|
||||
{
|
||||
path = path.replace( 0, it->first.size(), it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
||||
const char* in_base)
|
||||
{
|
||||
// Save original working directory.
|
||||
kwsys_stl::string orig = SystemTools::GetCurrentWorkingDirectory();
|
||||
static int initialized = 0;
|
||||
|
||||
kwsys_stl::string orig;
|
||||
|
||||
// Change to base of relative path.
|
||||
if(in_base)
|
||||
{
|
||||
// Save original working directory.
|
||||
orig = SystemTools::GetCurrentWorkingDirectory();
|
||||
Chdir(in_base);
|
||||
}
|
||||
|
||||
|
@ -1473,19 +1545,6 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
|||
dir = "/";
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// Follow relative path.
|
||||
if(!(dir == ""))
|
||||
{
|
||||
Chdir(dir.c_str());
|
||||
}
|
||||
|
||||
// Get the resulting directory.
|
||||
kwsys_stl::string newDir = SystemTools::GetCurrentWorkingDirectory();
|
||||
|
||||
// Add the file back on to the directory.
|
||||
SystemTools::ConvertToUnixSlashes(newDir);
|
||||
#else
|
||||
# ifdef MAXPATHLEN
|
||||
char resolved_name[MAXPATHLEN];
|
||||
# else
|
||||
|
@ -1493,29 +1552,26 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
|||
char resolved_name[PATH_MAX];
|
||||
# else
|
||||
char resolved_name[5024];
|
||||
# endif
|
||||
# endif
|
||||
# endif //PATH_MAX
|
||||
# endif //MAXPATHLEN
|
||||
|
||||
// Resolve relative path.
|
||||
kwsys_stl::string newDir;
|
||||
if(!(dir == ""))
|
||||
{
|
||||
realpath(dir.c_str(), resolved_name);
|
||||
Realpath(dir.c_str(), resolved_name);
|
||||
newDir = resolved_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
newDir = SystemTools::GetCurrentWorkingDirectory();
|
||||
}
|
||||
// if there is a /tmp_mnt in a path get rid of it!
|
||||
if(newDir.find("/tmp_mnt") == 0)
|
||||
{
|
||||
newDir = newDir.substr(8);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(in_base)
|
||||
{
|
||||
// Restore original working directory.
|
||||
Chdir(orig.c_str());
|
||||
}
|
||||
|
||||
// Construct and return the full path.
|
||||
kwsys_stl::string newPath = newDir;
|
||||
|
@ -1527,6 +1583,23 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative,
|
|||
}
|
||||
newPath += file;
|
||||
}
|
||||
|
||||
// If the table has never been initialized, add default path:
|
||||
if(!initialized)
|
||||
{
|
||||
initialized = 1;
|
||||
//Also add some good default one:
|
||||
// This one should always be there it fix a bug on sgi
|
||||
SystemTools::AddTranslationPath("/tmp_mnt/", "/");
|
||||
|
||||
//This is a good default also:
|
||||
SystemTools::AddKeepPath("/tmp/");
|
||||
}
|
||||
|
||||
// Now we need to update the translation table with this potentially new path
|
||||
SystemTools::AddTranslationPath(newPath.c_str(), in_relative);
|
||||
SystemTools::CheckTranslationPath(newPath);
|
||||
|
||||
return newPath;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <@KWSYS_NAMESPACE@/ios/iosfwd>
|
||||
#include <@KWSYS_NAMESPACE@/stl/string>
|
||||
#include <@KWSYS_NAMESPACE@/stl/vector>
|
||||
#include <@KWSYS_NAMESPACE@/stl/map>
|
||||
|
||||
#include <@KWSYS_NAMESPACE@/Configure.h>
|
||||
|
||||
|
@ -290,6 +291,22 @@ public:
|
|||
*/
|
||||
static int GetTerminalWidth();
|
||||
|
||||
/**
|
||||
* Add an entry in the path translation table.
|
||||
*/
|
||||
static void AddTranslationPath(const char * dir, const char * refdir);
|
||||
|
||||
/**
|
||||
* If dir is different after CollapseFullPath is called,
|
||||
* Then insert it into the path translation table
|
||||
*/
|
||||
static void AddKeepPath(const char* dir);
|
||||
|
||||
/**
|
||||
* Update path by going through the Path Translation table;
|
||||
*/
|
||||
static void CheckTranslationPath(kwsys_stl::string & path);
|
||||
|
||||
/**
|
||||
* Get and set permissions of the file.
|
||||
*/
|
||||
|
@ -312,6 +329,12 @@ protected:
|
|||
*/
|
||||
static kwsys_stl::string ConvertToWindowsOutputPath(const char*);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Path translation table from dir to refdir
|
||||
* Each time 'dir' will be found it will be replace by 'refdir'
|
||||
*/
|
||||
static kwsys_stl::map<kwsys_stl::string,kwsys_stl::string> TranslationMap;
|
||||
};
|
||||
|
||||
} // namespace @KWSYS_NAMESPACE@
|
||||
|
|
Loading…
Reference in New Issue