Assert on duplicate registration. Don't depend on function pointer equality.
[oota-llvm.git] / cmake / config-ix.cmake
index 7f338d8d018f5a89aa0d9b6bdc7acd5d10efe310..dc991a23be075ad3554717c0218bbb594d158775 100755 (executable)
@@ -308,12 +308,12 @@ if (LIBXML2_FOUND)
   # be checked by CMake, breaking native compilation.
   # Since this is only pertinent to cross-compilations, and there's no way CMake
   # can check for every foreign library on every OS, we add the dep and warn the dev.
-  if ( DEFINED CMAKE_CROSSCOMPILING )
+  if ( CMAKE_CROSSCOMPILING )
     if (NOT PC_LIBXML_VERSION VERSION_LESS "2.8.0")
       message(STATUS "Adding LZMA as a dep to XML2 for cross-compilation, make sure liblzma.a is available.")
       set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} "-llzma")
     endif ()
-  endif ( CMAKE_CROSSCOMPILING )
+  endif ()
 endif ()
 
 include(CheckCXXCompilerFlag)
@@ -415,6 +415,7 @@ endif ()
 if( MINGW )
   set(HAVE_LIBIMAGEHLP 1)
   set(HAVE_LIBPSAPI 1)
+  set(HAVE_LIBSHELL32 1)
   # TODO: Check existence of libraries.
   #   include(CheckLibraryExists)
   #   CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)