[CMake] Some newbie questions

Brandon Van Every bvanevery at gmail.com
Sat Nov 3 11:59:42 EDT 2007


On Nov 3, 2007 9:36 AM, Thomas Sharpless <tksharpless at gmail.com> wrote:
> Hello cmake
>
> I've just been introduced to cmake, and I LOVE it!  Congratulations on a
> great idea, very well realized.
>
> I've undertaken to build weekly snapshots of Hugin for Windows, and I need
> to be able maintain and extend the cmake scripts that control the build.
> Most of what I need is already clearly documented, but I do have a few
> questions about the basics that don't seem to be.
>
> 1] How can a script delete variables, in particular from the cache?

I forget.

> 2] What is the best way to get the pathname of the parent of a directory
> whose pathname I already have?  Using the form ${have_path}/.. in the PATHS
> argument to FIND_PATH did not work,  the output variable got set to
> "<expanded_have_path>/.." which though it is a correct reference on Windows
> and (I believe) Unix, does not work in a FIND_FILE command.

FILE(RELATIVE_PATH ...) ?

> 3] Does cmake run on a TCL interpreter, and if it does, can one escape into
> a less restricted dialect of TCL

No.

> and/or run TCL scripts from a file?

You can do anything you like with EXECUTE_PROCESS at configuration
time, or ADD_CUSTOM_COMMAND / ADD_CUSTOM_TARGET at build time.


Cheers,
Brandon Van Every


More information about the CMake mailing list