Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
spm
Commits
97fdacc3
Commit
97fdacc3
authored
6 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
update the cmake module
parent
a72016b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Hotfix/updates from pastix
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+34
-19
34 additions, 19 deletions
CMakeLists.txt
cmake_modules/morse_cmake
+1
-1
1 addition, 1 deletion
cmake_modules/morse_cmake
include/spm_config.h.in
+3
-0
3 additions, 0 deletions
include/spm_config.h.in
tests/CMakeLists.txt
+2
-2
2 additions, 2 deletions
tests/CMakeLists.txt
with
40 additions
and
22 deletions
CMakeLists.txt
+
34
−
19
View file @
97fdacc3
...
@@ -13,7 +13,7 @@ project (SPM C Fortran)
...
@@ -13,7 +13,7 @@ project (SPM C Fortran)
# Check if compiled independently or within another project
# Check if compiled independently or within another project
if
(
${
CMAKE_SOURCE_DIR
}
STREQUAL
${
CMAKE_CURRENT_SOURCE_DIR
}
)
if
(
${
CMAKE_SOURCE_DIR
}
STREQUAL
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
BUILD_SUBPROJECT OFF
)
set
(
BUILD_
AS_
SUBPROJECT OFF
)
option
(
BUILD_SHARED_LIBS
option
(
BUILD_SHARED_LIBS
"Build shared libraries"
OFF
)
"Build shared libraries"
OFF
)
...
@@ -34,7 +34,13 @@ if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
...
@@ -34,7 +34,13 @@ if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
include
(
CTest
)
include
(
CTest
)
else
()
else
()
set
(
BUILD_SUBPROJECT ON
)
set
(
BUILD_AS_SUBPROJECT ON
)
# Check if within pastix which provides Scotch
if
(
PASTIX_ORDERING_SCOTCH
)
set
(
HAVE_SCOTCH ON
)
endif
()
endif
()
endif
()
# Define a subproject name fr ctest
# Define a subproject name fr ctest
...
@@ -84,22 +90,33 @@ include(RulesPrecisions)
...
@@ -84,22 +90,33 @@ include(RulesPrecisions)
### System parameter detection
### System parameter detection
include
(
CheckSystem
)
include
(
CheckSystem
)
# PaStiX depends on CBLAS
# SPM depends on Lapacke and CBLAS
#----------------------------
#---------------------------------
find_package
(
CBLAS
)
# Should be REQUIRED for BLAS sequential only
find_package
(
LAPACKE REQUIRED
)
if
(
CBLAS_FOUND
)
message
(
STATUS
"cblas:
${
CBLAS_INCLUDE_DIRS
}
"
)
include_directories
(
${
CBLAS_INCLUDE_DIRS
}
)
endif
()
find_package
(
LAPACKE
)
# Should be also REQUIRED
if
(
LAPACKE_FOUND
)
if
(
LAPACKE_FOUND
)
message
(
STATUS
"lapacke:
${
LAPACKE_INCLUDE_DIRS
}
"
)
message
(
STATUS
"lapacke:
${
LAPACKE_INCLUDE_DIRS
}
"
)
include_directories
(
${
LAPACKE_INCLUDE_DIRS
}
)
include_directories
(
${
LAPACKE_INCLUDE_DIRS
}
)
endif
()
endif
()
#Configuration header
find_package
(
CBLAS REQUIRED
)
#--------------------
if
(
CBLAS_FOUND
)
message
(
STATUS
"cblas:
${
CBLAS_INCLUDE_DIRS
}
"
)
include_directories
(
${
CBLAS_INCLUDE_DIRS
}
)
endif
()
### Store dependencies not handled with pkg-config
set
(
DEPS_LIBRARIES
${
LAPACKE_LIBRARIES_DEP
}
${
CBLAS_LIBRARIES_DEP
}
)
list
(
APPEND CMAKE_INSTALL_RPATH
${
LAPACKE_LIBRARY_DIRS_DEP
}
${
CBLAS_LIBRARY_DIRS_DEP
}
)
# Configuration header
#---------------------
configure_file
(
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/spm_config.h.in"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/spm_config.h.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/src/spm_config.h"
)
"
${
CMAKE_CURRENT_BINARY_DIR
}
/src/spm_config.h"
)
...
@@ -108,10 +125,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/src/spm_config.h" DESTINATION include
...
@@ -108,10 +125,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/src/spm_config.h" DESTINATION include
include_directories
(
include
)
include_directories
(
include
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/src"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/src"
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/drivers"
)
### reset variables
### reset variables
set
(
generated_sources
""
)
set
(
generated_headers
""
)
set
(
generated_headers
""
)
### Generate the headers in all precisions
### Generate the headers in all precisions
...
@@ -134,6 +149,8 @@ add_custom_target(spm_headers_tgt
...
@@ -134,6 +149,8 @@ add_custom_target(spm_headers_tgt
DEPENDS
${
spm_headers
}
)
DEPENDS
${
spm_headers
}
)
### Generate the sources in all precisions
### Generate the sources in all precisions
set
(
generated_sources
""
)
set
(
SOURCES
set
(
SOURCES
src/z_spm.c
src/z_spm.c
src/z_spm_2dense.c
src/z_spm_2dense.c
...
@@ -186,10 +203,8 @@ add_library(spm
...
@@ -186,10 +203,8 @@ add_library(spm
)
)
target_link_libraries
(
spm
target_link_libraries
(
spm
${
LAPACKE_LIBRARIES
}
${
LAPACKE_LIBRARIES_DEP
}
${
LAPACK_SEQ_LIBRARIES
}
${
CBLAS_LIBRARIES_DEP
}
${
CBLAS_LIBRARIES
}
${
BLAS_SEQ_LIBRARIES
}
)
)
add_dependencies
(
spm
add_dependencies
(
spm
...
...
This diff is collapsed.
Click to expand it.
morse_cmake
@
0e9c7a8f
Compare
f4ead635
...
0e9c7a8f
Subproject commit
f4ead635e331c6a43b81d9e0a56b082fe47be36c
Subproject commit
0e9c7a8fe39c4a728c2a8346007e1afa207cd9b5
This diff is collapsed.
Click to expand it.
include/spm_config.h.in
+
3
−
0
View file @
97fdacc3
...
@@ -44,6 +44,9 @@
...
@@ -44,6 +44,9 @@
/* Datatypes used */
/* Datatypes used */
#cmakedefine SPM_INT64
#cmakedefine SPM_INT64
/* Exploit the scotch version from the library compiling spm */
#cmakedefine HAVE_SCOTCH
#if defined(HAVE_FALLTHROUGH)
#if defined(HAVE_FALLTHROUGH)
#define spm_attr_fallthrough __attribute__((fallthrough))
#define spm_attr_fallthrough __attribute__((fallthrough))
#else
#else
...
...
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
2
−
2
View file @
97fdacc3
...
@@ -34,8 +34,8 @@ add_library(spm_test
...
@@ -34,8 +34,8 @@ add_library(spm_test
target_link_libraries
(
spm_test
target_link_libraries
(
spm_test
spm
spm
${
LAPACKE_LIBRARIES
}
${
LAPACKE_LIBRARIES
_DEP
}
${
LAPACK_SEQ
_LIBRARIES
}
)
${
CBLAS
_LIBRARIES
_DEP
}
)
## Generate all test executables
## Generate all test executables
set
(
TESTS
set
(
TESTS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment