Skip to content

Commit

Permalink
cpack: correct params
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Aug 25, 2022
1 parent 79319c0 commit 34b5e47
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1.1
2.2.1.2
11 changes: 6 additions & 5 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ DESTINATION cmake

# --- CPack

set(CPACK_GENERATOR TZST)
set(CPACK_SOURCE_GENERATOR TZST)
set(CPACK_GENERATOR "TZST")
set(CPACK_SOURCE_GENERATOR "TZST")
set(CPACK_PACKAGE_VENDOR "Netlib")
set(CPACK_PACKAGE_CONTACT "Netlib")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "liblapack-dev")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/package")
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/package)

# not .gitignore as its regex syntax is more advanced than CMake
set(CPACK_SOURCE_IGNORE_FILES ".git/;.git*/;.vscode/;.mypy_cache/;_CPack_Packages/;${CMAKE_BINARY_DIR}/")
set(CPACK_SOURCE_IGNORE_FILES .git/ .github/ .vscode/ .mypy_cache/ _CPack_Packages/
${CMAKE_BINARY_DIR}/ ${PROJECT_BINARY_DIR}/
)

install(FILES ${CPACK_RESOURCE_FILE_README} ${CPACK_RESOURCE_FILE_LICENSE}
DESTINATION share/docs/${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion cmake/libraries.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lapack": {
"git": "https://github.com/scivision/lapack.git",
"tag": "v3.10.1.3"
"tag": "v3.10.1.5"
},
"scalapack_src": {
"tag": "v2.2.1",
Expand Down
14 changes: 4 additions & 10 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(GNUInstallDirs)

message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} Toolchain ${CMAKE_TOOLCHAIN_FILE}")

if(local)
Expand All @@ -22,28 +24,20 @@ if(z IN_LIST arith AND NOT d IN_LIST arith)
list(APPEND arith d)
endif()

include(GNUInstallDirs)

set(CMAKE_TLS_VERIFY true)

set(FETCHCONTENT_UPDATES_DISCONNECTED true)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

# Rpath options necessary for shared library install to work correctly in user projects
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)

# Necessary for shared library with Visual Studio / Windows oneAPI
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# will not take effect without FORCE
# CMAKE_BINARY_DIR for use from FetchContent
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install top-level directory" FORCE)
endif()

# allow CMAKE_PREFIX_PATH with ~ expand
if(CMAKE_PREFIX_PATH)
get_filename_component(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ABSOLUTE)
Expand Down
3 changes: 2 additions & 1 deletion cmake/scalapack_src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ FetchContent_Declare(${PROJECT_NAME}
GIT_REPOSITORY ${url}
GIT_TAG ${tag}
GIT_SHALLOW true
INACTIVITY_TIMEOUT 60
TLS_VERIFY true
GIT_REMOTE_UPDATE_STRATEGY "CHECKOUT"
INACTIVITY_TIMEOUT 60
)

endif()
Expand Down

0 comments on commit 34b5e47

Please sign in to comment.