summaryrefslogtreecommitdiffstats
path: root/Tests/MFC
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MFC')
-rw-r--r--Tests/MFC/CMakeLists.txt15
-rw-r--r--Tests/MFC/ValidateBuild.cmake.in12
-rw-r--r--Tests/MFC/mfc1/stdafx.h15
3 files changed, 38 insertions, 4 deletions
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