Skip to content
Snippets Groups Projects
Commit 59901c9c authored by David Cole's avatar David Cole
Browse files

ENH: Add ability to call Visual Studio macros from CMake. Add a CMake Visual...

ENH: Add ability to call Visual Studio macros from CMake. Add a CMake Visual Studio macro to reload a solution file automatically if CMake makes changes to .sln files or .vcproj files. Add code to call the macro automatically for any running Visual Studio instances with the .sln file open at the end of the Visual Studio Generate call. Only call the macro if some .sln or .vcproj file changed during Generate. Also, add handling for REG_EXPAND_SZ type to SystemTools::ReadRegistryValue - returned string has environment variable references expanded.
parent 2a6c298f
No related branches found
No related tags found
No related merge requests found
......@@ -492,11 +492,11 @@ void SystemTools::ReplaceString(kwsys_stl::string& source,
#if defined(_WIN32) && !defined(__CYGWIN__)
bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value)
{
bool valueset = false;
kwsys_stl::string primary = key;
kwsys_stl::string second;
kwsys_stl::string valuename;
size_t start = primary.find("\\");
if (start == kwsys_stl::string::npos)
{
......@@ -558,12 +558,24 @@ bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value)
if (dwType == REG_SZ)
{
value = data;
RegCloseKey(hKey);
return true;
valueset = true;
}
else if (dwType == REG_EXPAND_SZ)
{
char expanded[1024];
DWORD dwExpandedSize = sizeof(expanded)/sizeof(expanded[0]);
if(ExpandEnvironmentStrings(data, expanded, dwExpandedSize))
{
value = expanded;
valueset = true;
}
}
}
RegCloseKey(hKey);
}
return false;
return valueset;
}
#else
bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &)
......
# Do not edit! Generated by kwsysDateStamp.py
# KWSys version date year component. Format is CCYY.
SET(KWSYS_VERSION_DATE_YEAR 2007)
SET(KWSYS_DATE_STAMP_YEAR 2007)
# KWSys version date month component. Format is MM.
SET(KWSYS_VERSION_DATE_MONTH 11)
SET(KWSYS_DATE_STAMP_MONTH 11)
# KWSys version date day component. Format is DD.
SET(KWSYS_VERSION_DATE_DAY 12)
SET(KWSYS_DATE_STAMP_DAY 16)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment