[Cmake-commits] [cmake-commits] hoffman committed cmCallVisualStudioMacro.cxx 1.3 1.3.2.1 cmCallVisualStudioMacro.h 1.1 1.1.2.1 cmGlobalGenerator.cxx 1.227.2.5 1.227.2.6 cmGlobalVisualStudioGenerator.cxx 1.11.2.1 1.11.2.2 cmake.cxx 1.375.2.9 1.375.2.10
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jul 31 11:52:26 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24777/Source
Modified Files:
Tag: CMake-2-6
cmCallVisualStudioMacro.cxx cmCallVisualStudioMacro.h
cmGlobalGenerator.cxx cmGlobalVisualStudioGenerator.cxx
cmake.cxx
Log Message:
ENH: merge in stuff from cvs head RC 16
Index: cmCallVisualStudioMacro.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.cxx,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C 2 -d -r1.3 -r1.3.2.1
*** cmCallVisualStudioMacro.cxx 15 Feb 2008 16:49:58 -0000 1.3
--- cmCallVisualStudioMacro.cxx 31 Jul 2008 15:52:24 -0000 1.3.2.1
***************
*** 25,28 ****
--- 25,33 ----
+ // Just for this file:
+ //
+ static bool LogErrorsAsMessages;
+
+
#if defined(HAVE_COMDEF_H)
***************
*** 32,46 ****
//----------------------------------------------------------------------------
! ///! Use ReportHRESULT to make a cmSystemTools::Error after calling
///! a COM method that may have failed.
#define ReportHRESULT(hr, context) \
if (FAILED(hr)) \
{ \
! std::ostringstream oss; \
! oss.flags(std::ios::hex); \
! oss << context << " failed HRESULT, hr = 0x" << hr << std::endl; \
! oss.flags(std::ios::dec); \
! oss << __FILE__ << "(" << __LINE__ << ")"; \
! cmSystemTools::Error(oss.str().c_str()); \
}
--- 37,54 ----
//----------------------------------------------------------------------------
! ///! Use ReportHRESULT to make a cmSystemTools::Message after calling
///! a COM method that may have failed.
#define ReportHRESULT(hr, context) \
if (FAILED(hr)) \
{ \
! if (LogErrorsAsMessages) \
! { \
! std::ostringstream oss; \
! oss.flags(std::ios::hex); \
! oss << context << " failed HRESULT, hr = 0x" << hr << std::endl; \
! oss.flags(std::ios::dec); \
! oss << __FILE__ << "(" << __LINE__ << ")"; \
! cmSystemTools::Message(oss.str().c_str()); \
! } \
}
***************
*** 405,408 ****
--- 413,418 ----
int count = 0;
+ LogErrorsAsMessages = false;
+
#if defined(HAVE_COMDEF_H)
HRESULT hr = CoInitialize(0);
***************
*** 439,446 ****
const std::string& slnFile,
const std::string& macro,
! const std::string& args)
{
int err = 1; // no comdef.h
#if defined(HAVE_COMDEF_H)
err = 2; // error initializing
--- 449,459 ----
const std::string& slnFile,
const std::string& macro,
! const std::string& args,
! const bool logErrorsAsMessages)
{
int err = 1; // no comdef.h
+ LogErrorsAsMessages = logErrorsAsMessages;
+
#if defined(HAVE_COMDEF_H)
err = 2; // error initializing
***************
*** 490,504 ****
(void)macro;
(void)args;
! cmSystemTools::Error("cmCallVisualStudioMacro::CallMacro is not "
! "supported on this platform");
#endif
! if (err)
{
std::ostringstream oss;
oss << "cmCallVisualStudioMacro::CallMacro failed, err = " << err;
! cmSystemTools::Error(oss.str().c_str());
}
! return err;
}
--- 503,520 ----
(void)macro;
(void)args;
! if (LogErrorsAsMessages)
! {
! cmSystemTools::Message("cmCallVisualStudioMacro::CallMacro is not "
! "supported on this platform");
! }
#endif
! if (err && LogErrorsAsMessages)
{
std::ostringstream oss;
oss << "cmCallVisualStudioMacro::CallMacro failed, err = " << err;
! cmSystemTools::Message(oss.str().c_str());
}
! return 0;
}
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227.2.5
retrieving revision 1.227.2.6
diff -C 2 -d -r1.227.2.5 -r1.227.2.6
*** cmGlobalGenerator.cxx 17 Jul 2008 14:14:25 -0000 1.227.2.5
--- cmGlobalGenerator.cxx 31 Jul 2008 15:52:24 -0000 1.227.2.6
***************
*** 1566,1570 ****
if ( this->GetPreinstallTargetName() )
{
! depends.push_back("preinstall");
}
else
--- 1566,1570 ----
if ( this->GetPreinstallTargetName() )
{
! depends.push_back(this->GetPreinstallTargetName());
}
else
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.9
retrieving revision 1.375.2.10
diff -C 2 -d -r1.375.2.9 -r1.375.2.10
*** cmake.cxx 13 Jul 2008 21:55:24 -0000 1.375.2.9
--- cmake.cxx 31 Jul 2008 15:52:24 -0000 1.375.2.10
***************
*** 1423,1427 ****
}
! return cmCallVisualStudioMacro::CallMacro(args[2], args[3], macroArgs);
}
#endif
--- 1423,1428 ----
}
! return cmCallVisualStudioMacro::CallMacro(args[2], args[3],
! macroArgs, true);
}
#endif
Index: cmGlobalVisualStudioGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.cxx,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C 2 -d -r1.11.2.1 -r1.11.2.2
*** cmGlobalVisualStudioGenerator.cxx 1 May 2008 16:35:39 -0000 1.11.2.1
--- cmGlobalVisualStudioGenerator.cxx 31 Jul 2008 15:52:24 -0000 1.11.2.2
***************
*** 179,184 ****
projects += *it;
}
! cmCallVisualStudioMacro::CallMacro
! (topLevelSlnName, CMAKE_VSMACROS_RELOAD_MACRONAME, projects);
}
}
--- 179,185 ----
projects += *it;
}
! cmCallVisualStudioMacro::CallMacro(topLevelSlnName,
! CMAKE_VSMACROS_RELOAD_MACRONAME, projects,
! this->GetCMakeInstance()->GetDebugOutput());
}
}
***************
*** 186,190 ****
{
cmCallVisualStudioMacro::CallMacro(topLevelSlnName,
! CMAKE_VSMACROS_STOP_MACRONAME, "");
}
}
--- 187,192 ----
{
cmCallVisualStudioMacro::CallMacro(topLevelSlnName,
! CMAKE_VSMACROS_STOP_MACRONAME, "",
! this->GetCMakeInstance()->GetDebugOutput());
}
}
Index: cmCallVisualStudioMacro.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** cmCallVisualStudioMacro.h 16 Nov 2007 12:01:58 -0000 1.1
--- cmCallVisualStudioMacro.h 31 Jul 2008 15:52:24 -0000 1.1.2.1
***************
*** 34,38 ****
static int CallMacro(const std::string& slnFile,
const std::string& macro,
! const std::string& args);
///! Count the number of running instances of Visual Studio with the
--- 34,39 ----
static int CallMacro(const std::string& slnFile,
const std::string& macro,
! const std::string& args,
! const bool logErrorsAsMessages);
///! Count the number of running instances of Visual Studio with the
More information about the Cmake-commits
mailing list