summaryrefslogtreecommitdiffstats
path: root/Tests/MFC
diff options
context:
space:
mode:
authorRich Chiodo <rchiodo@microsoft.com>2016-12-15 20:22:14 (GMT)
committerBrad King <brad.king@kitware.com>2017-07-06 15:28:20 (GMT)
commit6b2bf5756bd01a955606f1963ad44bfde21f173f (patch)
tree4587ebbd9f9eeaaa56004ec56420d5b2f239ef0a /Tests/MFC
parentecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 (diff)
downloadCMake-6b2bf5756bd01a955606f1963ad44bfde21f173f.zip
CMake-6b2bf5756bd01a955606f1963ad44bfde21f173f.tar.gz
CMake-6b2bf5756bd01a955606f1963ad44bfde21f173f.tar.bz2
FindMFC: Check for static MFC variant
Some CMake applications can set /MT without setting CMAKE_MFC_FLAG. This change lets FindMFC work in those situations.
Diffstat (limited to 'Tests/MFC')
-rw-r--r--Tests/MFC/CMakeLists.txt.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/MFC/CMakeLists.txt.in b/Tests/MFC/CMakeLists.txt.in
index e6bfabd..bf98e91 100644
--- a/Tests/MFC/CMakeLists.txt.in
+++ b/Tests/MFC/CMakeLists.txt.in
@@ -45,6 +45,11 @@ set(files
set(CMAKE_MFC_FLAG "@CMAKE_MFC_FLAG_VALUE@")
+FIND_PACKAGE(MFC)
+IF (NOT MFC_FOUND)
+ MESSAGE(FATAL_ERROR "MFC Could not be found during the MFC test")
+ENDIF()
+
if("${CMAKE_MFC_FLAG}" STREQUAL "1")
msvc_link_to_static_crt()
else()