Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
7d76de44
Commit
7d76de44
authored
Mar 29, 2002
by
Bill Hoffman
Browse files
make sure ; expansion is done in all commands
parent
0223ba91
Changes
63
Hide whitespace changes
Inline
Side-by-side
Source/cmAbstractFilesCommand.cxx
View file @
7d76de44
...
...
@@ -17,13 +17,16 @@
#include "cmAbstractFilesCommand.h"
// cmAbstractFilesCommand
bool
cmAbstractFilesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmAbstractFilesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
1
)
if
(
args
In
.
size
()
<
1
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
bool
ret
=
true
;
std
::
string
m
=
"could not find source file(s):
\n
"
;
...
...
Source/cmAddCustomCommandCommand.cxx
View file @
7d76de44
...
...
@@ -18,17 +18,19 @@
// cmAddCustomCommandCommand
bool
cmAddCustomCommandCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmAddCustomCommandCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
/* Let's complain at the end of this function about the lack of a particular
arg. For the moment, let's say that SOURCE, COMMAND, TARGET are always
required.
*/
if
(
args
.
size
()
<
6
)
if
(
args
In
.
size
()
<
6
)
{
this
->
SetError
(
"called with wrong number of arguments."
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
std
::
string
source
,
command
,
target
;
std
::
vector
<
std
::
string
>
command_args
,
depends
,
outputs
;
...
...
Source/cmAddCustomTargetCommand.cxx
View file @
7d76de44
...
...
@@ -17,15 +17,17 @@
#include "cmAddCustomTargetCommand.h"
// cmAddCustomTargetCommand
bool
cmAddCustomTargetCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmAddCustomTargetCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
bool
all
=
false
;
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
// all target option
std
::
string
arguments
;
...
...
Source/cmAddDefinitionsCommand.cxx
View file @
7d76de44
...
...
@@ -17,13 +17,16 @@
#include "cmAddDefinitionsCommand.h"
// cmAddDefinitionsCommand
bool
cmAddDefinitionsCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmAddDefinitionsCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
1
)
if
(
args
In
.
size
()
<
1
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
for
(
std
::
vector
<
std
::
string
>::
const_iterator
i
=
args
.
begin
();
i
!=
args
.
end
();
++
i
)
{
...
...
Source/cmAddDependenciesCommand.cxx
View file @
7d76de44
...
...
@@ -18,14 +18,16 @@
#include "cmCacheManager.h"
// cmDependenciesCommand
bool
cmAddDependenciesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmAddDependenciesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
std
::
string
target_name
=
args
[
0
];
cmTargets
&
tgts
=
m_Makefile
->
GetTargets
();
...
...
Source/cmAddTestCommand.cxx
View file @
7d76de44
...
...
@@ -34,13 +34,7 @@ bool cmAddTestCommand::InitialPass(std::vector<std::string> const& args)
// also expand any CMake variables
m_Args
.
erase
(
m_Args
.
begin
(),
m_Args
.
end
());
std
::
string
temp
;
for
(
std
::
vector
<
std
::
string
>::
const_iterator
j
=
args
.
begin
();
j
!=
args
.
end
();
++
j
)
{
m_Args
.
push_back
(
*
j
);
}
cmSystemTools
::
ExpandListArguments
(
args
,
m_Args
);
return
true
;
}
...
...
Source/cmCableClassSetCommand.cxx
View file @
7d76de44
...
...
@@ -19,13 +19,15 @@
#include "cmTarget.h"
// cmCableClassSetCommand
bool
cmCableClassSetCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmCableClassSetCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
// The first argument is the name of the set.
std
::
vector
<
std
::
string
>::
const_iterator
arg
=
args
.
begin
();
...
...
Source/cmCableWrapTclCommand.cxx
View file @
7d76de44
...
...
@@ -122,17 +122,19 @@ cmCableWrapTclCommand::~cmCableWrapTclCommand()
// cmCableWrapTclCommand
bool
cmCableWrapTclCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmCableWrapTclCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
// Prepare to iterate through the arguments.
std
::
vector
<
std
::
string
>::
const_iterator
arg
=
args
.
begin
();
// The first argument is the name of the target.
m_TargetName
=
*
arg
++
;
...
...
Source/cmCommands.cxx
View file @
7d76de44
...
...
@@ -68,7 +68,6 @@
#include "cmSetSourceFilesPropertiesCommand.cxx"
#include "cmSiteNameCommand.cxx"
#include "cmSourceFilesCommand.cxx"
#include "cmSourceFilesFlagsCommand.cxx"
#include "cmSourceFilesRemoveCommand.cxx"
#include "cmSourceGroupCommand.cxx"
#include "cmSubdirCommand.cxx"
...
...
@@ -137,7 +136,6 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
commands
.
push_back
(
new
cmSetSourceFilesPropertiesCommand
);
commands
.
push_back
(
new
cmSiteNameCommand
);
commands
.
push_back
(
new
cmSourceFilesCommand
);
commands
.
push_back
(
new
cmSourceFilesFlagsCommand
);
commands
.
push_back
(
new
cmSourceFilesRemoveCommand
);
commands
.
push_back
(
new
cmSourceGroupCommand
);
commands
.
push_back
(
new
cmSubdirCommand
);
...
...
Source/cmCreateTestSourceList.cxx
View file @
7d76de44
...
...
@@ -27,7 +27,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
,
true
);
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
std
::
vector
<
std
::
string
>::
iterator
i
=
args
.
begin
();
...
...
Source/cmFLTKWrapUICommand.cxx
View file @
7d76de44
...
...
@@ -19,7 +19,7 @@
// cmFLTKWrapUICommand
bool
cmFLTKWrapUICommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
{
if
(
args
.
size
()
<
2
)
if
(
args
.
size
()
!=
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
...
...
Source/cmFindFileCommand.cxx
View file @
7d76de44
...
...
@@ -31,12 +31,12 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string> const& argsIn)
std
::
string
helpString
=
"Where can the "
;
helpString
+=
argsIn
[
1
]
+
" file be found"
;
size_t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
std
::
vector
<
std
::
string
>
args
t
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
if
(
argsIn
[
j
]
!=
"DOC"
)
{
args
.
push_back
(
argsIn
[
j
]);
args
t
.
push_back
(
argsIn
[
j
]);
}
else
{
...
...
@@ -47,6 +47,9 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string> const& argsIn)
break
;
}
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argst
,
args
);
std
::
vector
<
std
::
string
>::
const_iterator
i
=
args
.
begin
();
// Use the first argument as the name of something to be defined
const
char
*
define
=
(
*
i
).
c_str
();
...
...
Source/cmFindLibraryCommand.cxx
View file @
7d76de44
...
...
@@ -27,12 +27,12 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
}
std
::
string
helpString
;
size_t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
std
::
vector
<
std
::
string
>
args
t
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
if
(
argsIn
[
j
]
!=
"DOC"
)
{
args
.
push_back
(
argsIn
[
j
]);
args
t
.
push_back
(
argsIn
[
j
]);
}
else
{
...
...
@@ -43,6 +43,8 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
break
;
}
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argst
,
args
);
std
::
vector
<
std
::
string
>
path
;
std
::
vector
<
std
::
string
>
names
;
...
...
Source/cmFindPathCommand.cxx
View file @
7d76de44
...
...
@@ -30,13 +30,13 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
// already, if so use that value and don't look for the program
std
::
string
helpString
=
"What is the path where the file "
;
helpString
+=
argsIn
[
1
]
+
" can be found"
;
std
::
vector
<
std
::
string
>
args
;
std
::
vector
<
std
::
string
>
args
t
;
size_t
size
=
argsIn
.
size
();
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
if
(
argsIn
[
j
]
!=
"DOC"
)
{
args
.
push_back
(
argsIn
[
j
]);
args
t
.
push_back
(
argsIn
[
j
]);
}
else
{
...
...
@@ -47,6 +47,9 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
break
;
}
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argst
,
args
);
const
char
*
cacheValue
=
m_Makefile
->
GetDefinition
(
args
[
0
].
c_str
());
if
(
cacheValue
&&
strcmp
(
cacheValue
,
"NOTFOUND"
))
...
...
Source/cmFindProgramCommand.cxx
View file @
7d76de44
...
...
@@ -30,12 +30,12 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
}
std
::
string
doc
=
"Path to a program."
;
size_t
size
=
argsIn
.
size
();
std
::
vector
<
std
::
string
>
args
;
std
::
vector
<
std
::
string
>
args
t
;
for
(
unsigned
int
j
=
0
;
j
<
size
;
++
j
)
{
if
(
argsIn
[
j
]
!=
"DOC"
)
{
args
.
push_back
(
argsIn
[
j
]);
args
t
.
push_back
(
argsIn
[
j
]);
}
else
{
...
...
@@ -46,6 +46,10 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
break
;
}
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argst
,
args
);
std
::
vector
<
std
::
string
>::
iterator
i
=
args
.
begin
();
// Use the first argument as the name of something to be defined
const
char
*
define
=
(
*
i
).
c_str
();
...
...
Source/cmGetSourceFilePropertyCommand.cxx
View file @
7d76de44
...
...
@@ -20,7 +20,7 @@
bool
cmGetSourceFilePropertyCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
{
if
(
args
.
size
()
<
3
)
if
(
args
.
size
()
!=
3
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
...
...
@@ -38,7 +38,7 @@ bool cmGetSourceFilePropertyCommand::InitialPass(std::vector<std::string> const&
{
m_Makefile
->
AddDefinition
(
var
,
sf
->
GetWrapExclude
());
}
if
(
args
[
2
]
==
"FLAGS"
)
if
(
args
[
2
]
==
"
COMPILE_
FLAGS"
)
{
m_Makefile
->
AddDefinition
(
var
,
sf
->
GetCompileFlags
());
}
...
...
Source/cmGetSourceFilePropertyCommand.h
View file @
7d76de44
...
...
@@ -53,7 +53,7 @@ public:
virtual
const
char
*
GetFullDocumentation
()
{
return
"GET_SOURCE_FILE_PROPERTY(VAR file [ABSTRACT|WRAP_EXCLUDE|FLAGS]) "
"GET_SOURCE_FILE_PROPERTY(VAR file [ABSTRACT|WRAP_EXCLUDE|
COMPILE_
FLAGS]) "
"Get a property from a source file. The value of the property is stored "
"in the variable VAR."
;
}
...
...
Source/cmIncludeDirectoryCommand.cxx
View file @
7d76de44
...
...
@@ -17,13 +17,15 @@
#include "cmIncludeDirectoryCommand.h"
#include "cmCacheManager.h"
// cmIncludeDirectoryCommand
bool
cmIncludeDirectoryCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmIncludeDirectoryCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
1
)
if
(
args
In
.
size
()
<
1
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
std
::
vector
<
std
::
string
>::
const_iterator
i
=
args
.
begin
();
...
...
Source/cmInstallFilesCommand.cxx
View file @
7d76de44
...
...
@@ -18,13 +18,15 @@
#include "cmCacheManager.h"
// cmExecutableCommand
bool
cmInstallFilesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmInstallFilesCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
// Create an INSTALL_FILES target specifically for this path.
m_TargetName
=
"INSTALL_FILES_"
+
args
[
0
];
...
...
Source/cmInstallProgramsCommand.cxx
View file @
7d76de44
...
...
@@ -18,13 +18,15 @@
#include "cmCacheManager.h"
// cmExecutableCommand
bool
cmInstallProgramsCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
)
bool
cmInstallProgramsCommand
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
args
In
)
{
if
(
args
.
size
()
<
2
)
if
(
args
In
.
size
()
<
2
)
{
this
->
SetError
(
"called with incorrect number of arguments"
);
return
false
;
}
std
::
vector
<
std
::
string
>
args
;
cmSystemTools
::
ExpandListArguments
(
argsIn
,
args
);
// Create an INSTALL_PROGRAMS target specifically for this path.
m_TargetName
=
"INSTALL_PROGRAMS_"
+
args
[
0
];
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment