Main Lemma Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SuperBuild.cmake 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. include(ExternalProject)
  2. if (eigen3_FOUND)
  3. message( STATUS "Eigen was found ${eigen_DIR}" )
  4. else()
  5. message( STATUS "Eigen WAS NOT FOUND ${eigen_DIR}" )
  6. ExternalProject_Add(EIGEN
  7. GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror.git"
  8. UPDATE_COMMAND ""
  9. GIT_TAG "3.3.3" #"default"
  10. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
  11. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  12. #CONFIGURE_COMMAND ""
  13. #BUILD_COMMAND ""
  14. )
  15. # Are these necessary?
  16. #include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3/")
  17. #set (Eigen3_DIR "${CMAKE_INSTALL_PREFIX}/include/eigen3" CACHE PATH "" FORCE )
  18. #find_package (Eigen3 3.3 NO_MODULE REQUIRED)
  19. #if (eigen3_FOUND)
  20. # message( STATUS "Eigen was found!!!!!!!!!!!!!! ${eigen_DIR}" )
  21. #endif()
  22. endif()
  23. if (yaml-cpp_FOUND)
  24. message( STATUS "YAML-CPP was found ${yaml-cpp_FOUND}" )
  25. #message( STATUS "YAML-CPP PATH ${yaml-cpp_PATH}" )
  26. #message( STATUS "YAML-CPP DIR ${yaml-cpp_DIR}" )
  27. #message( STATUS "YAML-CPP INCLUDE DIR ${yaml-cpp_INCLUDE_DIR}" )
  28. #message( STATUS "YAML-CPP LIBRARIES ${YAML_CPP_LIBRARIES}" )
  29. #message( STATUS "YAML-CPP LIBRARY ${yaml-cpp_LIBRARY}" )
  30. else()
  31. message( STATUS "YAML-CPP WAS NOT FOUND" )
  32. ExternalProject_Add(YAML_CPP
  33. GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  34. GIT_TAG "yaml-cpp-0.6.1" # "master"
  35. UPDATE_COMMAND ""
  36. PATCH_COMMAND ""
  37. INSTALL_COMMAND ""
  38. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  39. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  40. -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
  41. -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
  42. -DYAML_CPP_BUILD_TESTS=OFF
  43. )
  44. # is this necessary?
  45. #include_directories ("${CMAKE_INSTALL_PREFIX}/include/yaml-cpp")
  46. endif()
  47. if (LEMMA_ENABLE_TESTING)
  48. if (CXXTEST_FOUND)
  49. message( STATUS "CxxTest was found" )
  50. else()
  51. message( STATUS "CxxTest WAS NOT FOUND")
  52. ExternalProject_Add(CxxTest
  53. GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
  54. GIT_TAG "master"
  55. UPDATE_COMMAND ""
  56. PATCH_COMMAND ""
  57. CONFIGURE_COMMAND ""
  58. BUILD_COMMAND ""
  59. INSTALL_COMMAND ""
  60. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest
  61. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} /
  62. -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  63. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  64. )
  65. #enable_testing()
  66. # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues
  67. # with users wanting to specify their own path. However, the SuperBuild needs this, in theory you are only here
  68. # because a usable CXXTEST was not already found on the machine, so likely this is sane to do
  69. set (CXXTEST_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE PATH "" FORCE )
  70. set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH "" FORCE )
  71. find_package(CxxTest REQUIRED)
  72. endif()
  73. endif()
  74. # tinyxml2, this library is used for XML IO
  75. option( LEMMA_TINYXML_SUPPORT "TinyXML library support for .xml files" OFF)
  76. if ( LEMMA_TINYXML_SUPPORT )
  77. ExternalProject_Add(TINYXML2
  78. GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
  79. GIT_TAG "master"
  80. UPDATE_COMMAND ""
  81. PATCH_COMMAND ""
  82. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tinyxml2
  83. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  84. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  85. )
  86. add_compile_options(-DTINYXMLSUPPORT)
  87. endif()
  88. option( LEMMA_MATIO_SUPPORT "MATIO library support for MATLAB .mat files" OFF)
  89. if ( LEMMA_MATIO_SUPPORT )
  90. add_compile_options(-DHAVE_MATIO)
  91. # matio, this library is used for MATLAB file IO
  92. ExternalProject_ADD(MATIO
  93. GIT_REPOSITORY "git://git.code.sf.net/p/matio/matio"
  94. GIT_TAG "master"
  95. UPDATE_COMMAND ""
  96. PATCH_COMMAND ""
  97. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
  98. #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
  99. CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
  100. BUILD_IN_SOURCE 1
  101. BUILD_COMMAND ${MAKE}
  102. )
  103. endif()
  104. # vim: set tabstop=4 shiftwidth=4 expandtab: