Skip to content

Commit

Permalink
don't override _external cache var
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 8, 2021
1 parent edcbc93 commit 08adc76
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 43 deletions.
4 changes: 1 addition & 3 deletions PORD/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
add_library(pord
graph.c gbipart.c gbisect.c ddcreate.c ddbisect.c nestdiss.c multisector.c gelim.c bucket.c tree.c symbfac.c interface.c sort.c minpriority.c
)
target_include_directories(pord
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include
INTERFACE
target_include_directories(pord PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
$<INSTALL_INTERFACE:include>
)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.1.6
5.4.1.7
3 changes: 2 additions & 1 deletion cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ COMPATIBILITY SameMinorVersion

install(EXPORT ${PROJECT_NAME}-targets
NAMESPACE ${PROJECT_NAME}::
DESTINATION cmake)
DESTINATION cmake
)

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}-config.cmake
Expand Down
4 changes: 2 additions & 2 deletions cmake/libraries.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"lapack": {
"git": "https://github.com/scivision/lapack.git",
"tag": "v3.10.0.2"
"tag": "v3.10.0.3"
},
"scalapack": {
"git": "https://github.com/scivision/scalapack.git",
"tag": "v2.1.0.28"
"tag": "v2.1.0.29"
},

"mumps": {
Expand Down
20 changes: 10 additions & 10 deletions cmake/mumps_patch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ if(WIN32)
find_program(WSL NAMES wsl REQUIRED)

execute_process(COMMAND ${WSL} wslpath ${mumps_orig}
TIMEOUT 15
OUTPUT_VARIABLE mumps_orig_path
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
TIMEOUT 15
OUTPUT_VARIABLE mumps_orig_path
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(COMMAND ${WSL} wslpath ${mumps_patch}
TIMEOUT 15
OUTPUT_VARIABLE mumps_patch_path
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
TIMEOUT 15
OUTPUT_VARIABLE mumps_patch_path
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# we don't check for error as in case build got interrupted before mumps_patch
# cache set but after patch applied.
# the patch commmand would error on next build due to already applied patch.
# we didn't want to apply --force option as that's too aggressive.
execute_process(COMMAND ${WSL} patch --batch --forward ${mumps_orig_path} --input=${mumps_patch_path}
TIMEOUT 15
TIMEOUT 15
)
else()
find_program(PATCH NAMES patch REQUIRED)
execute_process(COMMAND ${PATCH} --batch --forward ${mumps_orig} --input=${mumps_patch}
TIMEOUT 15
TIMEOUT 15
)
endif()

Expand Down
3 changes: 0 additions & 3 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
option(autobuild "auto-build Lapack and/or Scalapack if missing or broken" true)
option(lapack_external "build Lapack instead of finding")
option(scalapack_external "build ScaLapack instead of finding")
option(mumps_external "build MUMPS instead of finding")

option(dev "developer mode")
option(parallel "parallel or sequential (non-MPI, non-Scalapack)" ON)
Expand Down
16 changes: 7 additions & 9 deletions libseq/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
add_library(mpiseq elapse.c mpi.f mpic.c)
target_include_directories(mpiseq
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_include_directories(mpiseq PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/include>"
$<INSTALL_INTERFACE:include>
)
set_target_properties(mpiseq PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
EXPORT_NAME MPISEQ)
Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
EXPORT_NAME MPISEQ
)

# target for FetchContent
# this must NOT be an ALIAS or linking in other packages breaks.
Expand Down
25 changes: 11 additions & 14 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)

add_library(mumps_common ${COMM_SRC} ${COMM_OTHER_SRC})
target_link_libraries(mumps_common PRIVATE ${ORDERING_LIBS} ${NUMERIC_LIBS})
target_include_directories(mumps_common
PRIVATE ${mumps_SOURCE_DIR}/include
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
target_include_directories(mumps_common PUBLIC
$<BUILD_INTERFACE:${mumps_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
Expand Down Expand Up @@ -118,21 +115,21 @@ target_compile_definitions(${a}mumps PRIVATE MUMPS_ARITH=MUMPS_ARITH_${a} ${ORDE
# if(WIN32)
# target_compile_definitions(${a}mumps PRIVATE MUMPS_WIN32)
# endif()
target_include_directories(${a}mumps PRIVATE ${mumps_SOURCE_DIR}/include
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${mumps_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_include_directories(${a}mumps PUBLIC
$<BUILD_INTERFACE:${mumps_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${a}mumps PRIVATE mumps_common ${ORDERING_LIBS} ${NUMERIC_LIBS})

string(TOUPPER ${a} aup)

set_target_properties(${a}mumps PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
EXPORT_NAME ${aup}MUMPS
VERSION ${MUMPS_VERSION})
Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
EXPORT_NAME ${aup}MUMPS
VERSION ${MUMPS_VERSION}
)

install(TARGETS ${a}mumps EXPORT ${PROJECT_NAME}-targets)

Expand Down

0 comments on commit 08adc76

Please sign in to comment.