summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-01 14:49:15 (GMT)
committerBrad King <brad.king@kitware.com>2006-08-01 14:49:15 (GMT)
commit1973efbab2d101cd588399aa3dc1a7620a7e2f88 (patch)
tree67b98531bfcda08f871368b68c04878d8b476329 /Tests
parent8dda3a2f6e4c9832642f2f6c102897cfca0670b3 (diff)
downloadCMake-1973efbab2d101cd588399aa3dc1a7620a7e2f88.zip
CMake-1973efbab2d101cd588399aa3dc1a7620a7e2f88.tar.gz
CMake-1973efbab2d101cd588399aa3dc1a7620a7e2f88.tar.bz2
ENH: Adding test for source files and header files with the same base name in the same target.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/Executable/A.cxx5
-rw-r--r--Tests/Complex/Executable/A.h4
-rw-r--r--Tests/Complex/Executable/A.hh2
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/Executable/A.cxx5
-rw-r--r--Tests/ComplexOneConfig/Executable/A.h4
-rw-r--r--Tests/ComplexOneConfig/Executable/A.hh2
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt2
-rw-r--r--Tests/ComplexRelativePaths/Executable/A.cxx5
-rw-r--r--Tests/ComplexRelativePaths/Executable/A.h4
-rw-r--r--Tests/ComplexRelativePaths/Executable/A.hh2
-rw-r--r--Tests/ComplexRelativePaths/Executable/CMakeLists.txt2
12 files changed, 33 insertions, 6 deletions
diff --git a/Tests/Complex/Executable/A.cxx b/Tests/Complex/Executable/A.cxx
index 7f98319..0cc995a 100644
--- a/Tests/Complex/Executable/A.cxx
+++ b/Tests/Complex/Executable/A.cxx
@@ -1,4 +1,7 @@
+// Include code from a header that should not be compiled separately.
+#include "A.hh"
+
int main()
{
- return 10;
+ return A();
}
diff --git a/Tests/Complex/Executable/A.h b/Tests/Complex/Executable/A.h
new file mode 100644
index 0000000..25c45fc
--- /dev/null
+++ b/Tests/Complex/Executable/A.h
@@ -0,0 +1,4 @@
+// This header should not be compiled directly but through inclusion
+// in A.cxx through A.hh.
+extern int A();
+int A() { return 10; }
diff --git a/Tests/Complex/Executable/A.hh b/Tests/Complex/Executable/A.hh
new file mode 100644
index 0000000..e6bab02
--- /dev/null
+++ b/Tests/Complex/Executable/A.hh
@@ -0,0 +1,2 @@
+// This header should not be compiled directly but through inclusion in A.cxx
+#include "A.h"
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index dae5775..71fde7b 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -19,7 +19,7 @@ ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
LINK_LIBRARIES(${COMPLEX_LIBS})
-ADD_EXECUTABLE(A A.cxx)
+ADD_EXECUTABLE(A A.cxx A.hh A.h)
ADD_EXECUTABLE(complex complex testcflags.c )
# Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)
diff --git a/Tests/ComplexOneConfig/Executable/A.cxx b/Tests/ComplexOneConfig/Executable/A.cxx
index 7f98319..0cc995a 100644
--- a/Tests/ComplexOneConfig/Executable/A.cxx
+++ b/Tests/ComplexOneConfig/Executable/A.cxx
@@ -1,4 +1,7 @@
+// Include code from a header that should not be compiled separately.
+#include "A.hh"
+
int main()
{
- return 10;
+ return A();
}
diff --git a/Tests/ComplexOneConfig/Executable/A.h b/Tests/ComplexOneConfig/Executable/A.h
new file mode 100644
index 0000000..25c45fc
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/A.h
@@ -0,0 +1,4 @@
+// This header should not be compiled directly but through inclusion
+// in A.cxx through A.hh.
+extern int A();
+int A() { return 10; }
diff --git a/Tests/ComplexOneConfig/Executable/A.hh b/Tests/ComplexOneConfig/Executable/A.hh
new file mode 100644
index 0000000..e6bab02
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/A.hh
@@ -0,0 +1,2 @@
+// This header should not be compiled directly but through inclusion in A.cxx
+#include "A.h"
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index dae5775..71fde7b 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -19,7 +19,7 @@ ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
LINK_LIBRARIES(${COMPLEX_LIBS})
-ADD_EXECUTABLE(A A.cxx)
+ADD_EXECUTABLE(A A.cxx A.hh A.h)
ADD_EXECUTABLE(complex complex testcflags.c )
# Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)
diff --git a/Tests/ComplexRelativePaths/Executable/A.cxx b/Tests/ComplexRelativePaths/Executable/A.cxx
index 7f98319..0cc995a 100644
--- a/Tests/ComplexRelativePaths/Executable/A.cxx
+++ b/Tests/ComplexRelativePaths/Executable/A.cxx
@@ -1,4 +1,7 @@
+// Include code from a header that should not be compiled separately.
+#include "A.hh"
+
int main()
{
- return 10;
+ return A();
}
diff --git a/Tests/ComplexRelativePaths/Executable/A.h b/Tests/ComplexRelativePaths/Executable/A.h
new file mode 100644
index 0000000..25c45fc
--- /dev/null
+++ b/Tests/ComplexRelativePaths/Executable/A.h
@@ -0,0 +1,4 @@
+// This header should not be compiled directly but through inclusion
+// in A.cxx through A.hh.
+extern int A();
+int A() { return 10; }
diff --git a/Tests/ComplexRelativePaths/Executable/A.hh b/Tests/ComplexRelativePaths/Executable/A.hh
new file mode 100644
index 0000000..e6bab02
--- /dev/null
+++ b/Tests/ComplexRelativePaths/Executable/A.hh
@@ -0,0 +1,2 @@
+// This header should not be compiled directly but through inclusion in A.cxx
+#include "A.h"
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
index dae5775..71fde7b 100644
--- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt
@@ -19,7 +19,7 @@ ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
LINK_LIBRARIES(${COMPLEX_LIBS})
-ADD_EXECUTABLE(A A.cxx)
+ADD_EXECUTABLE(A A.cxx A.hh A.h)
ADD_EXECUTABLE(complex complex testcflags.c )
# Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
ADD_EXECUTABLE(complex.file complex.file.cxx)