diff options
-rw-r--r-- | Modules/CMakeFindEclipseCDT4.cmake | 19 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 |
3 files changed, 22 insertions, 8 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index 9cb7bed..836e4c9 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -47,16 +47,21 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines # now find the builtin macros: STRING(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}") +# A few example lines which the regexp below has to match properly: +# #define MAX(a,b) ((a) > (b) ? (a) : (b)) +# #define __fastcall __attribute__((__fastcall__)) +# #define FOO (23) +# #define __UINTMAX_TYPE__ long long unsigned int +# #define __UINTMAX_TYPE__ long long unsigned int +# #define __i386__ 1 FOREACH(nextLine ${_defineLines}) - STRING(REGEX REPLACE "#define " "" _defineRemoved "${nextLine}") -# not sure why this longer regexp was in the patch, the shorter one in the line below seems to work just fine: -# STRING(REGEX MATCH "[A-Za-z_][A-Za-z0-9_]*|[A-Za-z_][A-Za-z0-9_]*\\([A-Za-z0-9_, ]*\\)" _name "${_defineRemoved}") - STRING(REGEX MATCH "[A-Za-z_][A-Za-z0-9_]*" _name "${_defineRemoved}") - LIST(APPEND ${_resultDefines} "${_name}") + STRING(REGEX MATCH "^#define +([A-Za-z_][A-Za-z0-9_]*)(\\([^\\)]+\\))? +(.+) *$" _dummy "${nextLine}") + SET(_name "${CMAKE_MATCH_1}${CMAKE_MATCH_2}") + STRING(STRIP "${CMAKE_MATCH_3}" _value) + #MESSAGE(STATUS "m1: -${CMAKE_MATCH_1}- m2: -${CMAKE_MATCH_2}- m3: -${CMAKE_MATCH_3}-") - STRING(REPLACE ${_name} "" _nameRemoved "${_defineRemoved}") - STRING(STRIP "${_nameRemoved}" _value) + LIST(APPEND ${_resultDefines} "${_name}") IF(_value) LIST(APPEND ${_resultDefines} "${_value}") ELSE() diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 59e20d5..ca522bb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1033,6 +1033,15 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); this->OutputIncludes(includes); clOptions.OutputFlagMap(*this->BuildFileStream, " "); + + // If not in debug mode, write the DebugInformationFormat field + // without value so PDBs don't get generated uselessly. + if(!clOptions.IsDebug()) + { + this->WriteString("<DebugInformationFormat>" + "</DebugInformationFormat>\n", 3); + } + clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", "\n"); this->WriteString("<AssemblerListingLocation>", 3); diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index b4a7e71..6acbd29 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) SET(KWSYS_DATE_STAMP_MONTH 08) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 23) +SET(KWSYS_DATE_STAMP_DAY 24) |