1
// CMakeSetupdialog.cpp : Defines the class behaviors for the application.
5
#include "CMakeSetup.h"
6
#include "CMakeSetupDialog.h"
7
#include "CMakeCommandLineInfo.h"
8
#include "../cmListFileCache.h"
9
#include "../cmMakefileGenerator.h"
14
static char THIS_FILE[] = __FILE__;
17
/////////////////////////////////////////////////////////////////////////////
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!
25
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
29
/////////////////////////////////////////////////////////////////////////////
30
// CMakeSetup construction
31
CMakeSetup::CMakeSetup()
33
// TODO: add construction code here,
34
// Place all significant initialization in InitInstance
37
/////////////////////////////////////////////////////////////////////////////
38
// The one and only CMakeSetup object
42
/////////////////////////////////////////////////////////////////////////////
43
// CMakeSetup initialization
45
BOOL CMakeSetup::InitInstance()
47
AfxEnableControlContainer();
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.
55
Enable3dControls(); // Call this when using MFC in a shared DLL
57
Enable3dControlsStatic(); // Call this when linking to MFC statically
60
CMakeCommandLineInfo cmdInfo;
61
ParseCommandLine(cmdInfo);
63
CMakeSetupDialog dlg(cmdInfo);
66
int nResponse = dlg.DoModal();
67
if (nResponse == IDOK)
69
// TODO: Place code here to handle when the dialog is
72
else if (nResponse == IDCANCEL)
74
// TODO: Place code here to handle when the dialog is
75
// dismissed with Cancel
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.