Commit b14c6eb6 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge in changes from main tree, including fix for exception stuff in vs 7

parent 392942d1
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 7)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 2)
SET(CMake_VERSION_RC 3)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.7
* Fix for if command scope issues
* Fix for relative path issue with paths ending in /.
* CMakeSetup saves the size of the dialog from the last run
* Fix for bug 4399, find qt designer on mac
* Fix for bug 4420 include unicode libs in cpack for vs8
* Fix for bug 4414 add_dependencies and set_target_properties can set any target not just the ones in the current directory.
* Add support for cygwin setup packages to setup
......
......@@ -484,6 +484,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_INCLUDE_DIR}/QtAssistant
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
......@@ -492,6 +493,7 @@ IF (QT4_QMAKE_FOUND)
PATHS
${QT_INCLUDE_DIR}/QtDesigner
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH
)
......
......@@ -51,6 +51,9 @@ IF(MSVC)
SET(__install__libs ${__install__libs}
"${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
"${MSVC80_MFC_DIR}/mfc80.dll"
"${MSVC80_MFC_DIR}/mfc80u.dll"
"${MSVC80_MFC_DIR}/mfcm80.dll"
"${MSVC80_MFC_DIR}/mfcm80u.dll"
)
ENDIF(MSVC80)
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
......
......@@ -424,6 +424,17 @@ void CMakeSetupDialog::SaveToRegistry()
{
// save some values
CString regvalue;
// write the size of the dialog
CRect size;
this->GetClientRect(&size);
unsigned long width = size.Width();
unsigned long height = size.Height();
RegSetValueEx(hKey, _T("Width"), 0, REG_DWORD,
(CONST BYTE *)(&width),4);
RegSetValueEx(hKey, _T("Height"), 0, REG_DWORD,
(CONST BYTE *)(&height),4);
this->ReadRegistryValue(hKey, &(regvalue),"WhereSource1","C:\\");
int shiftEnd = 9;
if(m_WhereSource != regvalue)
......@@ -540,6 +551,17 @@ void CMakeSetupDialog::LoadFromRegistry()
else
{
// load some values
DWORD dwSize = 4;
DWORD width, height;
if (RegQueryValueEx(hKey,_T("Width"), NULL, NULL,
(BYTE *)&width, &dwSize) == ERROR_SUCCESS &&
RegQueryValueEx(hKey,_T("Height"), NULL, NULL,
(BYTE *)&height, &dwSize) == ERROR_SUCCESS)
{
this->SetWindowPos(0,0,0,width,height,SWP_NOZORDER | SWP_NOMOVE);
}
if (m_WhereSource.IsEmpty())
{
this->ReadRegistryValue(hKey, &(m_WhereSource),"WhereSource1","C:\\");
......@@ -1173,6 +1195,10 @@ void CMakeSetupDialog::OnOk()
cmSystemTools::EnableMessages();
m_CacheEntriesList.ClearDirty();
this->RunCMake(true);
// save the size of the dialog
if (!(::GetKeyState(VK_SHIFT) & 0x1000))
{
CDialog::OnOK();
......
......@@ -15,6 +15,8 @@
=========================================================================*/
#include "cmAddDependenciesCommand.h"
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
// cmDependenciesCommand
bool cmAddDependenciesCommand::InitialPass(
......@@ -28,14 +30,16 @@ bool cmAddDependenciesCommand::InitialPass(
std::string target_name = args[0];
cmTargets &tgts = this->Makefile->GetTargets();
if (tgts.find(target_name) != tgts.end())
cmTarget* target =
this->GetMakefile()->GetLocalGenerator()->
GetGlobalGenerator()->FindTarget(0, target_name.c_str());
if(target)
{
std::vector<std::string>::const_iterator s = args.begin();
++s;
++s; // skip over target_name
for (; s != args.end(); ++s)
{
tgts[target_name].AddUtility(s->c_str());
target->AddUtility(s->c_str());
}
}
else
......@@ -46,7 +50,6 @@ bool cmAddDependenciesCommand::InitialPass(
return false;
}
return true;
}
......@@ -22,10 +22,24 @@
bool cmIfFunctionBlocker::
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
{
// always let if statements through
// if we are blocking then all we need to do is keep track of
// scope depth of nested if statements
if (this->IsBlocking)
{
if (!cmSystemTools::Strucmp(lff.Name.c_str(),"if"))
{
return false;
this->ScopeDepth++;
return true;
}
}
if (this->IsBlocking && this->ScopeDepth)
{
if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif"))
{
this->ScopeDepth--;
}
return true;
}
// watch for our ELSE or ENDIF
......
......@@ -28,7 +28,7 @@
class cmIfFunctionBlocker : public cmFunctionBlocker
{
public:
cmIfFunctionBlocker() {this->HasRun = false;}
cmIfFunctionBlocker() {this->HasRun = false; this->ScopeDepth = 0;}
virtual ~cmIfFunctionBlocker() {}
virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
cmMakefile &mf);
......@@ -39,6 +39,7 @@ public:
std::vector<cmListFileArgument> Args;
bool IsBlocking;
bool HasRun;
unsigned int ScopeDepth;
};
/** \class cmIfCommand
......
......@@ -429,6 +429,9 @@ public:
// Store options from command line flags.
void Parse(const char* flags);
// Fix the ExceptionHandling option to default to off.
void FixExceptionHandlingDefault();
// Store options for verbose builds.
void SetVerboseMakefile(bool verbose);
......@@ -554,6 +557,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
// Construct a set of build options for this target.
Options targetOptions(Options::Compiler);
targetOptions.FixExceptionHandlingDefault();
targetOptions.Parse(flags.c_str());
targetOptions.Parse(defineFlags.c_str());
targetOptions.SetVerboseMakefile(
......@@ -1696,7 +1700,11 @@ cmLocalVisualStudio7GeneratorOptions
this->FlagTable = cmLocalVisualStudio7GeneratorLinkFlagTable; break;
default: break;
}
}
//----------------------------------------------------------------------------
void cmLocalVisualStudio7GeneratorOptions::FixExceptionHandlingDefault()
{
// Exception handling is on by default because the platform file has
// "/EHsc" in the flags. Normally, that will override this
// initialization to off, but the user has the option of removing
......
......@@ -15,6 +15,8 @@
=========================================================================*/
#include "cmSetTargetPropertiesCommand.h"
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
// cmSetTargetPropertiesCommand
bool cmSetTargetPropertiesCommand::InitialPass(
......@@ -71,25 +73,26 @@ bool cmSetTargetPropertiesCommand::InitialPass(
return false;
}
cmTargets& targets = this->Makefile->GetTargets();
// now loop over all the targets
int i;
unsigned int k;
for(i = 0; i < numFiles; ++i)
{
// if the file is already in the makefile just set properites on it
cmTargets::iterator t = targets.find(args[i]);
if ( t != targets.end())
cmTarget* target =
this->GetMakefile()
->GetLocalGenerator()->GetGlobalGenerator()->FindTarget(0,
args[i].c_str());
if ( target )
{
cmTarget& target = t->second;
// now loop through all the props and set them
unsigned int k;
for (k = 0; k < propertyPairs.size(); k = k + 2)
{
target.SetProperty(propertyPairs[k].c_str(),
propertyPairs[k+1].c_str());
target->SetProperty(propertyPairs[k].c_str(),
propertyPairs[k+1].c_str());
}
}
// if file is not already in the makefile, then add it
// if file is not already in the makefile, then report error
else
{
std::string message = "Can not find target to add properties to: ";
......
......@@ -2599,8 +2599,20 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_path,
// Transform the path back to a string.
kwsys_stl::string newPath = SystemTools::JoinPath(out_components);
// Update the translation table with this potentially new path.
SystemTools::AddTranslationPath(newPath.c_str(), in_path);
// Update the translation table with this potentially new path. I am not
// sure why this line is here, it seems really questionable, but yet I
// would put good money that if I remove it something will break, basically
// from what I can see it created a mapping from the collapsed path, to be
// replaced by the input path, which almost completely does the opposite of
// this function, the only thing preventing this from happening a lot is
// that if the in_path has a .. in it, then it is not added to the
// translation table. So for most calls this either does nothing due to the
// .. or it adds a translation between identical paths as nothing was
// collapsed, so I am going to try to comment it out, and see what hits the
// fan, hopefully quickly.
// Commented out line below:
//SystemTools::AddTranslationPath(newPath.c_str(), in_path);
SystemTools::CheckTranslationPath(newPath);
#ifdef _WIN32
newPath = SystemTools::GetActualCaseForPath(newPath.c_str());
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment