[Cmake] target directory?

Bill Hoffman bill.hoffman at kitware.com
Fri Jun 14 09:04:55 EDT 2002


The documentation for SET is complete, and can be found in the pdf file:

· SET - Set a CMAKE variable to a value
Usage: 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 this case VAR is set
to a ; separated list of values.

However, many of the special variables are not documented.
I will put them in the docs today.

Here is a list:
User set variables, if these are set in a project cmake will look at them:
LIBRARY_OUTPUT_PATH
EXECUTABLE_OUTPUT_PATH
BUILD_SHARED_LIBS

These variables are defined for you by cmake:

WIN32, UNIX, CYGWIN, APPLE  - which os are you on
CMAKE_CFG_INTDIR   - Debug, Release, directories for win32
CMAKE_MINOR_VERSION, CMAKE_MAJOR_VERSION  - what version of cmake
CMAKE_SOURCE_DIR, CMAKE_BINARY_DIR   - where is the source and binary of your project
RUN_CONFIGURE   - is cmake in the configure part of the process
PROJECT_NAME   - what is the project name
PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR  - source and bin for the project


At 01:57 PM 6/14/2002 +0200, Vlad Popovici wrote:
>Thank you for your help!
>Wouldn't it be nice to have all this in the documentation?! Neither 
>LIBRARY_OUTPUT_PATH nor EXECUTABLE_OUTPUT_PATH are present in the 
>documentation. The same is valid for the form you suggested for SET(...). I 
>would prefer to avoid installing VTK just for studying its CMake files...
>
>Thanks again,
>Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20020614/a2d9c2e7/attachment.html>


More information about the CMake mailing list