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

Miller, James V (CRD) millerjv at crd.ge.com
Mon Jun 25 11:28:31 EDT 2001


I found part of the problem, the SITE_NAME() and BUILD_NAME() commands were only calling
AddDefinition() if the value was read from the cache.  So the first time cmake was run, the values
were stored for the rest of the makefile to use.



-----Original Message-----
From: Miller, James V (CRD) 
Sent: Monday, June 25, 2001 10:44 AM
To: CMake developers (E-mail)
Subject: [Cmake] Order (Timing) of CMake commands and MAKE_DIRECTORY


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>> 


_______________________________________________
Cmake mailing list
Cmake at public.kitware.com
http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list