freemat-4.2-use_llvm.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- libs/libMatC/CMakeLists.txt.orig 2011-11-27 01:27:43.000000000 +0100
  2. +++ libs/libMatC/CMakeLists.txt 2012-01-29 14:39:19.842402326 +0100
  3. @@ -1,10 +1,14 @@
  4. INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} )
  5. +IF( USE_LLVM )
  6. + set(LLVM_SOURCES "CJitFuncClang.cpp")
  7. +endif( USE_LLVM )
  8. +
  9. ADD_LIBRARY( MatC
  10. JITFactory.cpp
  11. CJitFunc.cpp
  12. - CJitFuncClang.cpp
  13. + ${LLVM_SOURCES}
  14. CArray.cpp
  15. )
  16. --- libs/libMatC.orig/JITFactory.cpp 2011-11-27 01:27:43.000000000 +0100
  17. +++ libs/libMatC/JITFactory.cpp 2012-01-29 14:53:17.296686846 +0100
  18. @@ -1,5 +1,7 @@
  19. #include "JITFactory.hpp"
  20. -#include "CJitFuncClang.hpp"
  21. +#ifdef HAVE_LLVM
  22. +# include "CJitFuncClang.hpp"
  23. +#endif
  24. JITFuncBase* JITFactory::GetJITFunc(Interpreter *eval)
  25. {
  26. --- CMakeLists.txt 2014-12-06 21:47:39.685839650 +0100
  27. +++ CMakeLists.txt 2014-12-06 21:48:01.752127927 +0100
  28. @@ -249,9 +249,10 @@
  29. # LLVM Support
  30. ######################################################################
  31. OPTION(USE_LLVM "Build with LLVM support?" ON)
  32. -
  33. -FIND_PACKAGE(LLVM)
  34. -FIND_PACKAGE(CLANG)
  35. +IF(USE_LLVM)
  36. + FIND_PACKAGE(LLVM)
  37. + FIND_PACKAGE(CLANG)
  38. +ENDIF()
  39. IF (LLVM_FOUND AND CLANG_FOUND)
  40. add_definitions(-DHAVE_LLVM)