diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-08-21 21:41:12 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-08-21 21:41:12 (GMT) |
commit | 9b259810684b1dc791b71ca45014340e48c8e343 (patch) | |
tree | dc4602455a1d64b8ef53d154151bebe7a96a499a /Source/MFCDialog/CMakeSetupDialog.cpp | |
parent | a159c2d306368bddae574a83464cff5e00230369 (diff) | |
download | CMake-9b259810684b1dc791b71ca45014340e48c8e343.zip CMake-9b259810684b1dc791b71ca45014340e48c8e343.tar.gz CMake-9b259810684b1dc791b71ca45014340e48c8e343.tar.bz2 |
CMakeSetup now handles command-line arguments (ex: /H=source_dir /B=build_dir)
Diffstat (limited to 'Source/MFCDialog/CMakeSetupDialog.cpp')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index 9209668..3f47424 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -5,6 +5,7 @@ #include "CMakeSetup.h" #include "PathDialog.h" #include "CMakeSetupDialog.h" +#include "CMakeCommandLineInfo.h" #include "../cmCacheManager.h" #include "../cmake.h" #ifdef _DEBUG @@ -62,14 +63,15 @@ BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) ///////////////////////////////////////////////////////////////////////////// // CMakeSetupDialog dialog -CMakeSetupDialog::CMakeSetupDialog(CWnd* pParent /*=NULL*/) +CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, + CWnd* pParent /*=NULL*/) : CDialog(CMakeSetupDialog::IDD, pParent) { m_RegistryKey = "Software\\Kitware\\CMakeSetup\\Settings\\StartPath"; //{{AFX_DATA_INIT(CMakeSetupDialog) - m_WhereSource = _T(""); - m_WhereBuild = _T(""); + m_WhereSource = cmdInfo.m_WhereSource; + m_WhereBuild = cmdInfo.m_WhereBuild; //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); @@ -339,8 +341,14 @@ void CMakeSetupDialog::LoadFromRegistry() else { // load some values - this->ReadRegistryValue(hKey, &(m_WhereSource),"WhereSource","C:\\"); - this->ReadRegistryValue(hKey, &(m_WhereBuild),"WhereBuild","C:\\"); + if (m_WhereSource.IsEmpty()) + { + this->ReadRegistryValue(hKey, &(m_WhereSource),"WhereSource","C:\\"); + } + if (m_WhereBuild.IsEmpty()) + { + this->ReadRegistryValue(hKey, &(m_WhereBuild),"WhereBuild","C:\\"); + } m_WhereSourceControl.AddString(m_WhereSource); m_WhereBuildControl.AddString(m_WhereBuild); |