3
3
Program: CMake - Cross-Platform Makefile Generator
4
4
Module: $RCSfile: cmIfCommand.h,v $
6
Date: $Date: 2005/11/23 17:33:38 $
7
Version: $Revision: 1.28.2.1 $
6
Date: $Date: 2006/05/11 20:05:57 $
7
Version: $Revision: 1.32.2.1 $
9
9
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10
10
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
113
113
"will be evaluated. Then NOT operators and finally AND, OR operators "
114
114
"will be evaluated. Possible expressions are:\n"
115
115
" IF(variable)\n"
116
"True if the variable's value is not empty, 0, FALSE, OFF, or NOTFOUND.\n"
116
"True if the variable's value is not empty, 0, N, NO, OFF, FALSE, "
117
"NOTFOUND, or <variable>-NOTFOUND.\n"
117
118
" IF(NOT variable)\n"
118
"True if the variable's value is empty, 0, FALSE, OFF, or NOTFOUND.\n"
119
"True if the variable's value is empty, 0, N, NO, OFF, FALSE, "
120
"NOTFOUND, or <variable>-NOTFOUND.\n"
119
121
" IF(variable1 AND variable2)\n"
120
122
"True if both variables would be considered true individually.\n"
121
123
" IF(variable1 OR variable2)\n"
122
124
"True if either variable would be considered true individually.\n"
123
125
" IF(COMMAND command-name)\n"
124
"True if the given name is a command that can be invoked.\n"
126
"True if the given name is a file or directory.\n"
125
127
" IF(EXISTS file-name)\n"
126
128
" IF(EXISTS directory-name)\n"
129
"True if the given name is a directory.\n"
130
" IF(IS_DIRECTORY directory-name)\n"
127
131
"True if the named file or directory exists.\n"
128
132
" IF(variable MATCHES regex)\n"
129
133
" IF(string MATCHES regex)\n"
150
154
"variable is true or false just if it has been set.";
153
// this is a shared function for both If and Else to determine if
154
// the arguments were valid, and if so, was the response true. If there is an
155
// error, the errorString will be set.
157
// this is a shared function for both If and Else to determine if the
158
// arguments were valid, and if so, was the response true. If there is
159
// an error, the errorString will be set.
156
160
static bool IsTrue(const std::vector<std::string> &args,
157
161
char** errorString, const cmMakefile *mf);