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.
This commit is contained in:
Brad King 2015-03-26 09:00:32 -04:00
parent 732d8a467a
commit dcf298008f

View File

@ -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)