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:
parent
732d8a467a
commit
dcf298008f
|
@ -36,7 +36,7 @@ if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MFC_ATTEMPT_TRY_COMPILE)
|
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")
|
set(CHECK_INCLUDE_FILE_VAR "afxwin.h")
|
||||||
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
|
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
|
||||||
|
|
Loading…
Reference in New Issue