diff options
author | David Cole <david.cole@kitware.com> | 2011-11-15 19:38:56 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-11-15 19:38:56 (GMT) |
commit | f1197ff0dac1ab02b7515d79a2c46075538360c5 (patch) | |
tree | 00d94393f67209ce8d5b58500d9b16aa4db194bf /Tests | |
parent | 608d05b469a446aeb85c0d3374ccf2a3f397292b (diff) | |
parent | 537020f9581d36c436d18e30f98d58f0ef5924cc (diff) | |
download | CMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.zip CMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.tar.gz CMake-f1197ff0dac1ab02b7515d79a2c46075538360c5.tar.bz2 |
Merge topic 'fix-11213-vs10-mfc-support'
537020f Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
51f442e VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
d85ab7a Tests: Add environment logging to the MFC test (#11213)
011694c VS10: Use expected values for UseOfMfc (#11213)
a2e6d24 Tests: Fix MFC test to work with VS 10 and later (#11213)
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/ExternalProject/Example/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/MFC/CMakeLists.txt | 15 | ||||
-rw-r--r-- | Tests/MFC/ValidateBuild.cmake.in | 12 | ||||
-rw-r--r-- | Tests/MFC/mfc1/stdafx.h | 15 |
4 files changed, 39 insertions, 5 deletions
diff --git a/Tests/ExternalProject/Example/CMakeLists.txt b/Tests/ExternalProject/Example/CMakeLists.txt index 2cadd7d..69ebaaf 100644 --- a/Tests/ExternalProject/Example/CMakeLists.txt +++ b/Tests/ExternalProject/Example/CMakeLists.txt @@ -6,6 +6,6 @@ include(ExternalProject) ExternalProject_Add( cmake281 URL http://www.cmake.org/files/v2.8/cmake-2.8.1.tar.gz - CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=<INSTALL_DIR> + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> BUILD_COMMAND "" ) diff --git a/Tests/MFC/CMakeLists.txt b/Tests/MFC/CMakeLists.txt index ea5c41d..62ff749 100644 --- a/Tests/MFC/CMakeLists.txt +++ b/Tests/MFC/CMakeLists.txt @@ -17,7 +17,7 @@ ExternalProject_Add(mfcShared PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt <SOURCE_DIR>/CMakeLists.txt - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) @@ -33,7 +33,7 @@ ExternalProject_Add(mfcStatic PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt <SOURCE_DIR>/CMakeLists.txt - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) @@ -48,3 +48,14 @@ add_test( COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake" ) + + +add_test( + NAME environment + COMMAND ${CMAKE_COMMAND} -E environment + ) + + +message(STATUS "===== environment =====") +execute_process(COMMAND ${CMAKE_COMMAND} -E environment) +message(STATUS "===== /environment =====") diff --git a/Tests/MFC/ValidateBuild.cmake.in b/Tests/MFC/ValidateBuild.cmake.in index 68de549..ed923f5 100644 --- a/Tests/MFC/ValidateBuild.cmake.in +++ b/Tests/MFC/ValidateBuild.cmake.in @@ -31,9 +31,17 @@ message(STATUS "===== mfcShared install tree =====") file(GLOB_RECURSE files "${binary_dir}/mfcShared-prefix/bin/*.*") message(STATUS "mfcShared files='${files}'") list(LENGTH files len) -if(len LESS 3) + +set(msvc6 "@MSVC60@") +if("${msvc6}" STREQUAL "1") + set(expected_minimum_file_count 1) +else() + set(expected_minimum_file_count 3) +endif() + +if(len LESS ${expected_minimum_file_count}) message(FATAL_ERROR - "len='${len}' is less than '3' (count of shared 'bin' files)") + "len='${len}' is less than '${expected_minimum_file_count}' (count of shared 'bin' files)") endif() foreach(f ${files}) message(STATUS "file '${f}'") diff --git a/Tests/MFC/mfc1/stdafx.h b/Tests/MFC/mfc1/stdafx.h index fb9dfb3..35a678d 100644 --- a/Tests/MFC/mfc1/stdafx.h +++ b/Tests/MFC/mfc1/stdafx.h @@ -8,23 +8,38 @@ #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif +// See http://msdn.microsoft.com/en-us/library/6sehtctf.aspx for more info +// on WINVER and _WIN32_WINNT + // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. +#if _MSC_VER < 1600 #define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#else +#define WINVER 0x0501 // Target Windows XP and later with VS 10 and later +#endif #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. +#if _MSC_VER < 1600 #define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#else +#define _WIN32_WINNT 0x0501 // Target Windows XP and later with VS 10 and later +#endif #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. +#if _MSC_VER < 1600 #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif +#endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. +#if _MSC_VER < 1600 #define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. #endif +#endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit |