summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-05-04 18:07:27 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-05-04 18:07:27 -0400
commit199b6a338e2686836314addef472f9c7c7d4ab7b (patch)
tree3695c52e8d9b6681b77d49c674ce54ebfb4ba25f
parentc89ebb4240a711fb269f006b5005d530e920b95a (diff)
downloadcmake-199b6a338e2686836314addef472f9c7c7d4ab7b.tar.gz
ENH: merge from main tree
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual4
-rw-r--r--Modules/CTest.cmake22
-rw-r--r--Modules/FindQt4.cmake2
-rw-r--r--Modules/FindX11.cmake1
-rw-r--r--Modules/GetPrerequisites.cmake1
-rw-r--r--Source/kwsys/SystemInformation.cxx36
7 files changed, 41 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e7c6ca1cd..72d28d614a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 0)
-SET(CMake_VERSION_RC 10)
+SET(CMake_VERSION_RC 101)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
diff --git a/ChangeLog.manual b/ChangeLog.manual
index fad06db0bd..f440fb1c8b 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,7 @@
+Changes in CMake 2.6.0
+- Fix for FindQt and some mac frameworks
+- Fix for ctest to report more than 2 gigs system memory on windows
+- Fix CTest build name for vs 9, and fix memory size on windows
Changes in CMake 2.6.0 RC 10
- Do not duplicate .so libraries on the link line
- Add more system library paths to sun builds
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 28d9b58db4..10d6ff51f5 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -11,6 +11,18 @@
OPTION(BUILD_TESTING "Build the testing tree." ON)
+# function to turn generator name into a version string
+# like vs7 vs71 vs8 vs9
+FUNCTION(GET_VS_VERSION_STRING generator var)
+ STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1" NUMBER "${generator}")
+ IF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ SET(ver_string "vs71")
+ ELSE("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ SET(ver_string "vs${NUMBER}")
+ ENDIF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ SET(${var} ${ver_string} PARENT_SCOPE)
+ENDFUNCTION(GET_VS_VERSION_STRING)
+
IF(BUILD_TESTING)
# Setup some auxilary macros
MACRO(SET_IF_NOT_SET var val)
@@ -171,15 +183,7 @@ IF(BUILD_TESTING)
SET(DART_CXX_NAME "vs60")
ENDIF(DART_CXX_NAME MATCHES "msdev")
IF(DART_CXX_NAME MATCHES "devenv")
- IF(CMAKE_GENERATOR MATCHES "^Visual Studio 7$")
- SET(DART_CXX_NAME "vs70")
- ELSE(CMAKE_GENERATOR MATCHES "^Visual Studio 7$")
- IF(CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$")
- SET(DART_CXX_NAME "vs71")
- ELSE(CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$")
- SET(DART_CXX_NAME "vs8")
- ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$")
- ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio 7$")
+ GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME)
ENDIF(DART_CXX_NAME MATCHES "devenv")
SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
ENDIF(NOT BUILDNAME)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 0dd98ae065..ee1b2928b4 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -645,6 +645,7 @@ IF (QT4_QMAKE_FOUND)
FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus
PATHS
${QT_INCLUDE_DIR}/QtDBus
+ ${QT_LIBRARY_DIR}/QtDBus.framework/Headers
NO_DEFAULT_PATH
)
@@ -684,6 +685,7 @@ IF (QT4_QMAKE_FOUND)
FIND_PATH(QT_PHONON_INCLUDE_DIR phonon
PATHS
${QT_INCLUDE_DIR}/phonon
+ ${QT_LIBRARY_DIR}/phonon.framework/Headers
NO_DEFAULT_PATH
)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index f3e88070e4..0db6abed16 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -417,6 +417,7 @@ IF (UNIX)
X11_XShm_INCLUDE_PATH
X11_ICE_LIB
X11_ICE_INCLUDE_PATH
+ X11_SM_LIB
)
SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
ENDIF (UNIX)
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 364943dac9..8c29d4b8b5 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -251,6 +251,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse)
set(gp_regex "^ ([^ ].*[Dd][Ll][Ll])${eol_char}$")
set(gp_regex_cmp_count 1)
set(gp_tool_known 1)
+ set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE.
endif("${gp_tool}" STREQUAL "dumpbin")
if(NOT gp_tool_known)
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 2d9fee66b2..ee762c7f63 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -799,8 +799,6 @@ void SystemInformationImplementation::Delay(unsigned int uiMS)
bool SystemInformationImplementation::DoesCPUSupportCPUID()
{
- int CPUIDPresent = 0;
-
#if USE_ASM_INSTRUCTIONS
// Use SEH to determine CPUID presence
__try {
@@ -829,15 +827,15 @@ bool SystemInformationImplementation::DoesCPUSupportCPUID()
__except(1)
{
// Stop the class from trying to use CPUID again!
- CPUIDPresent = false;
return false;
}
+
+ // The cpuid instruction succeeded.
+ return true;
#else
- CPUIDPresent = false;
+ // Assume no cpuid instruction.
+ return false;
#endif
-
- // Return true to indicate support or false to indicate lack.
- return (CPUIDPresent == 0) ? true : false;
}
bool SystemInformationImplementation::RetrieveCPUFeatures()
@@ -2230,13 +2228,19 @@ int SystemInformationImplementation::QueryMemory()
#ifdef __CYGWIN__
return 0;
#elif _WIN32
+#if _MSC_VER < 1300
MEMORYSTATUS ms;
GlobalMemoryStatus(&ms);
-
- unsigned long tv = ms.dwTotalVirtual;
- unsigned long tp = ms.dwTotalPhys;
- unsigned long av = ms.dwAvailVirtual;
- unsigned long ap = ms.dwAvailPhys;
+#define MEM_VAL(value) dw##value
+#else
+ MEMORYSTATUSEX ms;
+ GlobalMemoryStatusEx(&ms);
+#define MEM_VAL(value) ull##value
+#endif
+ unsigned long tv = ms.MEM_VAL(TotalVirtual);
+ unsigned long tp = ms.MEM_VAL(TotalPhys);
+ unsigned long av = ms.MEM_VAL(AvailVirtual);
+ unsigned long ap = ms.MEM_VAL(AvailPhys);
this->TotalVirtualMemory = tv>>10>>10;
this->TotalPhysicalMemory = tp>>10>>10;
this->AvailableVirtualMemory = av>>10>>10;
@@ -2586,13 +2590,13 @@ int SystemInformationImplementation::CPUCount()
// number of logical processors.
unsigned int i = 1;
unsigned char PHY_ID_MASK = 0xFF;
- unsigned char PHY_ID_SHIFT = 0;
+ //unsigned char PHY_ID_SHIFT = 0;
while (i < this->NumberOfLogicalCPU)
{
i *= 2;
PHY_ID_MASK <<= 1;
- PHY_ID_SHIFT++;
+ // PHY_ID_SHIFT++;
}
hCurrentProcessHandle = GetCurrentProcess();
@@ -2922,7 +2926,7 @@ bool SystemInformationImplementation::QueryOSInformation()
OSVERSIONINFOEX osvi;
BOOL bIsWindows64Bit;
BOOL bOsVersionInfoEx;
- char * operatingSystem = new char [256];
+ char operatingSystem[256];
// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
ZeroMemory (&osvi, sizeof (OSVERSIONINFOEX));
@@ -3117,8 +3121,6 @@ bool SystemInformationImplementation::QueryOSInformation()
this->OSRelease = "Unknown";
break;
}
- delete [] operatingSystem;
- operatingSystem = 0;
// Get the hostname
WORD wVersionRequested;