-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add -Dlocal= option to allow offline install
- Loading branch information
Showing
4 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.2.1.0 | ||
2.2.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
include(FetchContent) | ||
|
||
string(TOLOWER ${PROJECT_NAME}_src name) | ||
|
||
file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json) | ||
|
||
if(local) | ||
|
||
find_file(${name}_archive | ||
NAMES ${name}.tar.bz2 ${name}.tar.gz ${name}.tar ${name}.zip ${name}.zstd ${name}.tar.xz | ||
HINTS ${local} | ||
NO_DEFAULT_PATH | ||
) | ||
|
||
if(NOT ${name}_archive) | ||
message(FATAL_ERROR "Archive file for ${name} does not exist under ${local}") | ||
endif() | ||
|
||
message(STATUS "${name}: using source archive ${${name}_archive}") | ||
|
||
FetchContent_Declare(${PROJECT_NAME} | ||
URL ${${name}_archive} | ||
) | ||
|
||
else() | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.19) | ||
include(${CMAKE_CURRENT_LIST_DIR}/Modules/JsonParse.cmake) | ||
sbeParseJson(meta json) | ||
set(scalapack_url ${meta.scalapack.url}) | ||
set(scalapack_tag ${meta.scalapack.tag}) | ||
set(url ${meta.${name}.url}) | ||
set(tag ${meta.${name}.tag}) | ||
else() | ||
string(JSON scalapack_url GET ${json} scalapack url) | ||
string(JSON scalapack_tag GET ${json} scalapack tag) | ||
string(JSON url GET ${json} ${name} url) | ||
string(JSON tag GET ${json} ${name} tag) | ||
endif() | ||
|
||
set(FETCHCONTENT_QUIET no) | ||
|
||
FetchContent_Declare(SCALAPACK | ||
GIT_REPOSITORY ${scalapack_url} | ||
GIT_TAG ${scalapack_tag} | ||
FetchContent_Declare(${PROJECT_NAME} | ||
GIT_REPOSITORY ${url} | ||
GIT_TAG ${tag} | ||
GIT_SHALLOW true | ||
INACTIVITY_TIMEOUT 60 | ||
TLS_VERIFY true | ||
) | ||
|
||
FetchContent_Populate(SCALAPACK) | ||
endif() | ||
|
||
FetchContent_Populate(${PROJECT_NAME}) |