Lemma is an Electromagnetics API
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

SuperBuild.cmake 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. project (SuperBuild CXX C)
  2. include(ExternalProject)
  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.7" #"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. endif()
  18. if (yaml-cpp_FOUND)
  19. message( STATUS "YAML-CPP was found ${yaml-cpp_FOUND}" )
  20. else()
  21. message( STATUS "YAML-CPP WAS NOT FOUND, BUILDING" )
  22. ExternalProject_Add(YAML_CPP
  23. GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
  24. GIT_TAG "master" # "yaml-cpp-0.6.2" # "master"
  25. UPDATE_COMMAND ""
  26. PATCH_COMMAND ""
  27. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
  28. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  29. -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
  30. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
  31. -DYAML_CPP_BUILD_TESTS=OFF
  32. -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
  33. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  34. -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
  35. )
  36. endif()
  37. if ( LEMMA_VTK8_SUPPORT )
  38. if ( NOT VTK_FOUND OR VTK_VERSION VERSION_GREATER "8.2.0" )
  39. message( STATUS "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
  40. message( STATUS "External build of VTK 8 has been added, this may take some time to build." )
  41. ExternalProject_Add(VTK8
  42. GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"
  43. GIT_TAG "v8.2.0"
  44. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/vtk8
  45. CMAKE_ARGS
  46. -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  47. -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  48. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} /
  49. -DBUILD_SHARED_LIBS:BOOL=ON /
  50. -DBUILD_EXAMPLES:BOOL=OFF /
  51. -DBUILD_TESTING:BOOL=OFF /
  52. -DVTK_Group_Web:BOOL=OFF /
  53. -DModule_vtkImagingMath:BOOL=ON /
  54. LOG_DOWNLOAD 0 /
  55. LOG_UPDATE 0
  56. )
  57. endif()
  58. if (VTK_FOUND AND VTK_VERSION VERSION_LESS_EQUAL "8.20.0")
  59. #message(STATUS "VTK 8 was found! " ${VTK_VERSION}, ${VTK_USE_FILE} )
  60. message(STATUS "VTK 8.2 was found! " ${VTK_VERSION}, ${VTK_MINOR_VERSION}, ${VTK_USE_FILE} )
  61. set(volumeRenderer volumerenderer.cxx)
  62. #include(${VTK_USE_FILE})
  63. add_definitions(-DLEMMAUSEVTK)
  64. else()
  65. endif()
  66. endif()
  67. if (LEMMA_ENABLE_TESTING)
  68. if (CXXTEST_FOUND)
  69. message( STATUS "CxxTest was found" )
  70. else()
  71. message( STATUS "CxxTest WAS NOT FOUND")
  72. ## CxxTest has no installation per se, it uses python
  73. ExternalProject_Add(CxxTest
  74. GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
  75. GIT_TAG "master"
  76. UPDATE_COMMAND ""
  77. PATCH_COMMAND ""
  78. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest
  79. #CMAKE_ARGS -DCXXTEST_INCLUDE_DIR="${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/"
  80. # -DCXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen"
  81. #-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} /
  82. # -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  83. # -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  84. CONFIGURE_COMMAND ""
  85. BUILD_COMMAND ""
  86. INSTALL_COMMAND ""
  87. #set (CXXTEST_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/" CACHE PATH) # PATH "" FORCE )
  88. #set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" CACHE PATH) # PATH "" FORCE )
  89. )
  90. #enable_testing()
  91. # The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues
  92. # with users wanting to specify their own path. However, the SuperBuild needs this, in theory you are only here
  93. # because a usable CXXTEST was not already found on the machine, so likely this is sane to do
  94. #find_package(CxxTest REQUIRED)
  95. endif()
  96. endif()
  97. # tinyxml2, this library is used for XML IO
  98. option( LEMMA_TINYXML_SUPPORT "TinyXML library support for .xml files" OFF)
  99. if ( LEMMA_TINYXML_SUPPORT )
  100. ExternalProject_Add(TINYXML2
  101. GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
  102. GIT_TAG "master"
  103. UPDATE_COMMAND ""
  104. PATCH_COMMAND ""
  105. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tinyxml2
  106. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
  107. -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  108. )
  109. add_compile_options(-DTINYXMLSUPPORT)
  110. endif()
  111. option( LEMMA_MATIO_SUPPORT "MATIO library support for MATLAB .mat files" OFF)
  112. if ( LEMMA_MATIO_SUPPORT )
  113. add_compile_options(-DHAVE_MATIO)
  114. # matio, this library is used for MATLAB file IO
  115. ExternalProject_ADD(MATIO
  116. GIT_REPOSITORY "git://git.code.sf.net/p/matio/matio"
  117. GIT_TAG "master"
  118. UPDATE_COMMAND ""
  119. PATCH_COMMAND ""
  120. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
  121. #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
  122. CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
  123. BUILD_IN_SOURCE 1
  124. BUILD_COMMAND ${MAKE}
  125. )
  126. endif()
  127. # vim: set tabstop=4 shiftwidth=4 expandtab: