Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
morse_cmake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
morse_cmake
Commits
5ca32fa2
Commit
5ca32fa2
authored
7 years ago
by
Matthieu Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
Fixed and added required includes for ptscotch tests
parent
00aae15b
No related branches found
No related tags found
1 merge request
!2
Fixed and added required includes for ptscotch tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/find/FindPTSCOTCH.cmake
+6
-2
6 additions, 2 deletions
modules/find/FindPTSCOTCH.cmake
with
6 additions
and
2 deletions
modules/find/FindPTSCOTCH.cmake
+
6
−
2
View file @
5ca32fa2
...
@@ -285,7 +285,7 @@ if(PTSCOTCH_LIBRARIES)
...
@@ -285,7 +285,7 @@ if(PTSCOTCH_LIBRARIES)
# MPI
# MPI
if
(
MPI_FOUND
)
if
(
MPI_FOUND
)
if
(
MPI_C_INCLUDE_PATH
)
if
(
MPI_C_INCLUDE_PATH
)
list
(
APPEND
CMAKE_
REQUIRED_INC
LUDE
S
"
${
MPI_C_INCLUDE_PATH
}
"
)
list
(
APPEND REQUIRED_INC
DIR
S
"
${
MPI_C_INCLUDE_PATH
}
"
)
endif
()
endif
()
if
(
MPI_C_LINK_FLAGS
)
if
(
MPI_C_LINK_FLAGS
)
if
(
${
MPI_C_LINK_FLAGS
}
MATCHES
" -"
)
if
(
${
MPI_C_LINK_FLAGS
}
MATCHES
" -"
)
...
@@ -373,12 +373,15 @@ mark_as_advanced(PTSCOTCH_DIR_FOUND)
...
@@ -373,12 +373,15 @@ mark_as_advanced(PTSCOTCH_DIR_FOUND)
# Check the size of SCOTCH_Num
# Check the size of SCOTCH_Num
# ---------------------------------
# ---------------------------------
set
(
CMAKE_REQUIRED_INCLUDES
${
PTSCOTCH_INCLUDE_DIRS
}
)
set
(
CMAKE_REQUIRED_INCLUDES
${
PTSCOTCH_INCLUDE_DIRS
}
)
# Add ptscotch dependencies incdirs (mainly MPI) to required includes for the examples
list
(
APPEND CMAKE_REQUIRED_INCLUDES
${
PTSCOTCH_INCLUDE_DIRS_DEP
}
)
include
(
CheckCSourceRuns
)
include
(
CheckCSourceRuns
)
#stdio.h and stdint.h should be included by scotch.h directly
#stdio.h and stdint.h should be included by scotch.h directly
#mpi.h not included into ptscotch.h => MPI_comm undefined
set
(
PTSCOTCH_C_TEST_SCOTCH_Num_4
"
set
(
PTSCOTCH_C_TEST_SCOTCH_Num_4
"
#include <stdio.h>
#include <stdio.h>
#include <stdint.h>
#include <stdint.h>
#include <mpi.h>
#include <ptscotch.h>
#include <ptscotch.h>
int main(int argc, char **argv) {
int main(int argc, char **argv) {
if (sizeof(SCOTCH_Num) == 4)
if (sizeof(SCOTCH_Num) == 4)
...
@@ -391,6 +394,7 @@ int main(int argc, char **argv) {
...
@@ -391,6 +394,7 @@ int main(int argc, char **argv) {
set
(
PTSCOTCH_C_TEST_SCOTCH_Num_8
"
set
(
PTSCOTCH_C_TEST_SCOTCH_Num_8
"
#include <stdio.h>
#include <stdio.h>
#include <stdint.h>
#include <stdint.h>
#include <mpi.h>
#include <ptscotch.h>
#include <ptscotch.h>
int main(int argc, char **argv) {
int main(int argc, char **argv) {
if (sizeof(SCOTCH_Num) == 8)
if (sizeof(SCOTCH_Num) == 8)
...
...
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