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
f4bf694b
Commit
f4bf694b
authored
Mar 26, 2002
by
Bill Hoffman
Browse files
ENH: if no arguments are given and there is only one test, then run it
parent
8d594bdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/cmCreateTestSourceList.cxx
View file @
f4bf694b
...
...
@@ -20,7 +20,7 @@
// cmCreateTestSourceList
bool
cmCreateTestSourceList
::
InitialPass
(
std
::
vector
<
std
::
string
>
const
&
argsIn
)
{
if
(
argsIn
.
size
()
<
5
)
if
(
argsIn
.
size
()
<
3
)
{
this
->
SetError
(
"called with wrong number of arguments."
);
return
false
;
...
...
@@ -75,6 +75,9 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
fout
<<
" int i;
\n
"
;
fout
<<
" if(ac < 2)
\n
"
;
fout
<<
" {
\n
"
;
fout
<<
" // if there is only one test, then run it with the arguments
\n
"
;
fout
<<
" if(NumTests == 1)
\n
"
;
fout
<<
" { return (*cmakeGeneratedFunctionMapEntries[0].func)(ac, av); }
\n
"
;
fout
<<
" printf(
\"
Available tests:
\\
n
\"
);
\n
"
;
fout
<<
" for(i =0; i < NumTests; ++i)
\n
"
;
fout
<<
" {
\n
"
;
...
...
@@ -97,6 +100,9 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
fout
<<
" return (*cmakeGeneratedFunctionMapEntries[i].func)(ac-1, av+1);
\n
"
;
fout
<<
" }
\n
"
;
fout
<<
" }
\n
"
;
fout
<<
" // if there is only one test, then run it with the arguments
\n
"
;
fout
<<
" if(NumTests == 1)
\n
"
;
fout
<<
" { return (*cmakeGeneratedFunctionMapEntries[0].func)(ac, av); }
\n
"
;
fout
<<
" printf(
\"
Available tests:
\\
n
\"
);
\n
"
;
fout
<<
" for(i =0; i < NumTests; ++i)
\n
"
;
fout
<<
" {
\n
"
;
...
...
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