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 5.2KB

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