Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Podhorszki, Norbert
ADIOS2
Commits
da22c374
Commit
da22c374
authored
7 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Update FindMPI to cmake/master
parent
e73152ea
No related branches found
No related tags found
1 merge request
!267
Add upstream FindMPI
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/upstream/FindMPI.cmake
+17
-17
17 additions, 17 deletions
cmake/upstream/FindMPI.cmake
with
17 additions
and
17 deletions
cmake/upstream/FindMPI.cmake
+
17
−
17
View file @
da22c374
...
...
@@ -480,39 +480,39 @@ function (_MPI_interrogate_compiler lang)
# Extract include paths from compile command line
string
(
REGEX MATCHALL
"(^| )[-/]I([^
\"
]+|
\"
[^
\"
]+
\"
)"
MPI_ALL_INCLUDE_PATHS
"
${
MPI_COMPILE_CMDLINE
}
"
)
foreach
(
_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS
)
string
(
REGEX REPLACE
"^ ?[-/]I"
""
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
)
string
(
REPLACE
"//"
"/"
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
)
get_filename_component
(
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
REALPATH
)
list
(
APPEND MPI_INCLUDE_DIRS_WORK
"
${
_MPI_INCLUDE_PATH
}
"
)
endforeach
()
# If extracting failed to work, we'll try using -showme:incdirs.
if
(
NOT MPI_INCLUDE_
DIRS_WORK
)
if
(
NOT MPI_
ALL_
INCLUDE_
PATHS
)
_MPI_check_compiler
(
${
LANG
}
"-showme:incdirs"
MPI_INCDIRS_CMDLINE MPI_INCDIRS_COMPILER_RETURN
)
if
(
MPI_INCDIRS_COMPILER_RETURN
)
separate_arguments
(
MPI_INCLUDE_DIRS_WORK
${
_MPI_COMMAND_TYPE
}
"
${
MPI_INCDIRS_CMDLINE
}
"
)
endif
()
endif
()
foreach
(
_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS
)
string
(
REGEX REPLACE
"^ ?[-/]I"
""
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
)
string
(
REPLACE
"
\"
"
""
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
)
get_filename_component
(
_MPI_INCLUDE_PATH
"
${
_MPI_INCLUDE_PATH
}
"
REALPATH
)
list
(
APPEND MPI_INCLUDE_DIRS_WORK
"
${
_MPI_INCLUDE_PATH
}
"
)
endforeach
()
# Extract linker paths from the link command line
string
(
REGEX MATCHALL
"(^| )(-Wl,|-Xlinker |)(-L|[/-]LIBPATH:|[/-]libpath:)([^
\"
]+|
\"
[^
\"
]+
\"
)"
MPI_ALL_LINK_PATHS
"
${
MPI_LINK_CMDLINE
}
"
)
foreach
(
_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS
)
string
(
REGEX REPLACE
"^ ?(-Wl,|-Xlinker )?(-L|[/-]LIBPATH:|[/-]libpath:)"
""
_MPI_LPATH
"
${
_MPI_LPATH
}
"
)
string
(
REPLACE
"//"
"/"
_MPI_LPATH
"
${
_MPI_LPATH
}
"
)
get_filename_component
(
_MPI_LPATH
"
${
_MPI_LPATH
}
"
REALPATH
)
list
(
APPEND MPI_LINK_DIRECTORIES_WORK
"
${
_MPI_LPATH
}
"
)
endforeach
()
# If extracting failed to work, we'll try using -showme:libdirs.
if
(
NOT MPI_LINK_
DIRECTORIES_WORK
)
if
(
NOT MPI_
ALL_
LINK_
PATHS
)
_MPI_check_compiler
(
${
LANG
}
"-showme:libdirs"
MPI_LIBDIRS_CMDLINE MPI_LIBDIRS_COMPILER_RETURN
)
if
(
MPI_LIBDIRS_COMPILER_RETURN
)
separate_arguments
(
MPI_LINK_DIRECTORIES_WORK
${
_MPI_COMMAND_TYPE
}
"
${
MPI_LIBDIRS_CMDLINE
}
"
)
endif
()
endif
()
foreach
(
_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS
)
string
(
REGEX REPLACE
"^ ?(-Wl,|-Xlinker )?(-L|[/-]LIBPATH:|[/-]libpath:)"
""
_MPI_LPATH
"
${
_MPI_LPATH
}
"
)
string
(
REPLACE
"
\"
"
""
_MPI_LPATH
"
${
_MPI_LPATH
}
"
)
get_filename_component
(
_MPI_LPATH
"
${
_MPI_LPATH
}
"
REALPATH
)
list
(
APPEND MPI_LINK_DIRECTORIES_WORK
"
${
_MPI_LPATH
}
"
)
endforeach
()
# Extract linker flags from the link command line
string
(
REGEX MATCHALL
"(^| )(-Wl,|-Xlinker )([^
\"
]+|
\"
[^
\"
]+
\"
)"
MPI_ALL_LINK_FLAGS
"
${
MPI_LINK_CMDLINE
}
"
)
...
...
@@ -614,7 +614,7 @@ function (_MPI_interrogate_compiler lang)
# link it in that case. -lpthread is covered by the normal library treatment on the other hand.
if
(
"
${
MPI_COMPILE_CMDLINE
}
"
MATCHES
"-pthread"
)
list
(
APPEND MPI_COMPILE_OPTIONS_WORK
"-pthread"
)
if
(
MPI_
COMPILE_OPTION
S_WORK
)
if
(
MPI_
LINK_FLAG
S_WORK
)
string
(
APPEND MPI_LINK_FLAGS_WORK
" -pthread"
)
else
()
set
(
MPI_LINK_FLAGS_WORK
"-pthread"
)
...
...
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