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
85b286f0
Commit
85b286f0
authored
Mar 27, 2002
by
Sebastien Barre
Browse files
ENH: add a more stressing FOREACH test.
parent
1623dc21
Changes
9
Hide whitespace changes
Inline
Side-by-side
Tests/Complex/Executable/complex.cxx
View file @
85b286f0
...
...
@@ -359,6 +359,21 @@ int main()
}
#endif
#ifndef FOREACH_CONCAT
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT is not defined."
);
#else
if
(
strcmp
(
FOREACH_CONCAT
,
"abcdefg"
)
!=
0
)
{
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
else
{
cmPassed
(
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
#endif
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
Tests/Complex/VarTests.cmake
View file @
85b286f0
...
...
@@ -102,6 +102,11 @@ FOREACH (INDEX 1 2)
SET
(
FOREACH_VAR
${
INDEX
}
"VALUE
${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
SET
(
FOREACH_CONCAT
""
)
FOREACH
(
INDEX
"a;b;c;d;e;f;g"
)
SET
(
FOREACH_CONCAT
"
${
FOREACH_CONCAT
}${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
#
# Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#
...
...
Tests/Complex/cmTestConfigure.h.in
View file @
85b286f0
...
...
@@ -10,6 +10,7 @@
#define FOREACH_VAR1 "${FOREACH_VAR1}"
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
Tests/ComplexOneConfig/Executable/complex.cxx
View file @
85b286f0
...
...
@@ -359,6 +359,21 @@ int main()
}
#endif
#ifndef FOREACH_CONCAT
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT is not defined."
);
#else
if
(
strcmp
(
FOREACH_CONCAT
,
"abcdefg"
)
!=
0
)
{
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
else
{
cmPassed
(
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
#endif
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
Tests/ComplexOneConfig/VarTests.cmake
View file @
85b286f0
...
...
@@ -102,6 +102,11 @@ FOREACH (INDEX 1 2)
SET
(
FOREACH_VAR
${
INDEX
}
"VALUE
${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
SET
(
FOREACH_CONCAT
""
)
FOREACH
(
INDEX
"a;b;c;d;e;f;g"
)
SET
(
FOREACH_CONCAT
"
${
FOREACH_CONCAT
}${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
#
# Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#
...
...
Tests/ComplexOneConfig/cmTestConfigure.h.in
View file @
85b286f0
...
...
@@ -10,6 +10,7 @@
#define FOREACH_VAR1 "${FOREACH_VAR1}"
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
Tests/ComplexRelativePaths/Executable/complex.cxx
View file @
85b286f0
...
...
@@ -359,6 +359,21 @@ int main()
}
#endif
#ifndef FOREACH_CONCAT
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT is not defined."
);
#else
if
(
strcmp
(
FOREACH_CONCAT
,
"abcdefg"
)
!=
0
)
{
cmFailed
(
"the FOREACH, SET or CONFIGURE_FILE command is broken, "
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
else
{
cmPassed
(
"FOREACH_CONCAT == "
,
FOREACH_CONCAT
);
}
#endif
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
Tests/ComplexRelativePaths/VarTests.cmake
View file @
85b286f0
...
...
@@ -102,6 +102,11 @@ FOREACH (INDEX 1 2)
SET
(
FOREACH_VAR
${
INDEX
}
"VALUE
${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
SET
(
FOREACH_CONCAT
""
)
FOREACH
(
INDEX
"a;b;c;d;e;f;g"
)
SET
(
FOREACH_CONCAT
"
${
FOREACH_CONCAT
}${
INDEX
}
"
)
ENDFOREACH
(
INDEX
)
#
# Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#
...
...
Tests/ComplexRelativePaths/cmTestConfigure.h.in
View file @
85b286f0
...
...
@@ -10,6 +10,7 @@
#define FOREACH_VAR1 "${FOREACH_VAR1}"
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
...
...
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