3D EM based on Schur decomposition
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

CMakeLists.txt 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Configure EMSchur3D
  2. set(EMSCHUR3D_VERSION_MAJOR "0")
  3. set(EMSCHUR3D_VERSION_MINOR "0")
  4. set(EMSCHUR3D_VERSION_PATCH "1")
  5. set(EMSCHUR3D_VERSION "\"${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}\"")
  6. set(EMSCHUR3D_VERSION_NOQUOTES "${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}")
  7. option ( LEMMA_MODULE_EMSCHUR3D TRUE )
  8. find_package( SuperLU )
  9. if (SUPERLU_FOUND)
  10. message( STATUS "SuperLU was found" )
  11. add_compile_options(-DHAVE_SUPERLU)
  12. INCLUDE_DIRECTORIES(${SUPERLU_INCLUDES})
  13. endif()
  14. find_package( PaSTiX )
  15. if ( PASTIX_FOUND )
  16. message( STATUS "PaSTiX was found" )
  17. add_compile_options(-DHAVE_PASTIX)
  18. INCLUDE_DIRECTORIES(${PASTIX_INCLUDES})
  19. endif()
  20. find_package( Umfpack )
  21. if ( UMFPACK_FOUND )
  22. message( STATUS "Umfpack was found" )
  23. add_compile_options(-DHAVE_UMFPACK)
  24. INCLUDE_DIRECTORIES(${UMFPACK_INCLUDES})
  25. endif()
  26. if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT OR LEMMA_VTK8_SUPPORT AND LEMMA_MODULE_EMSCHUR3D )
  27. configure_file (
  28. "${CMAKE_CURRENT_SOURCE_DIR}/config/EMSchur3DConfig.h.in"
  29. "${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h"
  30. )
  31. install ( FILES ${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ )
  32. add_subdirectory("src")
  33. add_library( emschur3d ${EMSCHUR3DSOURCE} )
  34. target_include_directories( emschur3d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
  35. set_target_properties(emschur3d PROPERTIES
  36. VERSION "${EMSCHUR3D_VERSION_NOQUOTES}"
  37. SOVERSION "${EMSCHUR3D_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
  38. PROJECT_LABEL "EMSCHUR3D ${LABEL_SUFFIX}"
  39. CXX_STANDARD_14
  40. CXX_STANDARD_REQUIRED_ON
  41. )
  42. # Linking
  43. target_link_libraries(emschur3d "lemmacore" "fdem1d" )
  44. # Linking
  45. target_link_libraries(emschur3d ${VTK_LIBRARIES})
  46. if ( SUPERLU_FOUND )
  47. target_link_libraries(emschur3d ${SUPERLU_LIBRARIES})
  48. endif()
  49. if ( PASTIX_FOUND )
  50. target_link_libraries(emschur3d ${PASTIX_LIBRARIES})
  51. target_link_libraries(emschur3d "blas" "metis" "scotch" "scotchmetis" "scotcherr" "scotcherrexit" "hwloc")
  52. endif()
  53. if ( UMFPACK_FOUND )
  54. target_link_libraries(emschur3d ${UMFPACK_LIBRARIES})
  55. endif()
  56. # Testing
  57. if (LEMMA_ENABLE_TESTING)
  58. add_subdirectory(testing)
  59. endif()
  60. # Install
  61. install ( TARGETS emschur3d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  62. install ( FILES include/EMSchur3D DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  63. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h")
  64. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ FILES_MATCHING PATTERN "FDEM1D")
  65. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/FDEM1D FILES_MATCHING PATTERN "*.h")
  66. # Examples
  67. if ( LEMMA_BUILD_EXAMPLES)
  68. add_subdirectory(examples)
  69. endif()
  70. else()
  71. if ( LEMMA_MODULE_EMSCHUR3D )
  72. message ( FATAL_ERROR
  73. "EMSChur3D requires VTK 6, 7, or 8"
  74. )
  75. endif()
  76. endif()