~ubuntu-branches/ubuntu/intrepid/cmake/intrepid-backports

« back to all changes in this revision

Viewing changes to Source/MFCDialog/CMakeSetup.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maitland Bottoms
  • Date: 2002-02-14 18:36:25 UTC
  • Revision ID: james.westby@ubuntu.com-20020214183625-8m44isdas2k4l0f7
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// CMakeSetupdialog.cpp : Defines the class behaviors for the application.
 
2
//
 
3
 
 
4
#include "stdafx.h"
 
5
#include "CMakeSetup.h"
 
6
#include "CMakeSetupDialog.h"
 
7
#include "CMakeCommandLineInfo.h" 
 
8
#include "../cmListFileCache.h"
 
9
#include "../cmMakefileGenerator.h"
 
10
 
 
11
#ifdef _DEBUG
 
12
#define new DEBUG_NEW
 
13
#undef THIS_FILE
 
14
static char THIS_FILE[] = __FILE__;
 
15
#endif
 
16
 
 
17
/////////////////////////////////////////////////////////////////////////////
 
18
// CMakeSetup
 
19
 
 
20
BEGIN_MESSAGE_MAP(CMakeSetup, CWinApp)
 
21
  //{{AFX_MSG_MAP(CMakeSetup)
 
22
  // NOTE - the ClassWizard will add and remove mapping macros here.
 
23
  //    DO NOT EDIT what you see in these blocks of generated code!
 
24
  //}}AFX_MSG
 
25
  ON_COMMAND(ID_HELP, CWinApp::OnHelp)
 
26
  END_MESSAGE_MAP();
 
27
 
 
28
 
 
29
/////////////////////////////////////////////////////////////////////////////
 
30
// CMakeSetup construction
 
31
CMakeSetup::CMakeSetup()
 
32
{
 
33
  // TODO: add construction code here,
 
34
  // Place all significant initialization in InitInstance
 
35
}
 
36
 
 
37
/////////////////////////////////////////////////////////////////////////////
 
38
// The one and only CMakeSetup object
 
39
 
 
40
CMakeSetup theApp;
 
41
 
 
42
/////////////////////////////////////////////////////////////////////////////
 
43
// CMakeSetup initialization
 
44
 
 
45
BOOL CMakeSetup::InitInstance()
 
46
{
 
47
  AfxEnableControlContainer();
 
48
 
 
49
  // Standard initialization
 
50
  // If you are not using these features and wish to reduce the size
 
51
  //  of your final executable, you should remove from the following
 
52
  //  the specific initialization routines you do not need.
 
53
 
 
54
#ifdef _AFXDLL
 
55
  Enable3dControls();                   // Call this when using MFC in a shared DLL
 
56
#else
 
57
  Enable3dControlsStatic();     // Call this when linking to MFC statically
 
58
#endif
 
59
 
 
60
  CMakeCommandLineInfo cmdInfo;
 
61
  ParseCommandLine(cmdInfo);
 
62
 
 
63
  CMakeSetupDialog dlg(cmdInfo);
 
64
 
 
65
  m_pMainWnd = &dlg;
 
66
  int nResponse = dlg.DoModal();
 
67
  if (nResponse == IDOK)
 
68
    {
 
69
    // TODO: Place code here to handle when the dialog is
 
70
    //  dismissed with OK
 
71
    }
 
72
  else if (nResponse == IDCANCEL)
 
73
    {
 
74
    // TODO: Place code here to handle when the dialog is
 
75
    //  dismissed with Cancel
 
76
    }
 
77
 
 
78
  // clean up globals 
 
79
  cmListFileCache::GetInstance()->ClearCache(); 
 
80
  cmMakefileGenerator::UnRegisterGenerators();
 
81
  // Since the dialog has been closed, return FALSE so that we exit the
 
82
  //  application, rather than start the application's message pump.
 
83
  return FALSE;
 
84
}