[Cmake] Order (Timing) of CMake commands and MAKE_DIRECTORY

Miller, James V (CRD) millerjv at crd.ge.com
Mon Jun 25 10:44:06 EDT 2001


The Dart.cmake module has a series of calls like:

  # set the site name
  SITE_NAME(SITE)
  # set the build name
  BUILD_NAME(BUILDNAME)
 
  # make directories in the binary tree
  MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard)
  MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})

The MAKE_DIRECTORY() call makes a set of directories based on values that SITE_NAME() and
BUILD_NAME() construct.  

The first time CMake is run, it appears as though the MAKE_DIRECTORY calls are being executed before
the SITE_NAME() and BUILD_NAME() commands are called.  So the ${SITE} and ${BUILDNAME} variables are
not set, so they are not replaced in the MAKE_DIRECTORY() call and end up with directories call
"${SITE}" and "${BUILDNAME}".

The second time CMake is run, directories with the correct names are constructed.

Are CMake commands guarenteed to execute in the order they appear in a CMake file? 


Jim Miller
_____________________________________
Visualization & Computer Vision 
GE Corporate Research & Development
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv at crd.ge.com <mailto:millerjv at crd.ge.com> 
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981


 <<Miller, James V (CRD).vcf>> 

begin 600 Miller, James V (CRD).vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DUI;&QE<CM*86UE<PT*1DXZ
M36EL;&5R+"!*86UE<R!6("A#4D0I#0I/4D<Z0U)$.T533`T*5$E43$4Z0V]M
M<'5T97(@4V-I96YT:7-T#0I414P[5T]22SM63TE#13HJ.#,S+30P,#4-"E1%
M3#M73U)+.U9/24-%.C$@-3$X(#,X-RTT,#`U#0I!1%([5T]22SH[2U<M0S(Q
M.$([4"Y/+B!";W@@.#M38VAE;F5C=&%D>3M.97<@66]R:SLQ,C,P,3M54T$-
M"DQ!0D5,.U=/4DL[14Y#3T1)3D<]455/5$5$+5!224Y404),13I+5RU#,C$X
M0CTP1#TP05`N3RX at 0F]X(#@],$0],$%38VAE;F5C=&%D>2P at 3F5W(%EO<FL@
M,3(S,#$],$0],$%54T$-"D5-04E,.U!2148[24Y415).150Z;6EL;&5R:G9`
M8W)D+F=E+F-O;0T*4D56.C(P,#$P-#(P5#$T,#,R.5H-"D5.1#I60T%21`T*
`
end




More information about the CMake mailing list