PageRenderTime 43ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/cmake/Blitz++.cmake

https://gitlab.com/mmoelle1/UETLI
CMake | 57 lines | 26 code | 10 blank | 21 comment | 3 complexity | 258fcd670ef0acfcb6911812d0e1418e MD5 | raw file
  1. ########################################################################
  2. # Blitz++.txt
  3. #
  4. # Author: Matthias Moller
  5. # Copyright (C) 2015 - 2017 by the UETLI authors
  6. #
  7. # This file is part of the UETLI library
  8. #
  9. # This Source Code Form is subject to the terms of the Mozilla Public
  10. # License, v. 2.0. If a copy of the MPL was not distributed with this
  11. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  12. #
  13. ########################################################################
  14. ########################################################################
  15. # Blitz++
  16. ########################################################################
  17. if (UETLI_BUILTIN_BLITZ)
  18. include(DownloadProject)
  19. download_project(
  20. PROJ Blitz
  21. URL http://downloads.sourceforge.net/project/blitz/blitz/Blitz%2B%2B%200.10/blitz-0.10.tar.gz
  22. URL_MD5 66268b92bda923735f2e3afc87dcb58a
  23. TIMEOUT 180
  24. PREFIX ${CMAKE_BINARY_DIR}/external/Blitz++
  25. ${UPDATE_DISCONNECTED_IF_AVAILABLE}
  26. )
  27. # Add Blitz++ definitions
  28. add_definitions(-DBZ_HAVE_CONFIG_H -DBZ_HAVE_IEEE_MATH -DBZ_HAVE_SYSTEM_V_MATH -DBZ_HAVE_COMPLEX_FCNS)
  29. # Add include directory
  30. include_directories("${Blitz_SOURCE_DIR}")
  31. else()
  32. # Add include directory
  33. if(BLITZ++_INCLUDE_PATH)
  34. include_directories(${BLITZ_INCLUDE_PATH})
  35. else()
  36. message(WARNING "Variable BLITZ++_INCLUDE_PATH is not defined. UETLI might be unable to find Blitz++ include files.")
  37. endif()
  38. # Add libraries
  39. if(BLITZ++_LIBRARIES)
  40. list(APPEND UETLI_C_TARGET_LINK_LIBRARIES ${BLITZ_LIBRARIES})
  41. list(APPEND UETLI_CXX_TARGET_LINK_LIBRARIES ${BLITZ_LIBRARIES})
  42. else()
  43. message(FATAL_ERROR "Variable BLITZ++_LIBRARIES must point to the Blitz++ libraries.")
  44. endif()
  45. endif()
  46. # Enable Blitz++ support
  47. add_definitions(-DSUPPORT_BLITZ)