summaryrefslogtreecommitdiffstats
path: root/Modules/FindMFC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-26 13:00:32 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-26 13:02:05 (GMT)
commitdcf298008f60fa00ddcb225b7a474317ad4d317f (patch)
tree7e9e066857138917b7e71c1ee835e92049181fc6 /Modules/FindMFC.cmake
parent732d8a467ab8a295b1bbf580f865980f8a1a9b29 (diff)
downloadCMake-dcf298008f60fa00ddcb225b7a474317ad4d317f.zip
CMake-dcf298008f60fa00ddcb225b7a474317ad4d317f.tar.gz
CMake-dcf298008f60fa00ddcb225b7a474317ad4d317f.tar.bz2
FindMFC: Use if(DEFINED) to simplify condition (#15477)
Replace an old hack of the form 'if("${VAR}" MATCHES "^${VAR}$")' with the much simpler 'if(NOT DEFINED ${VAR})'. This was exposed by a CMP0054 warning.
Diffstat (limited to 'Modules/FindMFC.cmake')
-rw-r--r--Modules/FindMFC.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake
index 261ebdb..3547628 100644
--- a/Modules/FindMFC.cmake
+++ b/Modules/FindMFC.cmake
@@ -36,7 +36,7 @@ if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
endif()
if(MFC_ATTEMPT_TRY_COMPILE)
- if("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
+ if(NOT DEFINED MFC_HAVE_MFC)
set(CHECK_INCLUDE_FILE_VAR "afxwin.h")
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)