summaryrefslogtreecommitdiff
path: root/Tests/MFC
diff options
context:
space:
mode:
authorRich Chiodo <rchiodo@microsoft.com>2016-12-15 12:22:14 -0800
committerBrad King <brad.king@kitware.com>2017-07-06 11:28:20 -0400
commit6b2bf5756bd01a955606f1963ad44bfde21f173f (patch)
tree4587ebbd9f9eeaaa56004ec56420d5b2f239ef0a /Tests/MFC
parentecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 (diff)
downloadcmake-6b2bf5756bd01a955606f1963ad44bfde21f173f.tar.gz
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 e6bfabd333..bf98e918ce 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()