Main Lemma Repository
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. include(ExternalProject)
  2. project (SuperBuild CXX C)
  3. if (Eigen3_FOUND)
  4. message( STATUS "Eigen was found ${eigen_DIR}" )
  5. else()
  6. message( STATUS "Eigen WAS NOT FOUND ${eigen_DIR}" )
  7. ExternalProject_Add(EIGEN
  8. GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror.git"
  9. UPDATE_COMMAND ""
  10. GIT_TAG "3.3.3" #"default"
  11. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
  12. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  13. #CONFIGURE_COMMAND ""
  14. #BUILD_COMMAND ""
  15. #INSTALL_COMMAND ""
  16. )
  17. #message("Source dir of myExtProj = ${SOURCE_DIR}")
  18. #ExternalProject_Get_property(EIGEN SOURCE_DIR)
  19. #message("Source dir of myExtProj = ${SOURCE_DIR}")
  20. # Are these necessary?
  21. #include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3/")
  22. #set (Eigen3_DIR "${CMAKE_INSTALL_PREFIX}/include/eigen3" CACHE PATH "" FORCE )
  23. #find_package (Eigen3 3.3 NO_MODULE REQUIRED)
  24. #if (eigen3_FOUND)
  25. # message( STATUS "Eigen was found!!!!!!!!!!!!!! ${eigen_DIR}" )
  26. #endif()
  27. endif()
  28. if (yaml-cpp_FOUND)
  29. message( STATUS "YAML-CPP was found ${yaml-cpp_FOUND}" )
  30. #message( STATUS "YAML-CPP PATH ${yaml-cpp_PATH}" )
  31. #message( STATUS "YAML-CPP DIR ${yaml-cpp_DIR}" )
  32. #message( STATUS "YAML-CPP INCLUDE DIR ${yaml-cpp_INCLUDE_DIR}" )
  33. #message( STATUS "YAML-CPP LIBRARIES ${YAML_CPP_LIBRARIES}" )
  34. #message( STATUS "YAML-CPP LIBRARY ${yaml-cpp_LIBRARY}" )
  35. else()
  36. message( STATUS "YAML-CPP WAS NOT FOUND, BUILDING" )
  37. message( STATUS "CMAKE BUILD TYPE ${CMAKE_BUILD_TYPE}" )
  38. message( STATUS "CMAKE CXX COMPILER ${CMAKE_CXX_COMPILER}" )
  39. # if ( ${CMAKE_C_COMPILER} )
  40. # message( STATUS "Compiling Yaml with Cxx COMPILER ${CMAKE_CXX_COMPILER}" )
  41. # ExternalProject_Add(YAML_CPP
  42. # GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  43. # GIT_TAG "yaml-cpp-0.6.1" # "master"
  44. # UPDATE_COMMAND ""
  45. # PATCH_COMMAND ""
  46. # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  47. # CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  48. # -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
  49. # -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
  50. # -DYAML_CPP_BUILD_TESTS=OFF
  51. # -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
  52. # -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  53. # -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
  54. # )
  55. # else()
  56. ExternalProject_Add(YAML_CPP
  57. GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  58. GIT_TAG "master" # "yaml-cpp-0.6.1" # "master"
  59. UPDATE_COMMAND ""
  60. PATCH_COMMAND ""
  61. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  62. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  63. -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
  64. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
  65. -DYAML_CPP_BUILD_TESTS=OFF
  66. -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
  67. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  68. -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
  69. )
  70. # endif()
  71. endif()
  72. if (LEMMA_ENABLE_TESTING)
  73. if (CXXTEST_FOUND)
  74. message( STATUS "CxxTest was found" )
  75. else()
  76. message( STATUS "CxxTest WAS NOT FOUND")
  77. ## CxxTest has no installation per se, it uses python
  78. ExternalProject_Add(CxxTest
  79. GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
  80. GIT_TAG "master"
  81. UPDATE_COMMAND ""
  82. PATCH_COMMAND ""
  83. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest
  84. #CMAKE_ARGS -DCXXTEST_INCLUDE_DIR="${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/"
  85. # -DCXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen"
  86. #-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} /
  87. # -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  88. # -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  89. CONFIGURE_COMMAND ""
  90. BUILD_COMMAND ""
  91. INSTALL_COMMAND ""
  92. #set (CXXTEST_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE PATH) # PATH "" FORCE )
  93. #set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH) # PATH "" FORCE )
  94. )
  95. #enable_testing()
  96. # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues
  97. # with users wanting to specify their own path. However, the SuperBuild needs this, in theory you are only here
  98. # because a usable CXXTEST was not already found on the machine, so likely this is sane to do
  99. #find_package(CxxTest REQUIRED)
  100. endif()
  101. endif()
  102. # tinyxml2, this library is used for XML IO
  103. option( LEMMA_TINYXML_SUPPORT "TinyXML library support for .xml files" OFF)
  104. if ( LEMMA_TINYXML_SUPPORT )
  105. ExternalProject_Add(TINYXML2
  106. GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
  107. GIT_TAG "master"
  108. UPDATE_COMMAND ""
  109. PATCH_COMMAND ""
  110. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tinyxml2
  111. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  112. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  113. )
  114. add_compile_options(-DTINYXMLSUPPORT)
  115. endif()
  116. option( LEMMA_MATIO_SUPPORT "MATIO library support for MATLAB .mat files" OFF)
  117. if ( LEMMA_MATIO_SUPPORT )
  118. add_compile_options(-DHAVE_MATIO)
  119. # matio, this library is used for MATLAB file IO
  120. ExternalProject_ADD(MATIO
  121. GIT_REPOSITORY "git://git.code.sf.net/p/matio/matio"
  122. GIT_TAG "master"
  123. UPDATE_COMMAND ""
  124. PATCH_COMMAND ""
  125. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
  126. #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
  127. CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
  128. BUILD_IN_SOURCE 1
  129. BUILD_COMMAND ${MAKE}
  130. )
  131. endif()
  132. #ExternalProject_Add (Lemma_SB
  133. # DEPENDS ${DEPENDENCIES}
  134. # SOURCE_DIR ${PROJECT_SOURCE_DIR}
  135. # CMAKE_ARGS -DUSE_SUPERBUILD=OFF ${EXTRA_CMAKE_ARGS}
  136. # INSTALL_COMMAND ""
  137. # BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/blah)
  138. # vim: set tabstop=4 shiftwidth=4 expandtab: