diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-02-23 00:24:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-02-23 00:24:43 (GMT) |
commit | 0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827 (patch) | |
tree | ed4c5e1e8bc331799cba8c2a797de8228f9f1f97 /Source/MFCDialog | |
parent | 5d903c6b0f5622a149e0aeda1053ce82b39d2807 (diff) | |
download | CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.zip CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.tar.gz CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.tar.bz2 |
ENH: add CMakeCache.txt support
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r-- | Source/MFCDialog/CMakeSetupDialog.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index c9c8e86..97b80ee 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -272,9 +272,26 @@ void CMakeSetupDialog::OnOK() mf.ReadListFile(makefileIn); // Move this to the cache editor mf.GenerateMakefile(); - CDialog::OnOK(); cmCacheManager::GetInstance()->SaveCache(&mf); + std::string command; + command = "notepad "; + std::string cachefile = m_WhereBuild; + cachefile += "/CMakeCache.txt"; + command += cachefile.c_str(); + long int originalMT = cmSystemTools::ModifiedTime(cachefile.c_str()); + system(command.c_str()); + long int afterEditMT = cmSystemTools::ModifiedTime(cachefile.c_str()); + // if the cache was changed, re-generate the project + if(originalMT != afterEditMT) + { + cmCacheManager::GetInstance()->LoadCache(&mf); + mf.GenerateMakefile(); + cmCacheManager::GetInstance()->SaveCache(&mf); + } + + // parent class this->SaveToRegistry(); + CDialog::OnOK(); } void CMakeSetupDialog::OnButton3() |