summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-04-17 17:59:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-04-17 17:59:23 (GMT)
commit0f8603acc2f007e68a1c41a48919fd1acfc41c20 (patch)
tree95d6c7053b3770e71a6004ecb6b3fedbb74d9ece
parent69488e5bd22a59cc7bf0f571f0c9aec9a1273c39 (diff)
downloadCMake-0f8603acc2f007e68a1c41a48919fd1acfc41c20.zip
CMake-0f8603acc2f007e68a1c41a48919fd1acfc41c20.tar.gz
CMake-0f8603acc2f007e68a1c41a48919fd1acfc41c20.tar.bz2
ENH: allow multiple files with the same name in different sub dirs test
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt3
-rw-r--r--Tests/Complex/Executable/Sub1/NameConflictTest.c4
-rw-r--r--Tests/Complex/Executable/Sub2/NameConflictTest.c4
-rw-r--r--Tests/Complex/Executable/complex.cxx14
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt3
-rw-r--r--Tests/ComplexOneConfig/Executable/Sub1/NameConflictTest.c4
-rw-r--r--Tests/ComplexOneConfig/Executable/Sub2/NameConflictTest.c4
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx14
-rw-r--r--Tests/ComplexRelativePaths/Executable/CMakeLists.txt3
-rw-r--r--Tests/ComplexRelativePaths/Executable/Sub1/NameConflictTest.c4
-rw-r--r--Tests/ComplexRelativePaths/Executable/Sub2/NameConflictTest.c4
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx14
12 files changed, 69 insertions, 6 deletions
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index 78eb7a6..e1a7b6b 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -20,7 +20,8 @@ SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared
LINK_LIBRARIES(${COMPLEX_LIBS})
ADD_EXECUTABLE(A A.cxx)
-ADD_EXECUTABLE(complex complex testcflags.c)
+ADD_EXECUTABLE(complex complex testcflags.c
+ Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)
IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys cmexpat cmzlib cmtar)
diff --git a/Tests/Complex/Executable/Sub1/NameConflictTest.c b/Tests/Complex/Executable/Sub1/NameConflictTest.c
new file mode 100644
index 0000000..8720386
--- /dev/null
+++ b/Tests/Complex/Executable/Sub1/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest1()
+{
+ return 0;
+}
diff --git a/Tests/Complex/Executable/Sub2/NameConflictTest.c b/Tests/Complex/Executable/Sub2/NameConflictTest.c
new file mode 100644
index 0000000..4a32572
--- /dev/null
+++ b/Tests/Complex/Executable/Sub2/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest2()
+{
+ return 0;
+}
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 1f4c21a..f126fe5 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -290,6 +290,11 @@ void ForceStringUse()
extern "C" int TestCFlags(char* m);
extern "C" int TestTargetCompileFlags(char* m);
+// defined in Sub1/NameConflictTest.c
+extern "C" int NameConflictTest1();
+// defined in Sub2/NameConflictTest.c
+extern "C" int NameConflictTest2();
+
// ======================================================================
int main()
@@ -395,7 +400,14 @@ int main()
cmFailed("cmSystemTools::UpperCase is working");
}
#endif
-
+ if(NameConflictTest1() == 0 && NameConflictTest2() == 0)
+ {
+ cmPassed("Sub dir with same named source works");
+ }
+ else
+ {
+ cmFailed("Sub dir with same named source fails");
+ }
if(file1() != 1)
{
cmFailed("Call to file1 function from library failed.");
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 78eb7a6..e1a7b6b 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -20,7 +20,8 @@ SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared
LINK_LIBRARIES(${COMPLEX_LIBS})
ADD_EXECUTABLE(A A.cxx)
-ADD_EXECUTABLE(complex complex testcflags.c)
+ADD_EXECUTABLE(complex complex testcflags.c
+ Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)
IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys cmexpat cmzlib cmtar)
diff --git a/Tests/ComplexOneConfig/Executable/Sub1/NameConflictTest.c b/Tests/ComplexOneConfig/Executable/Sub1/NameConflictTest.c
new file mode 100644
index 0000000..8720386
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/Sub1/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest1()
+{
+ return 0;
+}
diff --git a/Tests/ComplexOneConfig/Executable/Sub2/NameConflictTest.c b/Tests/ComplexOneConfig/Executable/Sub2/NameConflictTest.c
new file mode 100644
index 0000000..4a32572
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/Sub2/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest2()
+{
+ return 0;
+}
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 1f4c21a..f126fe5 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -290,6 +290,11 @@ void ForceStringUse()
extern "C" int TestCFlags(char* m);
extern "C" int TestTargetCompileFlags(char* m);
+// defined in Sub1/NameConflictTest.c
+extern "C" int NameConflictTest1();
+// defined in Sub2/NameConflictTest.c
+extern "C" int NameConflictTest2();
+
// ======================================================================
int main()
@@ -395,7 +400,14 @@ int main()
cmFailed("cmSystemTools::UpperCase is working");
}
#endif
-
+ if(NameConflictTest1() == 0 && NameConflictTest2() == 0)
+ {
+ cmPassed("Sub dir with same named source works");
+ }
+ else
+ {
+ cmFailed("Sub dir with same named source fails");
+ }
if(file1() != 1)
{
cmFailed("Call to file1 function from library failed.");
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
index 78eb7a6..e1a7b6b 100644
--- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
@@ -20,7 +20,8 @@ SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared
LINK_LIBRARIES(${COMPLEX_LIBS})
ADD_EXECUTABLE(A A.cxx)
-ADD_EXECUTABLE(complex complex testcflags.c)
+ADD_EXECUTABLE(complex complex testcflags.c
+ Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)
IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys cmexpat cmzlib cmtar)
diff --git a/Tests/ComplexRelativePaths/Executable/Sub1/NameConflictTest.c b/Tests/ComplexRelativePaths/Executable/Sub1/NameConflictTest.c
new file mode 100644
index 0000000..8720386
--- /dev/null
+++ b/Tests/ComplexRelativePaths/Executable/Sub1/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest1()
+{
+ return 0;
+}
diff --git a/Tests/ComplexRelativePaths/Executable/Sub2/NameConflictTest.c b/Tests/ComplexRelativePaths/Executable/Sub2/NameConflictTest.c
new file mode 100644
index 0000000..4a32572
--- /dev/null
+++ b/Tests/ComplexRelativePaths/Executable/Sub2/NameConflictTest.c
@@ -0,0 +1,4 @@
+int NameConflictTest2()
+{
+ return 0;
+}
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 1f4c21a..f126fe5 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -290,6 +290,11 @@ void ForceStringUse()
extern "C" int TestCFlags(char* m);
extern "C" int TestTargetCompileFlags(char* m);
+// defined in Sub1/NameConflictTest.c
+extern "C" int NameConflictTest1();
+// defined in Sub2/NameConflictTest.c
+extern "C" int NameConflictTest2();
+
// ======================================================================
int main()
@@ -395,7 +400,14 @@ int main()
cmFailed("cmSystemTools::UpperCase is working");
}
#endif
-
+ if(NameConflictTest1() == 0 && NameConflictTest2() == 0)
+ {
+ cmPassed("Sub dir with same named source works");
+ }
+ else
+ {
+ cmFailed("Sub dir with same named source fails");
+ }
if(file1() != 1)
{
cmFailed("Call to file1 function from library failed.");