summaryrefslogtreecommitdiffstats
path: root/Tests/MFC/mfc1/mfc1Doc.cpp
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-10-24 20:55:52 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-11-01 14:08:58 (GMT)
commit36b0c432cf5804ec45367066e34f4c38165d5c09 (patch)
tree0c318628e7990a2e43b2f8a186f997b537a9f95f /Tests/MFC/mfc1/mfc1Doc.cpp
parent89742d73cc684a78586fad2497048d9329c1160e (diff)
downloadCMake-36b0c432cf5804ec45367066e34f4c38165d5c09.zip
CMake-36b0c432cf5804ec45367066e34f4c38165d5c09.tar.gz
CMake-36b0c432cf5804ec45367066e34f4c38165d5c09.tar.bz2
Tests: Add the MFC test (#11213)
Build a simple, do-nothing VS 7.1 MFC wizard generated app with CMake. Build it two different ways via ExternalProject, one with CMAKE_MFC_FLAG set to 1 for linking to MFC statically, and one with CMAKE_MFC_FLAG set to 2 for linking to the shared MFC dlls. Validate that the install tree of the static build has only one *.exe file in it and nothing else. Also validate that the install tree of the shared library build has multiple files in it (no less than 3) and that they are only of the expected types *.exe, *.dll and *.manifest. This commit does not address the issue reported in #11213, it merely adds a test that may be used to show that the bug report is valid. After this commit, the MFC test should fail on any dashboard machines that have MSVC defined, but cannot build an MFC app. We can then analyze that failure data as input to solving the issue.
Diffstat (limited to 'Tests/MFC/mfc1/mfc1Doc.cpp')
-rw-r--r--Tests/MFC/mfc1/mfc1Doc.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/Tests/MFC/mfc1/mfc1Doc.cpp b/Tests/MFC/mfc1/mfc1Doc.cpp
new file mode 100644
index 0000000..8767052
--- /dev/null
+++ b/Tests/MFC/mfc1/mfc1Doc.cpp
@@ -0,0 +1,78 @@
+// mfc1Doc.cpp : implementation of the Cmfc1Doc class
+//
+
+#include "stdafx.h"
+#include "mfc1.h"
+
+#include "mfc1Doc.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// Cmfc1Doc
+
+IMPLEMENT_DYNCREATE(Cmfc1Doc, CDocument)
+
+BEGIN_MESSAGE_MAP(Cmfc1Doc, CDocument)
+END_MESSAGE_MAP()
+
+
+// Cmfc1Doc construction/destruction
+
+Cmfc1Doc::Cmfc1Doc()
+{
+ // TODO: add one-time construction code here
+
+}
+
+Cmfc1Doc::~Cmfc1Doc()
+{
+}
+
+BOOL Cmfc1Doc::OnNewDocument()
+{
+ if (!CDocument::OnNewDocument())
+ return FALSE;
+
+ // TODO: add reinitialization code here
+ // (SDI documents will reuse this document)
+
+ return TRUE;
+}
+
+
+
+
+// Cmfc1Doc serialization
+
+void Cmfc1Doc::Serialize(CArchive& ar)
+{
+ if (ar.IsStoring())
+ {
+ // TODO: add storing code here
+ }
+ else
+ {
+ // TODO: add loading code here
+ }
+}
+
+
+// Cmfc1Doc diagnostics
+
+#ifdef _DEBUG
+void Cmfc1Doc::AssertValid() const
+{
+ CDocument::AssertValid();
+}
+
+void Cmfc1Doc::Dump(CDumpContext& dc) const
+{
+ CDocument::Dump(dc);
+}
+#endif //_DEBUG
+
+
+// Cmfc1Doc commands