Skip to content

Commit

Permalink
COMP: Remove LAPACK and Fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
allemangD committed Feb 8, 2023
1 parent 4adf068 commit 806e744
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 251 deletions.
13 changes: 0 additions & 13 deletions CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,3 @@ else()
file(DOWNLOAD ${url} ${dest_file} EXPECTED_HASH SHA256=${expected_hash})
endif()
endif()

# Download FindFortran.cmake
set(dest_file "${CMAKE_CURRENT_BINARY_DIR}/FindFortran.cmake")
set(expected_hash "fcb5e593ae9aea43697a7f02d6a0e08707b52ed71430ee7837ff11d5ed48e40f")
set(url "https://raw.githubusercontent.com/scikit-build/cmake-FindFortran/v0.5.3/FindFortran.cmake")
if(NOT EXISTS ${dest_file})
file(DOWNLOAD ${url} ${dest_file} EXPECTED_HASH SHA256=${expected_hash})
else()
file(SHA256 ${dest_file} current_hash)
if(NOT ${current_hash} STREQUAL ${expected_hash})
file(DOWNLOAD ${url} ${dest_file} EXPECTED_HASH SHA256=${expected_hash})
endif()
endif()
1 change: 0 additions & 1 deletion Libraries/Shape/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ target_link_libraries(ShapeAlgorithms
PRIVATE
SparseMatrixLib
VTK::eigen
${LAPACKE_LIBRARIES}
)

if(${LOCAL_PROJECT_NAME}_INSTALL_DEVELOPMENT)
Expand Down
19 changes: 0 additions & 19 deletions SPHARM-PDM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ include(${SlicerExecutionModel_USE_FILE})
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

find_package(LAPACKE CONFIG REQUIRED)

# Set Fortran_<id>_RUNTIME_LIBRARIES and CMAKE_Fortran_IMPLICIT_LINK_*
set(Fortran_COMPILER_ID "${LAPACKE_Fortran_COMPILER_ID}")
find_package(Fortran REQUIRED)

# --------------------------------------------------------------------------
# Bundle extensions adding source directories.
# --------------------------------------------------------------------------
Expand Down Expand Up @@ -89,26 +83,13 @@ endif()
# Packaging
#-----------------------------------------------------------------------------
set(EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS)
list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${LAPACK_DIR};LAPACK;RuntimeLibraries;/")
if(NOT Slicer_SOURCE_DIR)
foreach(extension_item IN LISTS Slicer_BUNDLED_EXTENSION_NAMES)
list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS ${${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS})
endforeach()
endif()
set(${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS "${EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS}" CACHE STRING "List of external projects to install" FORCE)

# Install fortran runtime libraries
if(DEFINED Slicer_DIR)
if(NOT APPLE)
Fortran_InstallLibrary(
FILES ${Fortran_${LAPACKE_Fortran_COMPILER_ID}_RUNTIME_LIBRARIES}
DESTINATION ${Slicer_INSTALL_THIRDPARTY_LIB_DIR} COMPONENT RuntimeLibraries
)
else()
set(${EXTENSION_NAME}_FIXUP_BUNDLE_LIBRARY_DIRECTORIES ${Fortran_${LAPACKE_Fortran_COMPILER_ID}_RUNTIME_DIRECTORIES} CACHE STRING "List of fixup bundle library directories" FORCE)
endif()
endif()

#-----------------------------------------------------------------------------
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};Runtime;/")
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};RuntimeLibraries;/")
Expand Down
13 changes: 1 addition & 12 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ set(Slicer_USE_SYSTEM_SlicerExecutionModel ${USE_SYSTEM_SlicerExecutionModel})
option(USE_SYSTEM_VTK "Build using an externally defined version of VTK" OFF)
set(Slicer_USE_SYSTEM_VTK ${USE_SYSTEM_VTK})

option(USE_SYSTEM_LAPACK "Build using an externally defined version of LAPACK" OFF)
set(Slicer_USE_SYSTEM_LAPACK ${USE_SYSTEM_LAPACK})

#-----------------------------------------------------------------------------
# Configure "external" projects
#-----------------------------------------------------------------------------
set(LAPACK_INSTALL_RUNTIME_DIR ${${LOCAL_PROJECT_NAME}_INSTALL_RUNTIME_DESTINATION})
set(LAPACK_INSTALL_LIBRARY_DIR ${${LOCAL_PROJECT_NAME}_INSTALL_LIBRARY_DESTINATION})

#-----------------------------------------------------------------------------
# Add remote extension source directories
#-----------------------------------------------------------------------------
Expand All @@ -50,9 +41,7 @@ list(APPEND EXTERNAL_PROJECT_ADDITIONAL_DIRS ${${extension_name}_SOURCE_DIR}/Sup
# Project dependencies
#------------------------------------------------------------------------------

set(${LOCAL_PROJECT_NAME}_DEPENDS
LAPACK
)
set(${LOCAL_PROJECT_NAME}_DEPENDS)
if(NOT SPHARM-PDM_BUILD_SLICER_EXTENSION)
list(APPEND ${LOCAL_PROJECT_NAME}_DEPENDS
ITK
Expand Down
206 changes: 0 additions & 206 deletions SuperBuild/External_LAPACK.cmake

This file was deleted.

0 comments on commit 806e744

Please sign in to comment.